internal static IList <CoffDirectoryTableImportHeader> Read(ImageReader reader) { var result = new List <CoffDirectoryTableImportHeader>(); while (true) { var importLookupTable = reader.ReadUInt32(); var timeDateStamp = reader.ReadUInt32(); var forwarderChain = reader.ReadUInt32(); var nameRva = reader.ReadUInt32(); var importAddressTable = reader.ReadUInt32(); var header = new CoffDirectoryTableImportHeader { ImportLookupTable = importLookupTable, TimeDateStamp = timeDateStamp, ForwarderChain = forwarderChain, NameRva = nameRva, ImportAddressTable = importAddressTable, }; if (header.ImportLookupTable == 0x00) { break; } result.Add(header); } return(result); }
internal static void Present(CoffDirectoryTableImportHeader header) { Shell.WriteHeader("COFF Directory Table Import Header"); Shell.WriteItem("ImportLookupTable", header.ImportLookupTable); Shell.WriteItem("TimeDateStamp", header.TimeDateStamp); Shell.WriteItem("ForwarderChain", header.ForwarderChain); Shell.WriteItem("NameRva", header.NameRva); Shell.WriteItem("ImportAddressTable", header.ImportAddressTable); Shell.WriteFooter(); }
private static IList <CoffDirectoryTableImportEntry> ReadlookupTable(ImageReader reader, CoffOptionalHeader optionalHeader, CoffDirectoryTableImportHeader tableHeader) { var result = new List <CoffDirectoryTableImportEntry>(); reader.ToRva(tableHeader.ImportAddressTable); while (true) { var entry = ReadlookupTableEntry(reader, optionalHeader); if (entry == null) { return(result); } result.Add(entry); } }