(no title)
hebelehubele | 2 months ago
#include <windows.h>
#include <detours.h>
static int (WINAPI *Real_EP_RegCheckKey)(LPCSTR, LPCSTR) = NULL;
int WINAPI Hooked_EP_RegCheckKey(LPCSTR name, LPCSTR key) {
return 1;
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved) {
if (reason == DLL_PROCESS_ATTACH) {
Sleep(2000);
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourAttach(&(PVOID&)Real_EP_RegCheckKey, Hooked_EP_RegCheckKey);
DetourTransactionCommit();
}
return TRUE;
}
No comments yet.