internal Image() { m_dosHeader = new DOSHeader(); m_peFileHeader = new PEFileHeader(); m_peOptionalHeader = new PEOptionalHeader(); m_sections = new SectionCollection(); m_importAddressTable = new ImportAddressTable(); m_importTable = new ImportTable(); m_importLookupTable = new ImportLookupTable(); m_hintNameTable = new HintNameTable(); m_mdRoot = new MetadataRoot(this); }
public override void VisitDOSHeader(DOSHeader header) { header.Start = m_binaryReader.ReadBytes(60); header.Lfanew = m_binaryReader.ReadUInt32(); header.End = m_binaryReader.ReadBytes(64); m_binaryReader.BaseStream.Position = header.Lfanew; if (m_binaryReader.ReadUInt16() != 0x4550 || m_binaryReader.ReadUInt16() != 0) { throw new ImageFormatException("Invalid PE File Signature"); } }
public override void VisitDOSHeader(DOSHeader header) { header.SetDefaultValues(); }