Beispiel #1
0
 public override void VisitDataDirectoriesHeader(PEOptionalHeader.DataDirectoriesHeader header)
 {
     m_binaryWriter.Write(header.ExportTable.VirtualAddress);
     m_binaryWriter.Write(header.ExportTable.Size);
     m_binaryWriter.Write(header.ImportTable.VirtualAddress);
     m_binaryWriter.Write(header.ImportTable.Size);
     m_binaryWriter.Write(header.ResourceTable.VirtualAddress);
     m_binaryWriter.Write(header.ResourceTable.Size);
     m_binaryWriter.Write(header.ExceptionTable.VirtualAddress);
     m_binaryWriter.Write(header.ExceptionTable.Size);
     m_binaryWriter.Write(header.CertificateTable.VirtualAddress);
     m_binaryWriter.Write(header.CertificateTable.Size);
     m_binaryWriter.Write(header.BaseRelocationTable.VirtualAddress);
     m_binaryWriter.Write(header.BaseRelocationTable.Size);
     m_binaryWriter.Write(header.Debug.VirtualAddress);
     m_binaryWriter.Write(header.Debug.Size);
     m_binaryWriter.Write(header.Copyright.VirtualAddress);
     m_binaryWriter.Write(header.Copyright.Size);
     m_binaryWriter.Write(header.GlobalPtr.VirtualAddress);
     m_binaryWriter.Write(header.GlobalPtr.Size);
     m_binaryWriter.Write(header.TLSTable.VirtualAddress);
     m_binaryWriter.Write(header.TLSTable.Size);
     m_binaryWriter.Write(header.LoadConfigTable.VirtualAddress);
     m_binaryWriter.Write(header.LoadConfigTable.Size);
     m_binaryWriter.Write(header.BoundImport.VirtualAddress);
     m_binaryWriter.Write(header.BoundImport.Size);
     m_binaryWriter.Write(header.IAT.VirtualAddress);
     m_binaryWriter.Write(header.IAT.Size);
     m_binaryWriter.Write(header.DelayImportDescriptor.VirtualAddress);
     m_binaryWriter.Write(header.DelayImportDescriptor.Size);
     m_binaryWriter.Write(header.CLIHeader.VirtualAddress);
     m_binaryWriter.Write(header.CLIHeader.Size);
     m_binaryWriter.Write(header.Reserved.VirtualAddress);
     m_binaryWriter.Write(header.Reserved.Size);
 }
Beispiel #2
0
        public override void VisitDataDirectoriesHeader(PEOptionalHeader.DataDirectoriesHeader header)
        {
            header.ExportTable         = ReadDataDirectory();
            header.ImportTable         = ReadDataDirectory();
            header.ResourceTable       = ReadDataDirectory();
            header.ExceptionTable      = ReadDataDirectory();
            header.CertificateTable    = ReadDataDirectory();
            header.BaseRelocationTable = ReadDataDirectory();
            header.Debug                 = ReadDataDirectory();
            header.Copyright             = ReadDataDirectory();
            header.GlobalPtr             = ReadDataDirectory();
            header.TLSTable              = ReadDataDirectory();
            header.LoadConfigTable       = ReadDataDirectory();
            header.BoundImport           = ReadDataDirectory();
            header.IAT                   = ReadDataDirectory();
            header.DelayImportDescriptor = ReadDataDirectory();
            header.CLIHeader             = ReadDataDirectory();
            header.Reserved              = ReadDataDirectory();

            if (header.CLIHeader != DataDirectory.Zero)
            {
                m_image.CLIHeader = new CLIHeader();
            }
            if (header.ExportTable != DataDirectory.Zero)
            {
                m_image.ExportTable = new ExportTable();
            }
        }
Beispiel #3
0
 public override void VisitDataDirectoriesHeader(PEOptionalHeader.DataDirectoriesHeader header)
 {
     header.SetDefaultValues();
 }