Add PhFindLoaderEntryNameHash
@@ -6312,6 +6312,30 @@ PLDR_DATA_TABLE_ENTRY PhFindLoaderEntry(
return result;
}
+PLDR_DATA_TABLE_ENTRY PhFindLoaderEntryNameHash(
+ _In_ ULONG BaseNameHash
+ )
+{
+ PLDR_DATA_TABLE_ENTRY entry;
+ PLIST_ENTRY listHead;
+ PLIST_ENTRY listEntry;
+
+ listHead = &NtCurrentPeb()->Ldr->InLoadOrderModuleList;
+ listEntry = listHead->Flink;
+
+ while (listEntry != listHead)
+ {
+ entry = CONTAINING_RECORD(listEntry, LDR_DATA_TABLE_ENTRY, InLoadOrderLinks);
+
+ if (entry->BaseNameHashValue == BaseNameHash)
+ return entry;
+
+ listEntry = listEntry->Flink;
+ }
+
+ return NULL;
+}
+
/**
* Retrieves the file name of a DLL loaded by the current process.
*
