2022-02-18 14:00:58 +01:00
|
|
|
#pragma once
|
|
|
|
|
2022-04-09 02:18:57 +02:00
|
|
|
/* ==== PRX ============================================================================================================================================================= */
|
2022-04-18 03:35:08 +02:00
|
|
|
inline CMemory p_exit_or_terminate_process;
|
|
|
|
inline auto v_exit_or_terminate_process = p_exit_or_terminate_process.RCast<void(*)(UINT uExitCode)>();
|
2022-02-18 14:00:58 +01:00
|
|
|
|
|
|
|
void PRX_Attach();
|
|
|
|
void PRX_Detach();
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2022-05-13 14:53:25 +02:00
|
|
|
class VPRX : public IDetour
|
2022-02-18 14:00:58 +01:00
|
|
|
{
|
2022-04-11 01:44:30 +02:00
|
|
|
virtual void GetAdr(void) const
|
2022-02-18 14:00:58 +01:00
|
|
|
{
|
2022-05-13 14:53:25 +02:00
|
|
|
spdlog::debug("| FUN: exit_or_terminate_process : {:#18x} |\n", p_exit_or_terminate_process.GetPtr());
|
|
|
|
spdlog::debug("+----------------------------------------------------------------+\n");
|
2022-02-18 14:00:58 +01:00
|
|
|
}
|
2022-04-18 03:35:08 +02:00
|
|
|
virtual void GetFun(void) const
|
|
|
|
{
|
2022-12-01 22:44:55 +01:00
|
|
|
p_exit_or_terminate_process = g_GameDll.FindPatternSIMD("40 53 48 83 EC 20 8B D9 E8 ?? ?? ?? ?? 84 C0");
|
2022-04-18 03:35:08 +02:00
|
|
|
v_exit_or_terminate_process = p_exit_or_terminate_process.RCast<void(*)(UINT uExitCode)>(); /*40 53 48 83 EC 20 8B D9 E8 ? ? ? ? 84 C0 */
|
|
|
|
}
|
2022-04-11 01:44:30 +02:00
|
|
|
virtual void GetVar(void) const { }
|
|
|
|
virtual void GetCon(void) const { }
|
|
|
|
virtual void Attach(void) const { }
|
|
|
|
virtual void Detach(void) const { }
|
2022-02-18 14:00:58 +01:00
|
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2022-05-13 14:53:25 +02:00
|
|
|
REGISTER(VPRX);
|