Пример #1
0
 public override void VisitPEFileHeader(PEFileHeader header)
 {
     m_binaryWriter.Write(header.Machine);
     m_binaryWriter.Write(header.NumberOfSections);
     m_binaryWriter.Write(header.TimeDateStamp);
     m_binaryWriter.Write(header.PointerToSymbolTable);
     m_binaryWriter.Write(header.NumberOfSymbols);
     m_binaryWriter.Write(header.OptionalHeaderSize);
     m_binaryWriter.Write((ushort)header.Characteristics);
 }
Пример #2
0
 public override void VisitPEFileHeader(PEFileHeader header)
 {
     header.Machine              = m_binaryReader.ReadUInt16();
     header.NumberOfSections     = m_binaryReader.ReadUInt16();
     header.TimeDateStamp        = m_binaryReader.ReadUInt32();
     header.PointerToSymbolTable = m_binaryReader.ReadUInt32();
     header.NumberOfSymbols      = m_binaryReader.ReadUInt32();
     header.OptionalHeaderSize   = m_binaryReader.ReadUInt16();
     header.Characteristics      = (ImageCharacteristics)m_binaryReader.ReadUInt16();
 }
Пример #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);
 }
Пример #4
0
 public override void VisitPEFileHeader(PEFileHeader header)
 {
     header.SetDefaultValues();
     header.TimeDateStamp = TimeDateStampFromEpoch();
 }