Update ldr.c

This commit is contained in:
lmdd 2023-06-29 15:43:25 +08:00 committed by GitHub
parent 54eda3ceea
commit 8c521e195f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 22 deletions

View File

@ -1095,28 +1095,9 @@ _FX void Ldr_MyDllCallbackA(const CHAR *ImageName, HMODULE ImageBase, BOOL LoadS
_FX void Ldr_MyDllCallbackW(const WCHAR *ImageName, HMODULE ImageBase, BOOL LoadState) // Windows XP
{
//
// invoke our sub-modules as necessary
//
DLL *dll = Ldr_Dlls;
while (dll->nameW) {
if (_wcsicmp(ImageName, dll->nameW) == 0 && (dll->state & 2) == 0) {
if (LoadState) {
BOOLEAN ok = dll->init_func(ImageBase);
if (!ok)
SbieApi_Log(2318, dll->nameW);
} else {
SbieDll_UnHookModule(ImageBase);
}
break;
}
++dll;
}
if (LoadState)
Ldr_DetectImageType(ImageName);
// Call New Func
// lmdd Changed
Ldr_MyDllCallbackNew(ImageName,ImageBase,LoadState);
}