예제 #1
0
 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);
 }
예제 #2
0
        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");
            }
        }
예제 #3
0
 public override void VisitDOSHeader(DOSHeader header)
 {
     header.SetDefaultValues();
 }