2022-01-23 18:26:48 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2022-04-09 02:18:57 +02:00
|
|
|
/* ==== SV_MAIN ======================================================================================================================================================= */
|
2022-04-10 19:59:34 +02:00
|
|
|
inline CMemory p_SV_InitGameDLL = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x81\xEC\x00\x00\x00\x00\xE8\x00\x00\x00\x00\x80\x3D\x00\x00\x00\x00\x00\x0F\x85\x00\x00\x00\x00"), "xxx????x????xx?????xx????");
|
2022-04-09 06:05:47 +02:00
|
|
|
inline auto SV_InitGameDLL = p_SV_InitGameDLL.RCast<void(*)(float a1)>(); /*48 81 EC ? ? ? ? E8 ? ? ? ? 80 3D ? ? ? ? ? 0F 85 ? ? ? ?*/
|
2022-02-24 01:51:11 +01:00
|
|
|
|
2022-04-10 19:59:34 +02:00
|
|
|
inline CMemory p_SV_ShutdownGameDLL = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x83\xEC\x28\x80\x3D\x00\x00\x00\x00\x00\x0F\x84\x00\x00\x00\x00\x48\x8B\x0D\x00\x00\x00\x00\x48\x89\x5C\x24\x00"), "xxxxxx?????xx????xxx????xxxx?");
|
2022-04-09 06:05:47 +02:00
|
|
|
inline auto SV_ShutdownGameDLL = p_SV_ShutdownGameDLL.RCast<void(*)(void)>(); /*48 83 EC 28 80 3D ? ? ? ? ? 0F 84 ? ? ? ? 48 8B 0D ? ? ? ? 48 89 5C 24 ?*/
|
2022-02-19 02:31:16 +01:00
|
|
|
|
2022-04-10 19:59:34 +02:00
|
|
|
inline CMemory p_SV_CreateBaseline = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x83\xEC\x28\x48\x8B\x0D\x00\x00\x00\x00\x48\x85\xC9\x75\x07"), "xxxxxxx????xxxxx");
|
2022-04-09 06:05:47 +02:00
|
|
|
inline auto SV_CreateBaseline = p_SV_CreateBaseline.RCast<bool(*)(void)>(); /*48 83 EC 28 48 8B 0D ? ? ? ? 48 85 C9 75 07*/
|
2022-02-27 03:15:00 +01:00
|
|
|
|
2022-02-19 02:31:16 +01:00
|
|
|
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1)
|
2022-04-10 19:59:34 +02:00
|
|
|
inline CMemory CGameServer__SpawnServer = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x53\x55\x56\x57\x41\x55\x41\x56\x41\x57\x48\x81\xEC\x00\x00\x00\x00"), "xxxxxxxxxxxxxx????");
|
2022-02-19 02:31:16 +01:00
|
|
|
#elif defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
|
2022-04-10 19:59:34 +02:00
|
|
|
inline CMemory CGameServer__SpawnServer = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x8B\xC4\x53\x55\x56\x57\x41\x54\x41\x55\x41\x57"), "xxxxxxxxxxxxx");
|
2022-02-19 02:31:16 +01:00
|
|
|
// 0x140312D80 // 48 8B C4 53 55 56 57 41 54 41 55 41 57 //
|
|
|
|
#endif
|
2022-01-23 18:26:48 +01:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
2022-02-19 16:42:40 +01:00
|
|
|
class HSV_Main : public IDetour
|
2022-01-23 18:26:48 +01:00
|
|
|
{
|
|
|
|
virtual void debugp()
|
|
|
|
{
|
2022-02-27 03:15:00 +01:00
|
|
|
std::cout << "| FUN: SV_InitGameDLL : 0x" << std::hex << std::uppercase << p_SV_ShutdownGameDLL.GetPtr() << std::setw(npad) << " |" << std::endl;
|
2022-02-19 02:31:16 +01:00
|
|
|
std::cout << "| FUN: SV_ShutdownGameDLL : 0x" << std::hex << std::uppercase << p_SV_ShutdownGameDLL.GetPtr() << std::setw(npad) << " |" << std::endl;
|
2022-02-27 03:15:00 +01:00
|
|
|
std::cout << "| FUN: SV_CreateBaseline : 0x" << std::hex << std::uppercase << p_SV_CreateBaseline.GetPtr() << std::setw(npad) << " |" << std::endl;
|
2022-02-19 02:31:16 +01:00
|
|
|
std::cout << "| FUN: CGameServer::SpawnServer : 0x" << std::hex << std::uppercase << CGameServer__SpawnServer.GetPtr() << std::setw(npad) << " |" << std::endl;
|
2022-01-26 23:43:16 +01:00
|
|
|
std::cout << "+----------------------------------------------------------------+" << std::endl;
|
2022-01-23 18:26:48 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2022-02-19 16:42:40 +01:00
|
|
|
REGISTER(HSV_Main);
|