Lnk.ShellItems.ShellBag0X71.ShellBag0X71 C# (CSharp) Method

ShellBag0X71() public method

public ShellBag0X71 ( byte rawBytes ) : System
rawBytes byte
return System
        public ShellBag0X71(byte[] rawBytes)
        {
            FriendlyName = "GUID: Control panel";

            ExtensionBlocks = new List<IExtensionBlock>();

            var index = 2;

            index += 2; // move past index and a single unknown value

            index += 10; //10 zeros

            var dataSig = BitConverter.ToUInt32(rawBytes, 6);

            if (dataSig == 0xbeebee00)
            {
                ProcessPropertyViewDefault(rawBytes);

                return;
            }

            // int dataLength1 = rawBytes.Length - index;

            if (rawBytes[2] == 0x4d)
            {
                index -= 10;
            }

            if (rawBytes.Length == 0x16)
            {
                index = 4;
            }

            var rawguid1 = new byte[16];

            Array.Copy(rawBytes, index, rawguid1, 0, 16);

            index += 16;


            var rawguid = Utils.ExtractGuidFromShellItem(rawguid1);


            var foldername = Utils.GetFolderNameFromGuid(rawguid);

            Value = foldername;

            if (rawBytes.Length > 32)
            {
                index = 0x1e;

                var signature1 = BitConverter.ToUInt32(rawBytes, index + 4);

                var block1 = Utils.GetExtensionBlockFromBytes(signature1, rawBytes.Skip(index).ToArray());

                ExtensionBlocks.Add(block1);
            }
        }