Example #1
0
 public IMAGE_NT_HEADERS(byte[] buff, UInt32 offset, bool is64Bit)
 {
     _offset        = offset;
     _buff          = buff;
     _is64Bit       = is64Bit;
     FileHeader     = new IMAGE_FILE_HEADER(buff, offset + 0x4);
     OptionalHeader = new IMAGE_OPTIONAL_HEADER(buff, offset + 0x18, _is64Bit);
 }
Example #2
0
        public IMAGE_NT_HEADERS(byte [] buff, UInt32 offset)
        {
            Signature       = Utility.BytesToUInt32(buff, offset);
            ImageFileHeader = new IMAGE_FILE_HEADER(buff, offset + 0x4);

            // Determine if the PE file is a x32 or x64 file.
            bool is32Bit = (ImageFileHeader.Machine == 34404) ? false : true;

            ImageOptionalHeader = new IMAGE_OPTIONAL_HEADER(buff, offset + 0x18, is32Bit);
        }