private void ProcessGuid(byte[] rawBytes)
{
FriendlyName = "Root folder: GUID";
//TODO split this out or at least use a different icon?
var index = 2;
index += 2; // move past index and a single unknown value
var rawguid1 = new byte[16];
Array.Copy(rawBytes, index, rawguid1, 0, 16);
var rawguid = Utils.ExtractGuidFromShellItem(rawguid1);
var foldername = Utils.GetFolderNameFromGuid(rawguid);
index += 16;
if (index >= rawBytes.Length)
{
Value = foldername;
return;
}
var size = BitConverter.ToInt16(rawBytes, index);
if (size == 0)
{
index += 2;
}
if (size > rawBytes.Length)
{
Value = foldername;
return;
}
//TODO this should be the looping cut up thing
if (index < rawBytes.Length)
{
var signature = BitConverter.ToUInt32(rawBytes, index + 4);
//TODO does this need to check if its a 0xbeef?? regex?
var block = Utils.GetExtensionBlockFromBytes(signature, rawBytes.Skip(index).ToArray());
ExtensionBlocks.Add(block);
index += size;
}
Value = foldername;
}