Пример #1
0
        ShellItem get_item(int off)
        {
            ShellItem item  = null;
            int       _type = unpack_byte(off + 2);

            if ((_type & 0x70) == (int)SHITEMTYPE.FILE_ENTRY)
            {
                try
                {
                    item = new ShellItem0x30(buf);
                }
                catch (Exception ex)
                {
                    item = new FILEENTRY_FRAGMENT(buf, off, this, 0x04);
                }
            }
            else if (_type == (int)SHITEMTYPE.FOLDER_ENTRY)
            {
                item = new ShellItem0x1F(buf);
            }
            else if (_type == (int)SHITEMTYPE.UNKNOWN2)
            {
                item = new SHITEM_UNKNOWNENTRY2(buf, off, this);
            }
            else if ((_type & 0x70) == (int)SHITEMTYPE.VOLUME_NAME)
            {
                item = new ShellItem0x20(buf);
            }
            else if ((_type & 0x70) == (int)SHITEMTYPE.NETWORK_LOCATION)
            {
                item = new ShellItem0x40(buf);
            }
            else if (_type == (int)SHITEMTYPE.URI)
            {
                item = new ShellItem0x61(buf);
            }
            else if (_type == (int)SHITEMTYPE.CONTROL_PANEL)
            {
                item = new ShellItem0x71(buf);
            }
            else if (_type == (int)SHITEMTYPE.UNKNOWN0)
            {
                item = new ShellItem0x00(buf);
            }
            else if (_type == (int)SHITEMTYPE.DELETEGATE_ITEM)
            {
                item = new ShellItem0x74(buf);
            }
            else
            {
                item = new ShellItem(buf, off);
            }

            return(item);
        }
Пример #2
0
        public ShellItem0x74(byte[] buf)
            : base(buf)
        {
            // Unknown - Empty ( 1 byte)
            // Unknown - size? - 2 bytes
            // CFSF - 4 bytes
            Signature = unpack_dword(0x06);
            // sub shell item data size - 2 bytes

            int off = 0x0A;

            SubItem = new FILEENTRY_FRAGMENT(buf, offset + off, this, 0x04);
            off    += SubItem.Size;

            off += 2; // Empty extension block?

            // 5e591a74-df96-48d3-8d67-1733bcee28ba
            DelegateItemIdentifier = unpack_guid(off);
            off += 16;
            ItemClassIdentifier = unpack_guid(off);
            off           += 16;
            ExtensionBlock = new ExtensionBlockBEEF0004(buf, offset + off);
            ExtensionBlocks.Add(ExtensionBlock);
        }