Esempio n. 1
0
        public override void VisitDOSHeader(DOSHeader header)
        {
            m_binaryWriter.Write(header.Start);
            m_binaryWriter.Write(header.Lfanew);
            m_binaryWriter.Write(header.End);

            m_binaryWriter.Write((ushort)0x4550);
            m_binaryWriter.Write((ushort)0);
        }
Esempio n. 2
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);
 }
Esempio n. 3
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);
 }
Esempio n. 4
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");
            }
        }
Esempio n. 5
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");
        }
Esempio n. 6
0
 public override void VisitDOSHeader(DOSHeader header)
 {
     header.SetDefaultValues ();
 }
Esempio n. 7
0
 public override void VisitDOSHeader(DOSHeader header)
 {
     header.SetDefaultValues();
 }
Esempio n. 8
0
        public override void VisitDOSHeader(DOSHeader header)
        {
            m_binaryWriter.Write (header.Start);
            m_binaryWriter.Write (header.Lfanew);
            m_binaryWriter.Write (header.End);

            m_binaryWriter.Write ((ushort) 0x4550);
            m_binaryWriter.Write ((ushort) 0);
        }