mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-15 21:35:01 +00:00
Fix PE delay-load directory
This commit is contained in:
@@ -790,25 +790,20 @@ namespace ExecutableTest
|
||||
Console.WriteLine(" -------------------------");
|
||||
if (executable.OptionalHeader?.DelayImportDescriptor == null
|
||||
|| executable.OptionalHeader.DelayImportDescriptor.VirtualAddress == 0
|
||||
|| executable.DelayLoadDirectoryTable.Length == 0)
|
||||
|| executable.DelayLoadDirectoryTable == null)
|
||||
{
|
||||
Console.WriteLine(" No delay-load directory table items");
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = 0; i < executable.DelayLoadDirectoryTable.Length; i++)
|
||||
{
|
||||
var entry = executable.DelayLoadDirectoryTable[i];
|
||||
Console.WriteLine($" Delay-Load Directory Table Entry {i}");
|
||||
Console.WriteLine($" Attributes = {entry.Attributes}");
|
||||
Console.WriteLine($" Name RVA = {entry.Name}");
|
||||
Console.WriteLine($" Module handle = {entry.ModuleHandle}");
|
||||
Console.WriteLine($" Delay import address table RVA = {entry.DelayImportAddressTable}");
|
||||
Console.WriteLine($" Delay import name table RVA = {entry.DelayImportNameTable}");
|
||||
Console.WriteLine($" Bound delay import table RVA = {entry.BoundDelayImportTable}");
|
||||
Console.WriteLine($" Unload delay import table RVA = {entry.UnloadDelayImportTable}");
|
||||
Console.WriteLine($" Timestamp = {entry.TimeStamp}");
|
||||
}
|
||||
Console.WriteLine($" Attributes = {executable.DelayLoadDirectoryTable.Attributes}");
|
||||
Console.WriteLine($" Name RVA = {executable.DelayLoadDirectoryTable.Name}");
|
||||
Console.WriteLine($" Module handle = {executable.DelayLoadDirectoryTable.ModuleHandle}");
|
||||
Console.WriteLine($" Delay import address table RVA = {executable.DelayLoadDirectoryTable.DelayImportAddressTable}");
|
||||
Console.WriteLine($" Delay import name table RVA = {executable.DelayLoadDirectoryTable.DelayImportNameTable}");
|
||||
Console.WriteLine($" Bound delay import table RVA = {executable.DelayLoadDirectoryTable.BoundDelayImportTable}");
|
||||
Console.WriteLine($" Unload delay import table RVA = {executable.DelayLoadDirectoryTable.UnloadDelayImportTable}");
|
||||
Console.WriteLine($" Timestamp = {executable.DelayLoadDirectoryTable.TimeStamp}");
|
||||
}
|
||||
Console.WriteLine();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user