From 53a6588054c89bf769a2830415d97ea36dacc2a9 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sat, 5 Nov 2022 21:49:34 -0700 Subject: [PATCH] Add PE hint name table entries --- .../PortableExecutable/Executable.cs | 2 +- .../PortableExecutable/HintNameTableEntry.cs | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 BurnOutSharp.Models/PortableExecutable/HintNameTableEntry.cs diff --git a/BurnOutSharp.Models/PortableExecutable/Executable.cs b/BurnOutSharp.Models/PortableExecutable/Executable.cs index 830b9e08..57c0a589 100644 --- a/BurnOutSharp.Models/PortableExecutable/Executable.cs +++ b/BurnOutSharp.Models/PortableExecutable/Executable.cs @@ -56,6 +56,6 @@ namespace BurnOutSharp.Models.PortableExecutable /// public DelayLoadDirectoryTableEntry[] DelayLoadDirectoryTable { get; set; } - // TODO: Left off at "Import Lookup Table" + // TODO: Left off at "The .pdata Section" } } diff --git a/BurnOutSharp.Models/PortableExecutable/HintNameTableEntry.cs b/BurnOutSharp.Models/PortableExecutable/HintNameTableEntry.cs new file mode 100644 index 00000000..d6b46eda --- /dev/null +++ b/BurnOutSharp.Models/PortableExecutable/HintNameTableEntry.cs @@ -0,0 +1,23 @@ +namespace BurnOutSharp.Models.PortableExecutable +{ + /// + /// One hint/name table suffices for the entire import section. + /// + /// + public class HintNameTableEntry + { + /// + /// An index into the export name pointer table. A match is attempted first + /// with this value. If it fails, a binary search is performed on the DLL's + /// export name pointer table. + /// + public ushort Hint; + + /// + /// An ASCII string that contains the name to import. This is the string that + /// must be matched to the public name in the DLL. This string is case sensitive + /// and terminated by a null byte. + /// + public byte[] Name; + } +}