fix finding js hook

This commit is contained in:
Akash Mozumdar 2019-08-06 11:53:38 -04:00
parent 4ab197c374
commit 29367928c3

View File

@ -65,22 +65,8 @@ bool DeterminePCEngine()
else for (int i = 0; i < 50; ++i) else for (int i = 0; i < 50; ++i)
if (HMODULE module = GetModuleHandleW((DXVersion + L"_" + std::to_wstring(i)).c_str())) PcHooks::hookD3DXFunctions(module); if (HMODULE module = GetModuleHandleW((DXVersion + L"_" + std::to_wstring(i)).c_str())) PcHooks::hookD3DXFunctions(module);
if (GetProcAddress((HMODULE)processStartAddress, "?Write@String@v8@@QBEHPAGHHH@Z")) for (HMODULE module : Array<HMODULE>{ (HMODULE)processStartAddress, GetModuleHandleW(L"node.dll"), GetModuleHandleW(L"nw.dll") })
{ if (GetProcAddress(module, "?Write@String@v8@@QBEHPAGHHH@Z")) return InsertV8Hook(module);
InsertV8Hook((HMODULE)processStartAddress);
return true;
}
if (HMODULE module = GetModuleHandleW(L"node.dll"))
{
InsertV8Hook(module);
return true;
}
if (HMODULE module = GetModuleHandleW(L"nw.dll"))
{
InsertV8Hook(module);
return true;
}
if (InsertMonoHooks()) { if (InsertMonoHooks()) {
return true; return true;