DivaGL detection, Ada Lovelace "support"

This commit is contained in:
nastys
2024-03-26 00:25:30 +01:00
parent 360305357b
commit 2c10f27ab0
7 changed files with 164 additions and 106 deletions
@@ -294,6 +294,13 @@ BOOL APIENTRY DllMain(HMODULE hModule,
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
if (GetModuleHandleW(L"DivaGL.dva") != NULL)
{
// detected DivaGL
printf("[ShaderPatch] Detected DivaGL! Quitting!\n");
return TRUE;
}
// install a thunk to hook
InjectCode((void*)0x1405e5991, { 0x48, 0x83, 0xec, 0x28 }); // SUB RSP, 0x28
InjectCode((void*)0x1405e5995, { 0xe8, 0x56, 0xe8, 0xb9, 0xff }); // CALL 0x1401841f0