From d9c25c786bdaa41dbd07feb631dbe285603deb11 Mon Sep 17 00:00:00 2001 From: Oleksii Shevchuk Date: Mon, 23 Sep 2019 18:13:59 +0300 Subject: [PATCH] windows/memimporter: use MyLoadLibrary during imports --- client/sources/MyLoadLibrary.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/sources/MyLoadLibrary.c b/client/sources/MyLoadLibrary.c index fb221304..3485b64f 100644 --- a/client/sources/MyLoadLibrary.c +++ b/client/sources/MyLoadLibrary.c @@ -211,6 +211,10 @@ HMODULE MyGetModuleHandle(LPCSTR name) HMODULE MyLoadLibrary(LPCSTR name, void *bytes, void *dllmainArg) { + HMODULE hLoadedModule = MyGetModuleHandle(name); + if (hLoadedModule) + return hLoadedModule; + if (bytes) { HCUSTOMMODULE mod = MemoryLoadLibraryEx(bytes, _LoadLibrary,