public ImageSectionHeaderVM(object owner, HexDocument doc, ulong startOffset) : base(owner) { this.nameVM = new StringHexField(doc, Name, "Name", startOffset + 0, Encoding.UTF8, 8); this.virtualSizeVM = new UInt32HexField(doc, Name, "VirtualSize", startOffset + 8); this.virtualAddressVM = new UInt32HexField(doc, Name, "VirtualAddress", startOffset + 0x0C); this.sizeOfRawDataVM = new UInt32HexField(doc, Name, "SizeOfRawData", startOffset + 0x10); this.pointerToRawDataVM = new UInt32HexField(doc, Name, "PointerToRawData", startOffset + 0x14); this.pointerToRelocationsVM = new UInt32HexField(doc, Name, "PointerToRelocations", startOffset + 0x18); this.pointerToLinenumbersVM = new UInt32HexField(doc, Name, "PointerToLinenumbers", startOffset + 0x1C); this.numberOfRelocationsVM = new UInt16HexField(doc, Name, "NumberOfRelocations", startOffset + 0x20); this.numberOfLinenumbersVM = new UInt16HexField(doc, Name, "NumberOfLinenumbers", startOffset + 0x22); this.characteristicsVM = new UInt32FlagsHexField(doc, Name, "Characteristics", startOffset + 0x24); this.characteristicsVM.Add(new BooleanHexBitField("TYPE_DSECT", 0)); this.characteristicsVM.Add(new BooleanHexBitField("TYPE_NOLOAD", 1)); this.characteristicsVM.Add(new BooleanHexBitField("TYPE_GROUP", 2)); this.characteristicsVM.Add(new BooleanHexBitField("TYPE_NO_PAD", 3)); this.characteristicsVM.Add(new BooleanHexBitField("TYPE_COPY", 4)); this.characteristicsVM.Add(new BooleanHexBitField("CNT_CODE", 5)); this.characteristicsVM.Add(new BooleanHexBitField("CNT_INITIALIZED_DATA", 6)); this.characteristicsVM.Add(new BooleanHexBitField("CNT_UNINITIALIZED_DATA", 7)); this.characteristicsVM.Add(new BooleanHexBitField("LNK_OTHER", 8)); this.characteristicsVM.Add(new BooleanHexBitField("LNK_INFO", 9)); this.characteristicsVM.Add(new BooleanHexBitField("TYPE_OVER", 10)); this.characteristicsVM.Add(new BooleanHexBitField("LNK_REMOVE", 11)); this.characteristicsVM.Add(new BooleanHexBitField("LNK_COMDAT", 12)); this.characteristicsVM.Add(new BooleanHexBitField("RESERVED", 13)); this.characteristicsVM.Add(new BooleanHexBitField("NO_DEFER_SPEC_EXC", 14)); this.characteristicsVM.Add(new BooleanHexBitField("GPREL", 15)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_SYSHEAP", 16)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_PURGEABLE", 17)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_LOCKED", 18)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_PRELOAD", 19)); this.characteristicsVM.Add(new IntegerHexBitField("Alignment", 20, 4, AlignInfos)); this.characteristicsVM.Add(new BooleanHexBitField("LNK_NRELOC_OVFL", 24)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_DISCARDABLE", 25)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_NOT_CACHED", 26)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_NOT_PAGED", 27)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_SHARED", 28)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_EXECUTE", 29)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_READ", 30)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_WRITE", 31)); this.hexFields = new HexField[] { this.nameVM, this.virtualSizeVM, this.virtualAddressVM, this.sizeOfRawDataVM, this.pointerToRawDataVM, this.pointerToRelocationsVM, this.pointerToLinenumbersVM, this.numberOfRelocationsVM, this.numberOfLinenumbersVM, this.characteristicsVM, }; }
public ImageSectionHeaderVM(HexDocument doc, ulong startOffset) { this.nameVM = new StringHexField(doc, Name, "Name", startOffset + 0, Encoding.UTF8, 8); this.virtualSizeVM = new UInt32HexField(doc, Name, "VirtualSize", startOffset + 8); this.virtualAddressVM = new UInt32HexField(doc, Name, "VirtualAddress", startOffset + 0x0C); this.sizeOfRawDataVM = new UInt32HexField(doc, Name, "SizeOfRawData", startOffset + 0x10); this.pointerToRawDataVM = new UInt32HexField(doc, Name, "PointerToRawData", startOffset + 0x14); this.pointerToRelocationsVM = new UInt32HexField(doc, Name, "PointerToRelocations", startOffset + 0x18); this.pointerToLinenumbersVM = new UInt32HexField(doc, Name, "PointerToLinenumbers", startOffset + 0x1C); this.numberOfRelocationsVM = new UInt16HexField(doc, Name, "NumberOfRelocations", startOffset + 0x20); this.numberOfLinenumbersVM = new UInt16HexField(doc, Name, "NumberOfLinenumbers", startOffset + 0x22); this.characteristicsVM = new UInt32FlagsHexField(doc, Name, "Characteristics", startOffset + 0x24); this.characteristicsVM.Add(new BooleanHexBitField("TYPE_DSECT", 0)); this.characteristicsVM.Add(new BooleanHexBitField("TYPE_NOLOAD", 1)); this.characteristicsVM.Add(new BooleanHexBitField("TYPE_GROUP", 2)); this.characteristicsVM.Add(new BooleanHexBitField("TYPE_NO_PAD", 3)); this.characteristicsVM.Add(new BooleanHexBitField("TYPE_COPY", 4)); this.characteristicsVM.Add(new BooleanHexBitField("CNT_CODE", 5)); this.characteristicsVM.Add(new BooleanHexBitField("CNT_INITIALIZED_DATA", 6)); this.characteristicsVM.Add(new BooleanHexBitField("CNT_UNINITIALIZED_DATA", 7)); this.characteristicsVM.Add(new BooleanHexBitField("LNK_OTHER", 8)); this.characteristicsVM.Add(new BooleanHexBitField("LNK_INFO", 9)); this.characteristicsVM.Add(new BooleanHexBitField("TYPE_OVER", 10)); this.characteristicsVM.Add(new BooleanHexBitField("LNK_REMOVE", 11)); this.characteristicsVM.Add(new BooleanHexBitField("LNK_COMDAT", 12)); this.characteristicsVM.Add(new BooleanHexBitField("RESERVED", 13)); this.characteristicsVM.Add(new BooleanHexBitField("NO_DEFER_SPEC_EXC", 14)); this.characteristicsVM.Add(new BooleanHexBitField("GPREL", 15)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_SYSHEAP", 16)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_PURGEABLE", 17)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_LOCKED", 18)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_PRELOAD", 19)); this.characteristicsVM.Add(new IntegerHexBitField("Alignment", 20, 4, AlignInfos)); this.characteristicsVM.Add(new BooleanHexBitField("LNK_NRELOC_OVFL", 24)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_DISCARDABLE", 25)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_NOT_CACHED", 26)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_NOT_PAGED", 27)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_SHARED", 28)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_EXECUTE", 29)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_READ", 30)); this.characteristicsVM.Add(new BooleanHexBitField("MEM_WRITE", 31)); this.hexFields = new HexField[] { this.nameVM, this.virtualSizeVM, this.virtualAddressVM, this.sizeOfRawDataVM, this.pointerToRawDataVM, this.pointerToRelocationsVM, this.pointerToLinenumbersVM, this.numberOfRelocationsVM, this.numberOfLinenumbersVM, this.characteristicsVM, }; }
public StorageStreamVM(HexDocument doc, ulong startOffset, int stringLen) { this.iOffsetVM = new UInt32HexField(doc, Name, "iOffset", startOffset + 0); this.iSizeVM = new UInt32HexField(doc, Name, "iSize", startOffset + 4); this.rcNameVM = new StringHexField(doc, Name, "rcName", startOffset + 8, Encoding.ASCII, stringLen); this.hexFields = new HexField[] { iOffsetVM, iSizeVM, rcNameVM, }; }
public StorageStreamVM(HexDocument doc, ulong startOffset, int stringLen) { this.iOffsetVM = new UInt32HexField(doc, Name, "iOffset", startOffset + 0); this.iSizeVM = new UInt32HexField(doc, Name, "iSize", startOffset + 4); this.rcNameVM = new StringHexField(doc, Name, "rcName", startOffset + 8, Encoding.ASCII, stringLen); this.hexFields = new HexField[] { iOffsetVM, iSizeVM, rcNameVM, }; }
public StorageSignatureVM(object owner, HexDocument doc, ulong startOffset, int stringLen) : base(owner) { this.lSignatureVM = new UInt32HexField(doc, Name, "lSignature", startOffset + 0); this.iMajorVerVM = new UInt16HexField(doc, Name, "iMajorVer", startOffset + 4, true); this.iMinorVerVM = new UInt16HexField(doc, Name, "iMinorVer", startOffset + 6, true); this.iExtraDataVM = new UInt32HexField(doc, Name, "iExtraData", startOffset + 8); this.iVersionStringVM = new UInt32HexField(doc, Name, "iVersionString", startOffset + 0x0C); this.versionStringVM = new StringHexField(doc, Name, "VersionString", startOffset + 0x10, Encoding.UTF8, stringLen); this.hexFields = new HexField[] { lSignatureVM, iMajorVerVM, iMinorVerVM, iExtraDataVM, iVersionStringVM, versionStringVM, }; }
public StorageSignatureVM(HexDocument doc, ulong startOffset, int stringLen) { this.lSignatureVM = new UInt32HexField(doc, Name, "lSignature", startOffset + 0); this.iMajorVerVM = new UInt16HexField(doc, Name, "iMajorVer", startOffset + 4, true); this.iMinorVerVM = new UInt16HexField(doc, Name, "iMinorVer", startOffset + 6, true); this.iExtraDataVM = new UInt32HexField(doc, Name, "iExtraData", startOffset + 8); this.iVersionStringVM = new UInt32HexField(doc, Name, "iVersionString", startOffset + 0x0C); this.versionStringVM = new StringHexField(doc, Name, "VersionString", startOffset + 0x10, Encoding.UTF8, stringLen); this.hexFields = new HexField[] { lSignatureVM, iMajorVerVM, iMinorVerVM, iExtraDataVM, iVersionStringVM, versionStringVM, }; }