Exemple #1
0
        public ImageOptionalHeader64VM(object owner, HexBuffer buffer, HexPosition startOffset, HexPosition endOffset)
            : base(owner, buffer, startOffset, endOffset, 0x20, 0x68)
        {
            ImageBaseVM = new UInt64HexField(buffer, Name, "ImageBase", startOffset + 0x18);

            SizeOfStackReserveVM = new UInt64HexField(buffer, Name, "SizeOfStackReserve", startOffset + 0x48);
            SizeOfStackCommitVM  = new UInt64HexField(buffer, Name, "SizeOfStackCommit", startOffset + 0x50);
            SizeOfHeapReserveVM  = new UInt64HexField(buffer, Name, "SizeOfHeapReserve", startOffset + 0x58);
            SizeOfHeapCommitVM   = new UInt64HexField(buffer, Name, "SizeOfHeapCommit", startOffset + 0x60);

            var list = new List <HexField> {
                MagicVM,
                MajorLinkerVersionVM,
                MinorLinkerVersionVM,
                SizeOfCodeVM,
                SizeOfInitializedDataVM,
                SizeOfUninitializedDataVM,
                AddressOfEntryPointVM,
                BaseOfCodeVM,
                ImageBaseVM,
                SectionAlignmentVM,
                FileAlignmentVM,
                MajorOperatingSystemVersionVM,
                MinorOperatingSystemVersionVM,
                MajorImageVersionVM,
                MinorImageVersionVM,
                MajorSubsystemVersionVM,
                MinorSubsystemVersionVM,
                Win32VersionValueVM,
                SizeOfImageVM,
                SizeOfHeadersVM,
                CheckSumVM,
                SubsystemVM,
                DllCharacteristicsVM,
                SizeOfStackReserveVM,
                SizeOfStackCommitVM,
                SizeOfHeapReserveVM,
                SizeOfHeapCommitVM,
                LoaderFlagsVM,
                NumberOfRvaAndSizesVM,
            };

            AddDataDirs(list, endOffset);
        }
		public ImageOptionalHeader64VM(object owner, HexDocument doc, ulong startOffset, ulong endOffset)
			: base(owner, doc, startOffset, endOffset, 0x20, 0x68) {
			this.imageBaseVM = new UInt64HexField(doc, Name, "ImageBase", startOffset + 0x18);

			this.sizeOfStackReserveVM = new UInt64HexField(doc, Name, "SizeOfStackReserve", startOffset + 0x48);
			this.sizeOfStackCommitVM = new UInt64HexField(doc, Name, "SizeOfStackCommit", startOffset + 0x50);
			this.sizeOfHeapReserveVM = new UInt64HexField(doc, Name, "SizeOfHeapReserve", startOffset + 0x58);
			this.sizeOfHeapCommitVM = new UInt64HexField(doc, Name, "SizeOfHeapCommit", startOffset + 0x60);

			var list = new List<HexField> {
				MagicVM,
				MajorLinkerVersionVM,
				MinorLinkerVersionVM,
				SizeOfCodeVM,
				SizeOfInitializedDataVM,
				SizeOfUninitializedDataVM,
				AddressOfEntryPointVM,
				BaseOfCodeVM,
				ImageBaseVM,
				SectionAlignmentVM,
				FileAlignmentVM,
				MajorOperatingSystemVersionVM,
				MinorOperatingSystemVersionVM,
				MajorImageVersionVM,
				MinorImageVersionVM,
				MajorSubsystemVersionVM,
				MinorSubsystemVersionVM,
				Win32VersionValueVM,
				SizeOfImageVM,
				SizeOfHeadersVM,
				CheckSumVM,
				SubsystemVM,
				DllCharacteristicsVM,
				SizeOfStackReserveVM,
				SizeOfStackCommitVM,
				SizeOfHeapReserveVM,
				SizeOfHeapCommitVM,
				LoaderFlagsVM,
				NumberOfRvaAndSizesVM,
			};

			AddDataDirs(list, endOffset);
		}