示例#1
0
        /// <summary>
        ///     Create a new ImageNtHeaders object.
        /// </summary>
        /// <param name="peFile">A PE file .</param>
        /// <param name="offset">Raw offset of the NT header.</param>
        public ImageNtHeaders(IRawFile peFile, long offset)
            : base(peFile, offset)
        {
            FileHeader = new ImageFileHeader(peFile, offset + 0x4);

            var is32Bit = FileHeader.Machine == MachineType.I386;

            OptionalHeader = new ImageOptionalHeader(peFile, offset + 0x18, !is32Bit);
        }
示例#2
0
 /// <summary>
 ///     Create a new ImageNtHeaders object.
 /// </summary>
 /// <param name="peFile">A PE file .</param>
 /// <param name="offset">Raw offset of the NT header.</param>
 public ImageNtHeaders(IRawFile peFile, long offset)
     : base(peFile, offset)
 {
     FileHeader     = new ImageFileHeader(peFile, offset + 0x4);
     OptionalHeader = new ImageOptionalHeader(peFile, offset + 0x18, peFile.Is64Bit());
 }