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); }
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(); } }
public override void VisitDataDirectoriesHeader(PEOptionalHeader.DataDirectoriesHeader header) { header.ExportTable = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.ImportTable = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.ResourceTable = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.ExceptionTable = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.CertificateTable = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.BaseRelocationTable = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.Debug = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.Copyright = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.GlobalPtr = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.TLSTable = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.LoadConfigTable = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.BoundImport = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.IAT = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.DelayImportDescriptor = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.CLIHeader = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); header.Reserved = new DataDirectory( new RVA(m_binaryReader.ReadUInt32()), m_binaryReader.ReadUInt32()); }
public override void VisitDataDirectoriesHeader(PEOptionalHeader.DataDirectoriesHeader header) { header.SetDefaultValues(); }