[DivaWig] Hook tertiary function
This commit is contained in:
@@ -39,6 +39,7 @@ using namespace std;
|
|||||||
|
|
||||||
void(__cdecl* originalWig)(void* cls, uint64_t unk, uint64_t unk2) = (void(__cdecl*)(void* cls, uint64_t unk, uint64_t unk2))0x14052AD90;
|
void(__cdecl* originalWig)(void* cls, uint64_t unk, uint64_t unk2) = (void(__cdecl*)(void* cls, uint64_t unk, uint64_t unk2))0x14052AD90;
|
||||||
void(__cdecl* originalSec)(unsigned int* a1, unsigned int module_part) = (void(__cdecl*)(unsigned int* a1, unsigned int module_part))0x14052ADF0;
|
void(__cdecl* originalSec)(unsigned int* a1, unsigned int module_part) = (void(__cdecl*)(unsigned int* a1, unsigned int module_part))0x14052ADF0;
|
||||||
|
void(__cdecl* originalThi)(unsigned int* a1, unsigned int module_part) = (void(__cdecl*)(unsigned int* a1, unsigned int module_part))0x140521FA0;
|
||||||
void(__cdecl* pvTimerUpdate)(__int64 a1) = (void(__cdecl*)(__int64 a1))0x1405BDF90;
|
void(__cdecl* pvTimerUpdate)(__int64 a1) = (void(__cdecl*)(__int64 a1))0x1405BDF90;
|
||||||
void(__cdecl* unloadFunc)(uint64_t* classp, unsigned int unk, __int64 performer) = (void(__cdecl*)(uint64_t * classp, unsigned int unk, __int64 performer))0x14052F720;
|
void(__cdecl* unloadFunc)(uint64_t* classp, unsigned int unk, __int64 performer) = (void(__cdecl*)(uint64_t * classp, unsigned int unk, __int64 performer))0x14052F720;
|
||||||
void(__cdecl* loadFunc)(uint64_t* classp, unsigned int unk, __int64 performer) = (void(__cdecl*)(uint64_t * classp, unsigned int unk, __int64 performer))0x14052FC00;
|
void(__cdecl* loadFunc)(uint64_t* classp, unsigned int unk, __int64 performer) = (void(__cdecl*)(uint64_t * classp, unsigned int unk, __int64 performer))0x14052FC00;
|
||||||
@@ -176,6 +177,12 @@ void hookedSec(unsigned int* a1, unsigned int module_part)
|
|||||||
originalSec(a1, module_part);
|
originalSec(a1, module_part);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void hookedThi(unsigned int* a1, unsigned int module_part)
|
||||||
|
{
|
||||||
|
if (part_to_update == ALL || part_to_update == module_part)
|
||||||
|
originalSec(a1, module_part);
|
||||||
|
}
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -188,6 +195,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
|
|||||||
cout << "[DivaWig] Hooking functions..." << endl;
|
cout << "[DivaWig] Hooking functions..." << endl;
|
||||||
DetourAttach(&(PVOID&)originalWig, (PVOID)hookedWig);
|
DetourAttach(&(PVOID&)originalWig, (PVOID)hookedWig);
|
||||||
DetourAttach(&(PVOID&)originalSec, (PVOID)hookedSec);
|
DetourAttach(&(PVOID&)originalSec, (PVOID)hookedSec);
|
||||||
|
DetourAttach(&(PVOID&)originalThi, (PVOID)hookedThi);
|
||||||
DetourAttach(&(PVOID&)pvTimerUpdate, (PVOID)inputLoop);
|
DetourAttach(&(PVOID&)pvTimerUpdate, (PVOID)inputLoop);
|
||||||
cout << "[DivaWig] Functions hooked." << endl;
|
cout << "[DivaWig] Functions hooked." << endl;
|
||||||
DetourTransactionCommit();
|
DetourTransactionCommit();
|
||||||
|
|||||||
Reference in New Issue
Block a user