Start of migration to IDetour interface

Migrating to this to initialize all patterns and prototypes in Systems_Init() instead.
This should make debugging missing/not found patterns easier and allow for opting out variable/constant search (some of these require other patterns to be found, thus resulting in seg faults..).

Also added check to detect if user has a eligible CPU to run this SDK.
The game requires SSE and SSE2 instruction sets. Our SDK requires this too due to the use of SSE intrinsics, so we cannot let the game handle this. We have to check it ourselves.
This commit is contained in:
Kawe Mazidjatari 2022-04-11 01:44:30 +02:00
parent 8c1dfb50f4
commit 092b7e9d43
66 changed files with 716 additions and 323 deletions

View File

@ -34,11 +34,16 @@ void BspLib_Detach();
///////////////////////////////////////////////////////////////////////////////
class HBspLib : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CalcPropStaticFrustumCulling : 0x" << std::hex << std::uppercase << p_CalcPropStaticFrustumCulling.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CalcPropStaticFrustumCulling : 0x" << std::hex << std::uppercase << p_CalcPropStaticFrustumCulling.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -74,15 +74,20 @@ void CHLClient_Detach();
///////////////////////////////////////////////////////////////////////////////
class HDll_Engine_Int : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CHLClient::PostInit : 0x" << std::hex << std::uppercase << p_CHLClient_PostInit.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CHLClient::LevelShutdown : 0x" << std::hex << std::uppercase << p_CHLClient_LevelShutdown.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CHLClient::HudProcessInput : 0x" << std::hex << std::uppercase << p_CHLClient_HudProcessInput.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CHLClient::FrameStageNotify : 0x" << std::hex << std::uppercase << p_CHLClient_FrameStageNotify.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CHLClient::PostInit : 0x" << std::hex << std::uppercase << p_CHLClient_PostInit.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CHLClient::LevelShutdown : 0x" << std::hex << std::uppercase << p_CHLClient_LevelShutdown.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CHLClient::HudProcessInput : 0x" << std::hex << std::uppercase << p_CHLClient_HudProcessInput.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CHLClient::FrameStageNotify : 0x" << std::hex << std::uppercase << p_CHLClient_FrameStageNotify.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: cl_time_use_host_tickcount : 0x" << std::hex << std::uppercase << cl_time_use_host_tickcount << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -11,12 +11,17 @@ extern bool* m_bRestrictServerCommands;
///////////////////////////////////////////////////////////////////////////////
class HVEngineClient : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: IVEngineClient::CommandExecute : 0x" << std::hex << std::uppercase << p_IVEngineClient_CommandExecute.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: IVEngineClient::CommandExecute : 0x" << std::hex << std::uppercase << p_IVEngineClient_CommandExecute.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: m_bRestrictServerCommands : 0x" << std::hex << std::uppercase << m_bRestrictServerCommands << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -36,11 +36,16 @@ inline CMemory MM_Heartbeat__ToString = g_mGameDll.FindPatternSIMD(reinterpret_c
///////////////////////////////////////////////////////////////////////////////
class HMM_Heartbeat : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: MM_Heartbeat::ToString : 0x" << std::hex << std::uppercase << MM_Heartbeat__ToString.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: MM_Heartbeat::ToString : 0x" << std::hex << std::uppercase << MM_Heartbeat__ToString.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -117,36 +117,41 @@ inline CMemory g_pClientSP = g_mGameDll.FindStringReadOnly("vpk/client_sp
///////////////////////////////////////////////////////////////////////////////
class HOpcodes : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CShaderSystem::Init : 0x" << std::hex << std::uppercase << CShaderSystem__Init.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CShaderSystem::Init : 0x" << std::hex << std::uppercase << CShaderSystem__Init.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
std::cout << "| FUN: CVGui::RunFrame : 0x" << std::hex << std::uppercase << CVGui__RunFrame.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CVGui::RunFrame : 0x" << std::hex << std::uppercase << CVGui__RunFrame.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
std::cout << "| FUN: CEngineVGui::Shutdown : 0x" << std::hex << std::uppercase << CEngineVGui__Shutdown.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CEngineVGui::ActivateGameUI : 0x" << std::hex << std::uppercase << CEngineVGui__ActivateGameUI.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CEngineVGui::Shutdown : 0x" << std::hex << std::uppercase << CEngineVGui__Shutdown.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CEngineVGui::ActivateGameUI : 0x" << std::hex << std::uppercase << CEngineVGui__ActivateGameUI.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
std::cout << "| FUN: Sys_InitGame : 0x" << std::hex << std::uppercase << Sys_InitGame.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Sys_InitGame : 0x" << std::hex << std::uppercase << Sys_InitGame.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
std::cout << "| FUN: Host_Init_0 : 0x" << std::hex << std::uppercase << gHost_Init_0.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Host_Init_1 : 0x" << std::hex << std::uppercase << gHost_Init_1.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Host_Init_2 : 0x" << std::hex << std::uppercase << gHost_Init_2.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Host_Disconnect : 0x" << std::hex << std::uppercase << Host_Disconnect.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: _Host_RunFrame : 0x" << std::hex << std::uppercase << _Host_RunFrame.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Host_Init_0 : 0x" << std::hex << std::uppercase << gHost_Init_0.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: Host_Init_1 : 0x" << std::hex << std::uppercase << gHost_Init_1.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: Host_Init_2 : 0x" << std::hex << std::uppercase << gHost_Init_2.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: Host_Disconnect : 0x" << std::hex << std::uppercase << Host_Disconnect.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: _Host_RunFrame : 0x" << std::hex << std::uppercase << _Host_RunFrame.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
std::cout << "| FUN: Server_S2C_CONNECT_1 : 0x" << std::hex << std::uppercase << Server_S2C_CONNECT_1.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: UpdateCurrentVideoConfig : 0x" << std::hex << std::uppercase << UpdateCurrentVideoConfig.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: HandleConfigFile : 0x" << std::hex << std::uppercase << HandleConfigFile.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: ResetPreviousGameState : 0x" << std::hex << std::uppercase << ResetPreviousGameState.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Server_S2C_CONNECT_1 : 0x" << std::hex << std::uppercase << Server_S2C_CONNECT_1.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: UpdateCurrentVideoConfig : 0x" << std::hex << std::uppercase << UpdateCurrentVideoConfig.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: HandleConfigFile : 0x" << std::hex << std::uppercase << HandleConfigFile.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: ResetPreviousGameState : 0x" << std::hex << std::uppercase << ResetPreviousGameState.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
std::cout << "| CON: g_pClientVPKDir : 0x" << std::hex << std::uppercase << g_pClientVPKDir.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| CON: g_pClientBSP : 0x" << std::hex << std::uppercase << g_pClientBSP.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| CON: g_pClientCommonBSP : 0x" << std::hex << std::uppercase << g_pClientCommonBSP.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| CON: g_pClientMPLobby : 0x" << std::hex << std::uppercase << g_pClientMPLobby.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| CON: g_pClientMP : 0x" << std::hex << std::uppercase << g_pClientMP.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| CON: g_pClientSP : 0x" << std::hex << std::uppercase << g_pClientSP.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| CON: g_pClientVPKDir : 0x" << std::hex << std::uppercase << g_pClientVPKDir.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| CON: g_pClientBSP : 0x" << std::hex << std::uppercase << g_pClientBSP.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| CON: g_pClientCommonBSP : 0x" << std::hex << std::uppercase << g_pClientCommonBSP.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| CON: g_pClientMPLobby : 0x" << std::hex << std::uppercase << g_pClientMPLobby.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| CON: g_pClientMP : 0x" << std::hex << std::uppercase << g_pClientMP.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| CON: g_pClientSP : 0x" << std::hex << std::uppercase << g_pClientSP.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -6,6 +6,7 @@
#include "core/stdafx.h"
#include "core/init.h"
#include "tier0/cpu.h"
#include "tier0/commandline.h"
#include "tier1/cmd.h"
#include "tier1/IConVar.h"
@ -104,13 +105,17 @@
void Systems_Init()
{
// Initialize winsock system
WSAData wsaData{};
int nError = ::WSAStartup(MAKEWORD(2, 2), &wsaData);
if (nError != 0)
CheckCPU();
for (IDetour* pdetour : vDetour)
{
std::cerr << "Failed to start Winsock via WSAStartup: (" << NET_ErrorString(WSAGetLastError()) << ")" << std::endl;
pdetour->GetFun();
pdetour->GetVar();
pdetour->GetCon();
}
// Initialize WinSock system.
WS_Init();
// Begin the detour transaction to hook the the process
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
@ -206,12 +211,8 @@ void Systems_Init()
void Systems_Shutdown()
{
// Shutdown winsock system
int nError = ::WSACleanup();
if (nError != 0)
{
std::cerr << "Failed to stop winsock via WSACleanup: (" << NET_ErrorString(WSAGetLastError()) << ")" << std::endl;
}
// Shutdown WinSock system.
WS_Shutdown();
// Begin the detour transaction to unhook the the process
DetourTransactionBegin();
@ -282,22 +283,51 @@ void Systems_Shutdown()
DetourTransactionCommit();
}
//////////////////////////////////////////////////////////
/////////////////////////////////////////////////////
//
// ██████╗ ███████╗███████╗██╗ ██╗██╗ ████████╗███████╗
// ██╔══██╗██╔════╝██╔════╝██║ ██║██║ ╚══██╔══╝██╔════
// ██████╔╝█████╗ ███████╗██║ ██║██║ ██║ ███████╗
// ██╔══██╗██╔══╝ ╚════██║██║ ██║██║ ██║ ╚════██║
// ██║ ██║███████╗███████║╚██████╔╝███████╗██║ ███████║
// ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═════╝ ╚══════╝╚═╝ ╚══════╝
// ██╗ ██╗████████╗██╗██╗ ██╗████████╗██╗ ██╗
// ██║ ██║╚══██╔══╝██║██║ ██║╚══██╔══╝╚██╗ ██╔
// ██║ ██║ ██║ ██║██║ ██║ ██║ ╚████╔╝
// ██║ ██║ ██║ ██║██║ ██║ ██║ ╚██╔╝
// ╚██████╔╝ ██║ ██║███████╗██║ ██║ ██║
// ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝
//
//////////////////////////////////////////////////////////
/////////////////////////////////////////////////////
void WS_Init()
{
WSAData wsaData{};
int nError = ::WSAStartup(MAKEWORD(2, 2), &wsaData);
if (nError != 0)
{
std::cerr << "Failed to start Winsock via WSAStartup: (" << NET_ErrorString(WSAGetLastError()) << ")" << std::endl;
}
}
void WS_Shutdown()
{
int nError = ::WSACleanup();
if (nError != 0)
{
std::cerr << "Failed to stop winsock via WSACleanup: (" << NET_ErrorString(WSAGetLastError()) << ")" << std::endl;
}
}
void CheckCPU()
{
const CPUInformation& pi = GetCPUInformation();
if ((pi.m_bSSE && pi.m_bSSE2))
{
if (MessageBoxA(NULL, "SSE and SSE2 are required.", "SDK Error", MB_ICONERROR | MB_OK))
{
TerminateProcess(GetCurrentProcess(), 0xBAD0C0DE);
}
}
}
void PrintHAddress() // Test the sigscan results
{
std::cout << "+----------------------------------------------------------------+" << std::endl;
for (IDetour* pdetour : vdetour)
for (IDetour* pdetour : vDetour)
{
pdetour->debugp();
pdetour->GetAdr();
}
}

View File

@ -10,4 +10,8 @@ void R5Dev_Shutdown();
void Systems_Init();
void Systems_Shutdown();
void WS_Init();
void WS_Shutdown();
void CheckCPU();
void PrintHAddress();

View File

@ -28,18 +28,23 @@ void EbisuSDK_Detach();
///////////////////////////////////////////////////////////////////////////////
class HEbisuSDK : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
#ifdef DEDICATED
std::cout << "| FUN: EbisuSDK_Init_Tier0 : 0x" << std::hex << std::uppercase << p_EbisuSDK_Init_Tier0.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: EbisuSDK_CVar_Init : 0x" << std::hex << std::uppercase << p_EbisuSDK_CVar_Init.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: EbisuSDK_SetState : 0x" << std::hex << std::uppercase << p_EbisuSDK_SetState.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: EbisuSDK_Init_Tier0 : 0x" << std::hex << std::uppercase << p_EbisuSDK_Init_Tier0.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: EbisuSDK_CVar_Init : 0x" << std::hex << std::uppercase << p_EbisuSDK_CVar_Init.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: EbisuSDK_SetState : 0x" << std::hex << std::uppercase << p_EbisuSDK_SetState.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_bEbisuSDKInitialized : 0x" << std::hex << std::uppercase << g_bEbisuSDKInitialized << std::setw(0) << " |" << std::endl;
std::cout << "| VAR: g_bEbisuSDKCvarInitialized : 0x" << std::hex << std::uppercase << g_bEbisuSDKCvarInitialized << std::setw(0) << " |" << std::endl;
std::cout << "| VAR: g_qEbisuSDKCvarInitialized : 0x" << std::hex << std::uppercase << g_qEbisuSDKCvarInitialized << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
#endif // DEDICATED
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -93,13 +93,18 @@ void CBaseClient_Detach();
///////////////////////////////////////////////////////////////////////////////
class HBaseClient : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| VAR: g_pClient : 0x" << std::hex << std::uppercase << g_pClient << std::setw(0) << " |" << std::endl;
std::cout << "| FUN: CBaseClient::Connect : 0x" << std::hex << std::uppercase << p_CBaseClient_Connect.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CBaseClient::Clear : 0x" << std::hex << std::uppercase << p_CBaseClient_Clear.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CBaseClient::Connect : 0x" << std::hex << std::uppercase << p_CBaseClient_Connect.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CBaseClient::Clear : 0x" << std::hex << std::uppercase << p_CBaseClient_Clear.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -37,13 +37,18 @@ extern CBaseClientState* g_pBaseClientState;
///////////////////////////////////////////////////////////////////////////////
class HClientState : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
//std::cout << "| FUN: CClientState::CheckForResend : 0x" << std::hex << std::uppercase << p_CClientState__CheckForResend.GetPtr() << std::setw(npad) << " |" << std::endl;
//std::cout << "| FUN: CClientState::CheckForResend : 0x" << std::hex << std::uppercase << p_CClientState__CheckForResend.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: cl_m_bPaused : 0x" << std::hex << std::uppercase << cl_m_bPaused << std::setw(0) << " |" << std::endl;
std::cout << "| FUN: cl_host_tickcount : 0x" << std::hex << std::uppercase << cl_host_tickcount << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: cl_host_tickcount : 0x" << std::hex << std::uppercase << cl_host_tickcount << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -11,10 +11,15 @@ extern CBaseServer* g_pServer;
///////////////////////////////////////////////////////////////////////////////
class HBaseServer : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
//std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -10,13 +10,18 @@ inline CMemory CL_ClearState = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_
///////////////////////////////////////////////////////////////////////////////
class HCL_Main : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
#if defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
std::cout << "| FUN: CL_ClearState : 0x" << std::hex << std::uppercase << CL_ClearState.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CL_ClearState : 0x" << std::hex << std::uppercase << CL_ClearState.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
#endif // GAMEDLL_S2 || GAMEDLL_S3
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -12,11 +12,16 @@ void MOD_PreloadPak(const string& svSetFile);
///////////////////////////////////////////////////////////////////////////////
class HModel_BSP : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CollisionBSPData_LinkPhysics : 0x" << std::hex << std::uppercase << p_CollisionBSPData_LinkPhysics.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CollisionBSPData_LinkPhysics : 0x" << std::hex << std::uppercase << p_CollisionBSPData_LinkPhysics.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -7,11 +7,16 @@ inline auto COM_ExplainDisconnection = p_COM_ExplainDisconnection.RCast<void* (*
///////////////////////////////////////////////////////////////////////////////
class HCommon : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: COM_ExplainDisconnection : 0x" << std::hex << std::uppercase << p_COM_ExplainDisconnection.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: COM_ExplainDisconnection : 0x" << std::hex << std::uppercase << p_COM_ExplainDisconnection.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -135,12 +135,12 @@ inline int* overlay_tickcount = p_DrawAllOverlays.Offset(0x70).FindPatternSelf("
///////////////////////////////////////////////////////////////////////////////
class HDebugOverlay : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: DrawAllOverlays : 0x" << std::hex << std::uppercase << p_DrawAllOverlays.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: RenderBox : 0x" << std::hex << std::uppercase << p_RenderBox.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: RenderLine : 0x" << std::hex << std::uppercase << p_RenderLine.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: DestroyOverlay : 0x" << std::hex << std::uppercase << p_DestroyOverlay.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: DrawAllOverlays : 0x" << std::hex << std::uppercase << p_DrawAllOverlays.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: RenderBox : 0x" << std::hex << std::uppercase << p_RenderBox.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: RenderLine : 0x" << std::hex << std::uppercase << p_RenderLine.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: DestroyOverlay : 0x" << std::hex << std::uppercase << p_DestroyOverlay.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: s_pOverlays : 0x" << std::hex << std::uppercase << s_pOverlays << std::setw(0) << " |" << std::endl;
std::cout << "| VAR: s_OverlayMutex : 0x" << std::hex << std::uppercase << s_OverlayMutex << std::setw(0) << " |" << std::endl;
std::cout << "| VAR: client_debugdraw_int_unk : 0x" << std::hex << std::uppercase << client_debugdraw_int_unk << std::setw(0) << " |" << std::endl;
@ -149,6 +149,11 @@ class HDebugOverlay : public IDetour
std::cout << "| VAR: render_tickcount : 0x" << std::hex << std::uppercase << render_tickcount << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -7,11 +7,16 @@ inline CMemory InitMaterialSystem = g_mGameDll.FindPatternSIMD(reinterpret_cast<
///////////////////////////////////////////////////////////////////////////////
class HGL_MatSysIFace : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: InitMaterialSystem : 0x" << std::hex << std::uppercase << InitMaterialSystem.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: InitMaterialSystem : 0x" << std::hex << std::uppercase << InitMaterialSystem.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -24,13 +24,18 @@ void SCR_EndLoadingPlaque(void);
///////////////////////////////////////////////////////////////////////////////
class HGL_Screen : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: SCR_BeginLoadingPlaque : 0x" << std::hex << std::uppercase << SCR_BeginLoadingPlaque.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SCR_BeginLoadingPlaque : 0x" << std::hex << std::uppercase << SCR_BeginLoadingPlaque.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: scr_drawloading : 0x" << std::hex << std::uppercase << scr_drawloading << std::setw(0) << " |" << std::endl;
std::cout << "| VAR: scr_engineevent_loadingstarted : 0x" << std::hex << std::uppercase << scr_engineevent_loadingstarted << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -39,15 +39,20 @@ inline static CMemory g_pEngineParmsBuffer = p_CModAppSystemGroup_Main.Offset(0x
///////////////////////////////////////////////////////////////////////////////
class HHostCmd : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: Host_Init : 0x" << std::hex << std::uppercase << p_Host_Init.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Host_NewGame : 0x" << std::hex << std::uppercase << p_Host_NewGame.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: malloc_internal : 0x" << std::hex << std::uppercase << p_malloc_internal.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pEngineParms : 0x" << std::hex << std::uppercase << g_pEngineParmsBuffer.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pMallocPool : 0x" << std::hex << std::uppercase << g_pMallocPool.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Host_Init : 0x" << std::hex << std::uppercase << p_Host_Init.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: Host_NewGame : 0x" << std::hex << std::uppercase << p_Host_NewGame.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: malloc_internal : 0x" << std::hex << std::uppercase << p_malloc_internal.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pEngineParms : 0x" << std::hex << std::uppercase << g_pEngineParmsBuffer.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pMallocPool : 0x" << std::hex << std::uppercase << g_pMallocPool.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -81,12 +81,17 @@ extern CHostState* g_pHostState;
///////////////////////////////////////////////////////////////////////////////
class HHostState : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CHostState::FrameUpdate : 0x" << std::hex << std::uppercase << p_CHostState_FrameUpdate.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CHostState::FrameUpdate : 0x" << std::hex << std::uppercase << p_CHostState_FrameUpdate.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pHostState : 0x" << std::hex << std::uppercase << g_pHostState << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -38,15 +38,20 @@ void CModelLoader_Detach();
///////////////////////////////////////////////////////////////////////////////
class HModelLoader : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CModelLoader::FindModel : 0x" << std::hex << std::uppercase << p_CModelLoader__FindModel.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CModelLoader::LoadModel : 0x" << std::hex << std::uppercase << p_CModelLoader__LoadModel.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CModelLoader::UnloadModel : 0x" << std::hex << std::uppercase << p_CModelLoader__UnloadModel.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CModelLoader::Map_LoadModelGuts : 0x" << std::hex << std::uppercase << p_CModelLoader__Map_LoadModelGuts.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CModelLoader::Studio_LoadModel : 0x" << std::hex << std::uppercase << p_CModelLoader__Studio_LoadModel.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CModelLoader::FindModel : 0x" << std::hex << std::uppercase << p_CModelLoader__FindModel.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CModelLoader::LoadModel : 0x" << std::hex << std::uppercase << p_CModelLoader__LoadModel.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CModelLoader::UnloadModel : 0x" << std::hex << std::uppercase << p_CModelLoader__UnloadModel.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CModelLoader::Map_LoadModelGuts : 0x" << std::hex << std::uppercase << p_CModelLoader__Map_LoadModelGuts.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CModelLoader::Studio_LoadModel : 0x" << std::hex << std::uppercase << p_CModelLoader__Studio_LoadModel.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -52,17 +52,22 @@ extern uintptr_t g_pNetKey;
///////////////////////////////////////////////////////////////////////////////
class HNetChan : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: NET_Init : 0x" << std::hex << std::uppercase << p_NET_Init.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: NET_Shutdown : 0x" << std::hex << std::uppercase << p_NET_Shutdown.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: NET_SetKey : 0x" << std::hex << std::uppercase << p_NET_SetKey.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: NET_ReceiveDatagram : 0x" << std::hex << std::uppercase << p_NET_ReceiveDatagram.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: NET_SendDatagram : 0x" << std::hex << std::uppercase << p_NET_SendDatagram.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: NET_PrintFunc : 0x" << std::hex << std::uppercase << p_NET_PrintFunc.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pNetKey : 0x" << std::hex << std::uppercase << g_pNetKey << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: NET_Init : 0x" << std::hex << std::uppercase << p_NET_Init.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: NET_Shutdown : 0x" << std::hex << std::uppercase << p_NET_Shutdown.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: NET_SetKey : 0x" << std::hex << std::uppercase << p_NET_SetKey.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: NET_ReceiveDatagram : 0x" << std::hex << std::uppercase << p_NET_ReceiveDatagram.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: NET_SendDatagram : 0x" << std::hex << std::uppercase << p_NET_SendDatagram.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: NET_PrintFunc : 0x" << std::hex << std::uppercase << p_NET_PrintFunc.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pNetKey : 0x" << std::hex << std::uppercase << g_pNetKey << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////
REGISTER(HNetChan);

View File

@ -26,14 +26,19 @@ inline CMemory CGameServer__SpawnServer = g_mGameDll.FindPatternSIMD(reinterpret
///////////////////////////////////////////////////////////////////////////////
class HSV_Main : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: SV_InitGameDLL : 0x" << std::hex << std::uppercase << p_SV_ShutdownGameDLL.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SV_ShutdownGameDLL : 0x" << std::hex << std::uppercase << p_SV_ShutdownGameDLL.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SV_CreateBaseline : 0x" << std::hex << std::uppercase << p_SV_CreateBaseline.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CGameServer::SpawnServer : 0x" << std::hex << std::uppercase << CGameServer__SpawnServer.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SV_InitGameDLL : 0x" << std::hex << std::uppercase << p_SV_ShutdownGameDLL.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: SV_ShutdownGameDLL : 0x" << std::hex << std::uppercase << p_SV_ShutdownGameDLL.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: SV_CreateBaseline : 0x" << std::hex << std::uppercase << p_SV_CreateBaseline.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CGameServer::SpawnServer : 0x" << std::hex << std::uppercase << CGameServer__SpawnServer.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -16,12 +16,17 @@ void SysDll_Detach();
///////////////////////////////////////////////////////////////////////////////
class HSys_Dll : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: Sys_Error_Internal : 0x" << std::hex << std::uppercase << p_Sys_Error_Internal.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Sys_Error_Internal : 0x" << std::hex << std::uppercase << p_Sys_Error_Internal.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: gfExtendedError : 0x" << std::hex << std::uppercase << gfExtendedError << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -33,14 +33,19 @@ inline CMemory g_pMapVPKCache = p_PakFile_Init.FindPatternSelf("48 8D 1D ?? ?? ?
///////////////////////////////////////////////////////////////////////////////
class HSys_Dll2 : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CEngineAPI::Connect : 0x" << std::hex << std::uppercase << p_CEngineAPI_Connect.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CEngineAPI::MainLoop : 0x" << std::hex << std::uppercase << p_CEngineAPI_MainLoop.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: PakFile_Init : 0x" << std::hex << std::uppercase << p_PakFile_Init.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pMapVPKCache : 0x" << std::hex << std::uppercase << g_pMapVPKCache.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CEngineAPI::Connect : 0x" << std::hex << std::uppercase << p_CEngineAPI_Connect.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CEngineAPI::MainLoop : 0x" << std::hex << std::uppercase << p_CEngineAPI_MainLoop.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: PakFile_Init : 0x" << std::hex << std::uppercase << p_PakFile_Init.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pMapVPKCache : 0x" << std::hex << std::uppercase << g_pMapVPKCache.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -66,11 +66,16 @@ inline static CMemory g_pEngineBuffer = p_CModAppSystemGroup_Main.Offset(0x0).Fi
///////////////////////////////////////////////////////////////////////////////
class HEngine : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| VAR: g_pEngine : 0x" << std::hex << std::uppercase << g_pEngineBuffer.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pEngine : 0x" << std::hex << std::uppercase << g_pEngineBuffer.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -17,11 +17,16 @@ void HCVideoMode_Common_Detach();
///////////////////////////////////////////////////////////////////////////////
class HVideoMode_Common : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CVideoMode_Common::CreateGameWindow : 0x" << std::hex << std::uppercase << p_CVideoMode_Common__CreateGameWindow.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CVideoMode_Common::CreateGameWindow : 0x" << std::hex << std::uppercase << p_CVideoMode_Common__CreateGameWindow.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -76,15 +76,20 @@ void SysUtils_Detach();
///////////////////////////////////////////////////////////////////////////////
class HSys_Utils : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: Sys_Error : 0x" << std::hex << std::uppercase << p_Sys_Error.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Sys_Warning : 0x" << std::hex << std::uppercase << p_Warning.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Sys_LoadAssetHelper : 0x" << std::hex << std::uppercase << p_Sys_LoadAssetHelper.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Con_NPrintf : 0x" << std::hex << std::uppercase << p_Con_NPrintf.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: MemAlloc_Wrapper : 0x" << std::hex << std::uppercase << p_MemAlloc_Wrapper.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Sys_Error : 0x" << std::hex << std::uppercase << p_Sys_Error.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: Sys_Warning : 0x" << std::hex << std::uppercase << p_Warning.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: Sys_LoadAssetHelper : 0x" << std::hex << std::uppercase << p_Sys_LoadAssetHelper.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: Con_NPrintf : 0x" << std::hex << std::uppercase << p_Con_NPrintf.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: MemAlloc_Wrapper : 0x" << std::hex << std::uppercase << p_MemAlloc_Wrapper.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -34,14 +34,19 @@ void CBaseFileSystem_Detach();
///////////////////////////////////////////////////////////////////////////////
class HBaseFileSystem : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CBaseFileSystem::Warning : 0x" << std::hex << std::uppercase << p_CBaseFileSystem_Warning.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CBaseFileSystem::LoadFromVPK : 0x" << std::hex << std::uppercase << p_CBaseFileSystem_LoadFromVPK.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CBaseFileSystem::LoadFromCache : 0x" << std::hex << std::uppercase << p_CBaseFileSystem_LoadFromCache.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CBaseFileSystem::Warning : 0x" << std::hex << std::uppercase << p_CBaseFileSystem_Warning.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CBaseFileSystem::LoadFromVPK : 0x" << std::hex << std::uppercase << p_CBaseFileSystem_LoadFromVPK.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CBaseFileSystem::LoadFromCache : 0x" << std::hex << std::uppercase << p_CBaseFileSystem_LoadFromCache.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pFileSystem : 0x" << std::hex << std::uppercase << g_pFileSystem << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -35,11 +35,16 @@ extern CFileSystem_Stdio* g_pFileSystem_Stdio;
///////////////////////////////////////////////////////////////////////////////
class HFileSystem_Stdio : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| VAR: g_pFileSystem_Stdio : 0x" << std::hex << std::uppercase << g_pFileSystem_Stdio << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -53,11 +53,16 @@ inline auto v_CAI_Network__DebugConnectMsg = p_CAI_Network__DebugConnectMsg.RCas
///////////////////////////////////////////////////////////////////////////////
class HAI_Network : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CAI_Network::DebugConnectMsg : 0x" << std::hex << std::uppercase << p_CAI_Network__DebugConnectMsg.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CAI_Network::DebugConnectMsg : 0x" << std::hex << std::uppercase << p_CAI_Network__DebugConnectMsg.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -68,13 +68,18 @@ public:
///////////////////////////////////////////////////////////////////////////////
class HCAI_NetworkManager : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CAI_NetworkManager::LoadNetworkGraph : 0x" << std::hex << std::uppercase << p_CAI_NetworkManager__ShouldRebuild.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CAI_NetworkManager::ShouldRebuild : 0x" << std::hex << std::uppercase << p_CAI_NetworkManager__ShouldRebuild.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CAI_NetworkBuilder::Build : 0x" << std::hex << std::uppercase << p_CAI_NetworkBuilder__Build.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CAI_NetworkManager::LoadNetworkGraph : 0x" << std::hex << std::uppercase << p_CAI_NetworkManager__ShouldRebuild.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CAI_NetworkManager::ShouldRebuild : 0x" << std::hex << std::uppercase << p_CAI_NetworkManager__ShouldRebuild.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CAI_NetworkBuilder::Build : 0x" << std::hex << std::uppercase << p_CAI_NetworkBuilder__Build.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -16,13 +16,18 @@ inline auto dtNavMesh__isPolyReachable = p_dtNavMesh__isPolyReachable.RCast<bool
///////////////////////////////////////////////////////////////////////////////
class HRecast : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: dtNavMesh::Init : 0x" << std::hex << std::uppercase << p_dtNavMesh__Init.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: dtNavMesh::addTile : 0x" << std::hex << std::uppercase << p_dtNavMesh__addTile.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: dtNavMesh::isPolyReachable : 0x" << std::hex << std::uppercase << p_dtNavMesh__isPolyReachable.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: dtNavMesh::Init : 0x" << std::hex << std::uppercase << p_dtNavMesh__Init.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: dtNavMesh::addTile : 0x" << std::hex << std::uppercase << p_dtNavMesh__addTile.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: dtNavMesh::isPolyReachable : 0x" << std::hex << std::uppercase << p_dtNavMesh__isPolyReachable.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -12,11 +12,16 @@ inline CMemory FairFight_Init = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig
///////////////////////////////////////////////////////////////////////////////
class HFairFight : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: FairFight_Init : 0x" << std::hex << std::uppercase << FairFight_Init.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: FairFight_Init : 0x" << std::hex << std::uppercase << FairFight_Init.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -20,11 +20,16 @@ extern CServerGameDLL* g_pServerGameDLL;
///////////////////////////////////////////////////////////////////////////////
class HServerGameDLL : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| VAR: g_pServerGameDLL : 0x" << std::hex << std::uppercase << g_pServerGameDLL << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -22,11 +22,16 @@ extern CInputSystem* g_pInputSystem
///////////////////////////////////////////////////////////////////////////////
class HInputSystem : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| VAR: g_pInputSystem : 0x" << std::hex << std::uppercase << g_pInputSystem << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -60,14 +60,19 @@ inline bool g_bAppSystemInit = false;
///////////////////////////////////////////////////////////////////////////////
class HApplication : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CModAppSystemGroup::Main : 0x" << std::hex << std::uppercase << p_CModAppSystemGroup_Main.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CModAppSystemGroup::Create : 0x" << std::hex << std::uppercase << p_CModAppSystemGroup_Create.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CSourceAppSystemGroup::Create : 0x" << std::hex << std::uppercase << p_CSourceAppSystemGroup__Create.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CSourceAppSystemGroup::PreInit : 0x" << std::hex << std::uppercase << p_CSourceAppSystemGroup__PreInit.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CModAppSystemGroup::Main : 0x" << std::hex << std::uppercase << p_CModAppSystemGroup_Main.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CModAppSystemGroup::Create : 0x" << std::hex << std::uppercase << p_CModAppSystemGroup_Create.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CSourceAppSystemGroup::Create : 0x" << std::hex << std::uppercase << p_CSourceAppSystemGroup__Create.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CSourceAppSystemGroup::PreInit : 0x" << std::hex << std::uppercase << p_CSourceAppSystemGroup__PreInit.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -10,11 +10,16 @@ void PRX_Detach();
///////////////////////////////////////////////////////////////////////////////
class HPRX : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: exit_or_terminate_process : 0x" << std::hex << std::uppercase << p_exit_or_terminate_process.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: exit_or_terminate_process : 0x" << std::hex << std::uppercase << p_exit_or_terminate_process.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -54,11 +54,16 @@ void CMaterialGlue_Detach();
///////////////////////////////////////////////////////////////////////////////
class HCMaterialGlue : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CMaterialGlue::GetMaterialAtCrossHair: 0x" << std::hex << std::uppercase << p_GetMaterialAtCrossHair.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CMaterialGlue::GetMaterialAtCrossHair: 0x" << std::hex << std::uppercase << p_GetMaterialAtCrossHair.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -22,16 +22,21 @@ void CMaterialSystem_Detach();
///////////////////////////////////////////////////////////////////////////////
class HMaterialSystem : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CMaterialSystem::Init : 0x" << std::hex << std::uppercase << CMaterialSystem__Init.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CMaterialSystem::Init : 0x" << std::hex << std::uppercase << CMaterialSystem__Init.GetPtr() << std::setw(nPad) << " |" << std::endl;
#ifndef DEDICATED
std::cout << "| FUN: DrawStreamOverlay : 0x" << std::hex << std::uppercase << p_DrawStreamOverlay.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: StreamDB_Init : 0x" << std::hex << std::uppercase << p_StreamDB_Init.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: DrawStreamOverlay : 0x" << std::hex << std::uppercase << p_DrawStreamOverlay.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: StreamDB_Init : 0x" << std::hex << std::uppercase << p_StreamDB_Init.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pMaterialSystem : 0x" << std::hex << std::uppercase << g_pMaterialSystem << std::setw(0) << " |" << std::endl;
#endif // !DEDICATED
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -7,11 +7,16 @@ inline CMemory p_WASAPI_GetAudioDevice = g_mRadAudioSystemDll.FindPatternSIMD(re
///////////////////////////////////////////////////////////////////////////////
class HWASAPIServiceThread : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: WASAPI_GetAudioDevice : 0x" << std::hex << std::uppercase << p_WASAPI_GetAudioDevice.GetPtr() << std::setw(6) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -48,7 +48,7 @@ inline CGlobalVarsBase* g_ClientGlobalVariables = p_CModAppSystemGroup_Create.Of
///////////////////////////////////////////////////////////////////////////////
class HEdict : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
#ifndef CLIENT_DLL
std::cout << "| VAR: g_ServerGlobalVariables : 0x" << std::hex << std::uppercase << g_ServerGlobalVariables << std::setw(0) << " |" << std::endl;
@ -58,6 +58,11 @@ class HEdict : public IDetour
#endif // !DEDICATED
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -61,18 +61,23 @@ extern std::vector<int> g_nLoadedPakFileId;
///////////////////////////////////////////////////////////////////////////////
class HRTechGame : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: RTech_UnloadAsset : 0x" << std::hex << std::uppercase << p_RTech_UnloadAsset.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: RTech_AsyncLoad : 0x" << std::hex << std::uppercase << p_RTech_AsyncLoad.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: RTech_UnloadAsset : 0x" << std::hex << std::uppercase << p_RTech_UnloadAsset.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: RTech_AsyncLoad : 0x" << std::hex << std::uppercase << p_RTech_AsyncLoad.GetPtr() << std::setw(nPad) << " |" << std::endl;
#if defined (GAMEDLL_S2) || defined (GAMEDLL_S3)
std::cout << "| FUN: RTech_LoadPak : 0x" << std::hex << std::uppercase << p_RTech_LoadPak.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: RTech_LoadMapPak : 0x" << std::hex << std::uppercase << p_RTech_LoadMapPak.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: RTech_UnloadPak : 0x" << std::hex << std::uppercase << p_RTech_UnloadPak.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: JT_HelpWithAnything : 0x" << std::hex << std::uppercase << p_JT_HelpWithAnything.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: RTech_LoadPak : 0x" << std::hex << std::uppercase << p_RTech_LoadPak.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: RTech_LoadMapPak : 0x" << std::hex << std::uppercase << p_RTech_LoadMapPak.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: RTech_UnloadPak : 0x" << std::hex << std::uppercase << p_RTech_UnloadPak.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: JT_HelpWithAnything : 0x" << std::hex << std::uppercase << p_JT_HelpWithAnything.GetPtr() << std::setw(nPad) << " |" << std::endl;
#endif // GAMEDLL_S2 || GAMEDLL_S3
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -13,11 +13,16 @@ void Rui_Detach();
///////////////////////////////////////////////////////////////////////////////
class HRui : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: RuiDraw : 0x" << std::hex << std::uppercase << p_RuiDraw.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: RuiDraw : 0x" << std::hex << std::uppercase << p_RuiDraw.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -12,11 +12,16 @@ inline void* (*Stryder_StitchRequest)(void* a1) = (void* (*)(void*))p_Stryder_St
///////////////////////////////////////////////////////////////////////////////
class HStryder : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: Stryder_StitchRequest : 0x" << std::hex << std::uppercase << p_Stryder_StitchRequest.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Stryder_StitchRequest : 0x" << std::hex << std::uppercase << p_Stryder_StitchRequest.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -41,14 +41,19 @@ extern bool g_bCheckCompBanDB;
///////////////////////////////////////////////////////////////////////////////
class HServer : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CServer::Think : 0x" << std::hex << std::uppercase << p_CServer_Think.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CServer::Authenticate : 0x" << std::hex << std::uppercase << p_CServer_Authenticate.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CServer::RejectConnection : 0x" << std::hex << std::uppercase << p_CServer_RejectConnection.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CServer::Think : 0x" << std::hex << std::uppercase << p_CServer_Think.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CServer::Authenticate : 0x" << std::hex << std::uppercase << p_CServer_Authenticate.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CServer::RejectConnection : 0x" << std::hex << std::uppercase << p_CServer_RejectConnection.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: sv_m_nTickCount : 0x" << std::hex << std::uppercase << sv_m_nTickCount << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -27,15 +27,20 @@ extern bool g_bIsPersistenceVarSet[MAX_PLAYERS];
///////////////////////////////////////////////////////////////////////////////
class HVEngineServer : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: IVEngineServer::PersistenceAvailable : 0x" << std::hex << std::uppercase << p_IVEngineServer__PersistenceAvailable.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: IVEngineServer::IsDedicatedServer : 0x" << std::hex << std::uppercase << p_IVEngineServer__IsDedicatedServer.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: IVEngineServer::GetNumHumanPlayers : 0x" << std::hex << std::uppercase << p_IVEngineServer__GetNumHumanPlayers.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: IVEngineServer::GetNumFakeClients : 0x" << std::hex << std::uppercase << p_IVEngineServer__GetNumFakeClients.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: IVEngineServer::PersistenceAvailable : 0x" << std::hex << std::uppercase << p_IVEngineServer__PersistenceAvailable.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: IVEngineServer::IsDedicatedServer : 0x" << std::hex << std::uppercase << p_IVEngineServer__IsDedicatedServer.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: IVEngineServer::GetNumHumanPlayers : 0x" << std::hex << std::uppercase << p_IVEngineServer__GetNumHumanPlayers.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: IVEngineServer::GetNumFakeClients : 0x" << std::hex << std::uppercase << p_IVEngineServer__GetNumFakeClients.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_bDedicated : 0x" << std::hex << std::uppercase << g_bDedicated << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -1,50 +1,6 @@
#pragma once
#include "squirrel/sqtype.h"
/* ==== SQUIRREL ======================================================================================================================================================== */
inline CMemory p_sq_pushroottable = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x83\xEC\x28\x8B\x51\x00\x44\x8B\xC2"), "xxxxxx?xxx");
inline auto v_sq_pushroottable = p_sq_pushroottable.RCast<SQRESULT(*)(HSQUIRRELVM v)>(); /*48 83 EC 28 8B 51 ?? 44 8B C2*/
inline CMemory p_sq_pushbool = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x83\xEC\x38\x33\xC0\x48\xC7\x44\x24\x20\x08\x00\x00\x01\x48"), "xxxxxxxxxxxxxxxx");
inline auto v_sq_pushbool = p_sq_pushbool.RCast<void (*)(HSQUIRRELVM v, SQBool b)>(); /*48 83 EC 38 33 C0 48 C7 44 24 20 08 00 00 01 48*/
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) || defined (GAMEDLL_S2)
inline CMemory p_sq_pushstring = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x56\x48\x83\xEC\x30\x48\x8B\xF1\x48\x85\xD2\x0F\x84\x8C\x00"), "xxxxxxxxxxxxxxxx");
inline auto v_sq_pushstring = p_sq_pushstring.RCast<void (*)(HSQUIRRELVM v, const SQChar* string, SQInteger len)>(); /*40 56 48 83 EC 30 48 8B F1 48 85 D2 0F 84 8C 00*/
#elif defined (GAMEDLL_S3)
inline CMemory p_sq_pushstring = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x56\x48\x83\xEC\x30\x48\x8B\xF1\x48\x85\xD2\x0F\x84\x8F\x00"), "xxxxxxxxxxxxxxxx");
inline auto v_sq_pushstring = p_sq_pushstring.RCast<void (*)(HSQUIRRELVM v, const SQChar* string, SQInteger len)>(); /*40 56 48 83 EC 30 48 8B F1 48 85 D2 0F 84 8F 00*/
#endif
inline CMemory p_sq_pushinteger = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x83\xEC\x38\x33\xC0\x48\xC7\x44\x24\x20\x02\x00\x00\x05\x48"), "xxxxxxxxxxxxxxxx");
inline auto v_sq_pushinteger = p_sq_pushinteger.RCast<void (*)(HSQUIRRELVM v, SQInteger val)>(); /*48 83 EC 38 33 C0 48 C7 44 24 20 02 00 00 05 48*/
inline CMemory p_sq_pushconstant = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x00\x48\x89\x6C\x24\x00\x48\x89\x74\x24\x00\x57\x48\x83\xEC\x30\x4C\x8B"), "xxxx?xxxx?xxxx?xxxxxxx");
inline auto v_sq_pushconstant = p_sq_pushconstant.RCast<void (*)(HSQUIRRELVM v, const SQChar* name, SQInteger val)>(); /*48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 30 4C 8B*/
inline CMemory p_sq_newarray = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x08\x57\x48\x83\xEC\x30\x48\x8B\xD9\x48\xC7\x44\x24\x20\x40"), "xxxxxxxxxxxxxxxxxxx");
inline auto v_sq_newarray = p_sq_newarray.RCast<void (*)(HSQUIRRELVM v, SQInteger size)>(); /*48 89 5C 24 08 57 48 83 EC 30 48 8B D9 48 C7 44 24 20 40*/
inline CMemory p_sq_newtable = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x08\x57\x48\x83\xEC\x30\x48\x8B\xD9\x48\xC7\x44\x24\x20\x20"), "xxxxxxxxxxxxxxxxxxx");
inline auto v_sq_newtable = p_sq_newtable.RCast<void (*)(HSQUIRRELVM v)>(); /*48 89 5C 24 08 57 48 83 EC 30 48 8B D9 48 C7 44 24 20 20*/
inline CMemory p_sq_newslot = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x53\x48\x83\xEC\x30\x44\x8B\x49\x00\x48\x8B\xD9\x41\x8B\xC1"), "xxxxxxxxx?xxxxxx");
inline auto v_sq_newslot = p_sq_newslot.RCast<SQRESULT(*)(HSQUIRRELVM v, SQInteger idx)>(); /*40 53 48 83 EC 20 8B 41 ?? 48 8B D9 2B 41 ?? 83 F8 02 7D*/
inline CMemory p_sq_arrayappend = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x53\x48\x83\xEC\x20\x8B\x41\x00\x48\x8B\xD9\x2B\x41\x00\x83\xF8\x02\x7D"), "xxxxxxxx?xxxxx?xxxx");
inline auto v_sq_arrayappend = p_sq_arrayappend.RCast<SQRESULT(*)(HSQUIRRELVM v, SQInteger idx)>(); /*40 53 48 83 EC 20 8B 41 ?? 48 8B D9 2B 41 ?? 83 F8 02 7D*/
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) || defined (GAMEDLL_S2)
inline CMemory p_sq_pushstructure = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x00\x48\x89\x74\x24\x00\x48\x89\x7C\x24\x00\x4C\x89\x4C\x24\x00\x55\x41\x54\x41\x55\x41\x56\x41\x57\x48\x8B\xEC"), "xxxx?xxxx?xxxx?xxxx?xxxxxxxxxxxx");
inline auto v_sq_pushstructure = p_sq_pushstructure.RCast<SQRESULT(*)(HSQUIRRELVM v, const SQChar* name, const SQChar* member, const SQChar* codeclass1, const SQChar* codeclass2)>(); /*48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 4C 89 4C 24 ? 55 41 54 41 55 41 56 41 57 48 8B EC*/
#elif defined (GAMEDLL_S3)
inline CMemory p_sq_pushstructure = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x00\x48\x89\x74\x24\x00\x48\x89\x7C\x24\x00\x55\x41\x54\x41\x55\x41\x56\x41\x57\x48\x8B\xEC\x48\x83\xEC\x60\x48\x8B\x59\x60"), "xxxx?xxxx?xxxx?xxxxxxxxxxxxxxxxxxxx");
inline auto v_sq_pushstructure = p_sq_pushstructure.RCast<SQRESULT(*)(HSQUIRRELVM v, const SQChar* name, const SQChar* member, const SQChar* codeclass1, const SQChar* codeclass2)>(); /*48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 55 41 54 41 55 41 56 41 57 48 8B EC 48 83 EC 60 48 8B 59 60*/
#endif
inline CMemory p_sq_compilebuffer = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x00\x48\x89\x6C\x24\x00\x48\x89\x74\x24\x00\x57\x41\x56\x41\x57\x48\x83\xEC\x50\x41\x8B\xE9\x49\x8B\xF8"), "xxxx?xxxx?xxxx?xxxxxxxxxxxxxxx");
inline auto v_sq_compilebuffer = p_sq_compilebuffer.RCast<SQRESULT(*)(HSQUIRRELVM v, SQBufState* bufferstate, const SQChar* buffer, SQInteger level)>(); /*48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 83 EC 50 41 8B E9 49 8B F8*/
inline CMemory p_sq_call = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x4C\x8B\xDC\x49\x89\x5B\x08\x49\x89\x6B\x10\x49\x89\x73\x18\x57\x48\x83\xEC\x50\x8B\xF2"), "xxxxxxxxxxxxxxxxxxxxxx");
inline auto v_sq_call = p_sq_call.RCast<SQRESULT(*)(HSQUIRRELVM v, SQInteger params, SQBool retval, SQBool raiseerror)>(); /*4C 8B DC 49 89 5B 08 49 89 6B 10 49 89 73 18 57 48 83 EC 50 8B F2*/
///////////////////////////////////////////////////////////////////////////////
SQRESULT sq_pushroottable(HSQUIRRELVM v);
SQChar* sq_getstring(HSQUIRRELVM v, SQInteger i);
@ -65,25 +21,118 @@ SQRESULT sq_call(HSQUIRRELVM v, SQInteger params, SQBool retval, SQBool raiseerr
void SQAPI_Attach();
void SQAPI_Detach();
/* ==== SQUIRREL ======================================================================================================================================================== */
inline CMemory p_sq_pushroottable; /*48 83 EC 28 8B 51 ?? 44 8B C2*/
inline auto v_sq_pushroottable = p_sq_pushroottable.RCast<SQRESULT(*)(HSQUIRRELVM v)>();
inline CMemory p_sq_pushbool; /*48 83 EC 38 33 C0 48 C7 44 24 20 08 00 00 01 48*/
inline auto v_sq_pushbool = p_sq_pushbool.RCast<void (*)(HSQUIRRELVM v, SQBool b)>();
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) || defined (GAMEDLL_S2)
inline CMemory p_sq_pushstring; /*40 56 48 83 EC 30 48 8B F1 48 85 D2 0F 84 8C 00*/
inline auto v_sq_pushstring = p_sq_pushstring.RCast<void (*)(HSQUIRRELVM v, const SQChar* string, SQInteger len)>();
#elif defined (GAMEDLL_S3)
inline CMemory p_sq_pushstring; /*40 56 48 83 EC 30 48 8B F1 48 85 D2 0F 84 8F 00*/
inline auto v_sq_pushstring = p_sq_pushstring.RCast<void (*)(HSQUIRRELVM v, const SQChar* string, SQInteger len)>();
#endif
inline CMemory p_sq_pushinteger; /*48 83 EC 38 33 C0 48 C7 44 24 20 02 00 00 05 48*/
inline auto v_sq_pushinteger = p_sq_pushinteger.RCast<void (*)(HSQUIRRELVM v, SQInteger val)>();
inline CMemory p_sq_pushconstant; /*48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 30 4C 8B*/
inline auto v_sq_pushconstant = p_sq_pushconstant.RCast<void (*)(HSQUIRRELVM v, const SQChar* name, SQInteger val)>();
inline CMemory p_sq_newarray; /*48 89 5C 24 08 57 48 83 EC 30 48 8B D9 48 C7 44 24 20 40*/
inline auto v_sq_newarray = p_sq_newarray.RCast<void (*)(HSQUIRRELVM v, SQInteger size)>();
inline CMemory p_sq_newtable; /*48 89 5C 24 08 57 48 83 EC 30 48 8B D9 48 C7 44 24 20 20*/
inline auto v_sq_newtable = p_sq_newtable.RCast<void (*)(HSQUIRRELVM v)>();
inline CMemory p_sq_newslot; /*40 53 48 83 EC 20 8B 41 ?? 48 8B D9 2B 41 ?? 83 F8 02 7D*/
inline auto v_sq_newslot = p_sq_newslot.RCast<SQRESULT(*)(HSQUIRRELVM v, SQInteger idx)>();
inline CMemory p_sq_arrayappend; /*40 53 48 83 EC 20 8B 41 ?? 48 8B D9 2B 41 ?? 83 F8 02 7D*/
inline auto v_sq_arrayappend = p_sq_arrayappend.RCast<SQRESULT(*)(HSQUIRRELVM v, SQInteger idx)>();
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) || defined (GAMEDLL_S2)
inline CMemory p_sq_pushstructure; /*48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 4C 89 4C 24 ? 55 41 54 41 55 41 56 41 57 48 8B EC*/
inline auto v_sq_pushstructure = p_sq_pushstructure.RCast<SQRESULT(*)(HSQUIRRELVM v, const SQChar* name, const SQChar* member, const SQChar* codeclass1, const SQChar* codeclass2)>();
#elif defined (GAMEDLL_S3)
inline CMemory p_sq_pushstructure; /*48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 55 41 54 41 55 41 56 41 57 48 8B EC 48 83 EC 60 48 8B 59 60*/
inline auto v_sq_pushstructure = p_sq_pushstructure.RCast<SQRESULT(*)(HSQUIRRELVM v, const SQChar* name, const SQChar* member, const SQChar* codeclass1, const SQChar* codeclass2)>();
#endif
inline CMemory p_sq_compilebuffer; /*48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 83 EC 50 41 8B E9 49 8B F8*/
inline auto v_sq_compilebuffer = p_sq_compilebuffer.RCast<SQRESULT(*)(HSQUIRRELVM v, SQBufState* bufferstate, const SQChar* buffer, SQInteger level)>();
inline CMemory p_sq_call; /*4C 8B DC 49 89 5B 08 49 89 6B 10 49 89 73 18 57 48 83 EC 50 8B F2*/
inline auto v_sq_call = p_sq_call.RCast<SQRESULT(*)(HSQUIRRELVM v, SQInteger params, SQBool retval, SQBool raiseerror)>();
///////////////////////////////////////////////////////////////////////////////
class HSqapi : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: sq_pushroottable : 0x" << std::hex << std::uppercase << p_sq_pushroottable.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: sq_pushbool : 0x" << std::hex << std::uppercase << p_sq_pushbool.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: sq_pushstring : 0x" << std::hex << std::uppercase << p_sq_pushstring.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: sq_pushinteger : 0x" << std::hex << std::uppercase << p_sq_pushinteger.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: sq_pushconstant : 0x" << std::hex << std::uppercase << p_sq_pushconstant.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: sq_newarray : 0x" << std::hex << std::uppercase << p_sq_newarray.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: sq_arrayappend : 0x" << std::hex << std::uppercase << p_sq_arrayappend.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: sq_newtable : 0x" << std::hex << std::uppercase << p_sq_newtable.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: sq_newslot : 0x" << std::hex << std::uppercase << p_sq_newslot.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: sq_pushstructure : 0x" << std::hex << std::uppercase << p_sq_pushstructure.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: sq_compilebuffer : 0x" << std::hex << std::uppercase << p_sq_compilebuffer.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: sq_call : 0x" << std::hex << std::uppercase << p_sq_call.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: sq_pushroottable : 0x" << std::hex << std::uppercase << p_sq_pushroottable.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: sq_pushbool : 0x" << std::hex << std::uppercase << p_sq_pushbool.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: sq_pushstring : 0x" << std::hex << std::uppercase << p_sq_pushstring.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: sq_pushinteger : 0x" << std::hex << std::uppercase << p_sq_pushinteger.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: sq_pushconstant : 0x" << std::hex << std::uppercase << p_sq_pushconstant.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: sq_newarray : 0x" << std::hex << std::uppercase << p_sq_newarray.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: sq_arrayappend : 0x" << std::hex << std::uppercase << p_sq_arrayappend.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: sq_newtable : 0x" << std::hex << std::uppercase << p_sq_newtable.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: sq_newslot : 0x" << std::hex << std::uppercase << p_sq_newslot.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: sq_pushstructure : 0x" << std::hex << std::uppercase << p_sq_pushstructure.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: sq_compilebuffer : 0x" << std::hex << std::uppercase << p_sq_compilebuffer.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: sq_call : 0x" << std::hex << std::uppercase << p_sq_call.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const
{
p_sq_pushroottable = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x83\xEC\x28\x8B\x51\x00\x44\x8B\xC2"), "xxxxxx?xxx");
v_sq_pushroottable = p_sq_pushroottable.RCast<SQRESULT(*)(HSQUIRRELVM v)>(); /*48 83 EC 28 8B 51 ?? 44 8B C2*/
p_sq_pushbool = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x83\xEC\x38\x33\xC0\x48\xC7\x44\x24\x20\x08\x00\x00\x01\x48"), "xxxxxxxxxxxxxxxx");
v_sq_pushbool = p_sq_pushbool.RCast<void (*)(HSQUIRRELVM v, SQBool b)>(); /*48 83 EC 38 33 C0 48 C7 44 24 20 08 00 00 01 48*/
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) || defined (GAMEDLL_S2)
p_sq_pushstring = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x56\x48\x83\xEC\x30\x48\x8B\xF1\x48\x85\xD2\x0F\x84\x8C\x00"), "xxxxxxxxxxxxxxxx");
v_sq_pushstring = p_sq_pushstring.RCast<void (*)(HSQUIRRELVM v, const SQChar* string, SQInteger len)>(); /*40 56 48 83 EC 30 48 8B F1 48 85 D2 0F 84 8C 00*/
#elif defined (GAMEDLL_S3)
p_sq_pushstring = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x56\x48\x83\xEC\x30\x48\x8B\xF1\x48\x85\xD2\x0F\x84\x8F\x00"), "xxxxxxxxxxxxxxxx");
v_sq_pushstring = p_sq_pushstring.RCast<void (*)(HSQUIRRELVM v, const SQChar* string, SQInteger len)>(); /*40 56 48 83 EC 30 48 8B F1 48 85 D2 0F 84 8F 00*/
#endif
p_sq_pushinteger = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x83\xEC\x38\x33\xC0\x48\xC7\x44\x24\x20\x02\x00\x00\x05\x48"), "xxxxxxxxxxxxxxxx");
v_sq_pushinteger = p_sq_pushinteger.RCast<void (*)(HSQUIRRELVM v, SQInteger val)>(); /*48 83 EC 38 33 C0 48 C7 44 24 20 02 00 00 05 48*/
p_sq_pushconstant = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x00\x48\x89\x6C\x24\x00\x48\x89\x74\x24\x00\x57\x48\x83\xEC\x30\x4C\x8B"), "xxxx?xxxx?xxxx?xxxxxxx");
v_sq_pushconstant = p_sq_pushconstant.RCast<void (*)(HSQUIRRELVM v, const SQChar* name, SQInteger val)>(); /*48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 30 4C 8B*/
p_sq_newarray = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x08\x57\x48\x83\xEC\x30\x48\x8B\xD9\x48\xC7\x44\x24\x20\x40"), "xxxxxxxxxxxxxxxxxxx");
v_sq_newarray = p_sq_newarray.RCast<void (*)(HSQUIRRELVM v, SQInteger size)>(); /*48 89 5C 24 08 57 48 83 EC 30 48 8B D9 48 C7 44 24 20 40*/
p_sq_newtable = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x08\x57\x48\x83\xEC\x30\x48\x8B\xD9\x48\xC7\x44\x24\x20\x20"), "xxxxxxxxxxxxxxxxxxx");
v_sq_newtable = p_sq_newtable.RCast<void (*)(HSQUIRRELVM v)>(); /*48 89 5C 24 08 57 48 83 EC 30 48 8B D9 48 C7 44 24 20 20*/
p_sq_newslot = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x53\x48\x83\xEC\x30\x44\x8B\x49\x00\x48\x8B\xD9\x41\x8B\xC1"), "xxxxxxxxx?xxxxxx");
v_sq_newslot = p_sq_newslot.RCast<SQRESULT(*)(HSQUIRRELVM v, SQInteger idx)>(); /*40 53 48 83 EC 20 8B 41 ?? 48 8B D9 2B 41 ?? 83 F8 02 7D*/
p_sq_arrayappend = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x40\x53\x48\x83\xEC\x20\x8B\x41\x00\x48\x8B\xD9\x2B\x41\x00\x83\xF8\x02\x7D"), "xxxxxxxx?xxxxx?xxxx");
v_sq_arrayappend = p_sq_arrayappend.RCast<SQRESULT(*)(HSQUIRRELVM v, SQInteger idx)>(); /*40 53 48 83 EC 20 8B 41 ?? 48 8B D9 2B 41 ?? 83 F8 02 7D*/
#if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) || defined (GAMEDLL_S2)
p_sq_pushstructure = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x00\x48\x89\x74\x24\x00\x48\x89\x7C\x24\x00\x4C\x89\x4C\x24\x00\x55\x41\x54\x41\x55\x41\x56\x41\x57\x48\x8B\xEC"), "xxxx?xxxx?xxxx?xxxx?xxxxxxxxxxxx");
v_sq_pushstructure = p_sq_pushstructure.RCast<SQRESULT(*)(HSQUIRRELVM v, const SQChar* name, const SQChar* member, const SQChar* codeclass1, const SQChar* codeclass2)>(); /*48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 4C 89 4C 24 ? 55 41 54 41 55 41 56 41 57 48 8B EC*/
#elif defined (GAMEDLL_S3)
p_sq_pushstructure = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x00\x48\x89\x74\x24\x00\x48\x89\x7C\x24\x00\x55\x41\x54\x41\x55\x41\x56\x41\x57\x48\x8B\xEC\x48\x83\xEC\x60\x48\x8B\x59\x60"), "xxxx?xxxx?xxxx?xxxxxxxxxxxxxxxxxxxx");
v_sq_pushstructure = p_sq_pushstructure.RCast<SQRESULT(*)(HSQUIRRELVM v, const SQChar* name, const SQChar* member, const SQChar* codeclass1, const SQChar* codeclass2)>(); /*48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 55 41 54 41 55 41 56 41 57 48 8B EC 48 83 EC 60 48 8B 59 60*/
#endif
p_sq_compilebuffer = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x00\x48\x89\x6C\x24\x00\x48\x89\x74\x24\x00\x57\x41\x56\x41\x57\x48\x83\xEC\x50\x41\x8B\xE9\x49\x8B\xF8"), "xxxx?xxxx?xxxx?xxxxxxxxxxxxxxx");
v_sq_compilebuffer = p_sq_compilebuffer.RCast<SQRESULT(*)(HSQUIRRELVM v, SQBufState* bufferstate, const SQChar* buffer, SQInteger level)>(); /*48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 41 56 41 57 48 83 EC 50 41 8B E9 49 8B F8*/
p_sq_call = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x4C\x8B\xDC\x49\x89\x5B\x08\x49\x89\x6B\x10\x49\x89\x73\x18\x57\x48\x83\xEC\x50\x8B\xF2"), "xxxxxxxxxxxxxxxxxxxxxx");
v_sq_call = p_sq_call.RCast<SQRESULT(*)(HSQUIRRELVM v, SQInteger params, SQBool retval, SQBool raiseerror)>(); /*4C 8B DC 49 89 5B 08 49 89 6B 10 49 89 73 18 57 48 83 EC 50 8B F2*/
}
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -53,10 +53,10 @@ namespace VSquirrel
///////////////////////////////////////////////////////////////////////////////
class HSqInit : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: Remote_BeginRegisteringFunctions : 0x" << std::hex << std::uppercase << p_Script_Remote_BeginRegisteringFunctions.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: RestoreRemoteChecksumsFromSaveGame : 0x" << std::hex << std::uppercase << p_RestoreRemoteChecksumsFromSaveGame.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Remote_BeginRegisteringFunctions : 0x" << std::hex << std::uppercase << p_Script_Remote_BeginRegisteringFunctions.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: RestoreRemoteChecksumsFromSaveGame : 0x" << std::hex << std::uppercase << p_RestoreRemoteChecksumsFromSaveGame.GetPtr() << std::setw(nPad) << " |" << std::endl;
#ifndef CLIENT_DLL
std::cout << "| VAR: g_nServerRemoteChecksum : 0x" << std::hex << std::uppercase << g_nServerRemoteChecksum << std::setw(0) << " |" << std::endl;
#endif // !CLIENT_DLL
@ -65,6 +65,11 @@ class HSqInit : public IDetour
#endif // !DEDICATED
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -101,38 +101,43 @@ void SQVM_Detach();
///////////////////////////////////////////////////////////////////////////////
class HSQVM : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: SQVM_PrintFunc : 0x" << std::hex << std::uppercase << p_SQVM_PrintFunc.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_WarningFunc : 0x" << std::hex << std::uppercase << p_SQVM_WarningFunc.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_GetErrorLine : 0x" << std::hex << std::uppercase << p_SQVM_GetErrorLine.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_LoadScript : 0x" << std::hex << std::uppercase << p_SQVM_LoadScript.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_LoadRson : 0x" << std::hex << std::uppercase << p_SQVM_LoadRson.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_WarningCmd : 0x" << std::hex << std::uppercase << p_SQVM_WarningCmd.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_RegisterFunc : 0x" << std::hex << std::uppercase << p_SQVM_RegisterFunc.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_CompileError : 0x" << std::hex << std::uppercase << p_SQVM_CompileError.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_PrintFunc : 0x" << std::hex << std::uppercase << p_SQVM_PrintFunc.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: SQVM_WarningFunc : 0x" << std::hex << std::uppercase << p_SQVM_WarningFunc.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: SQVM_GetErrorLine : 0x" << std::hex << std::uppercase << p_SQVM_GetErrorLine.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: SQVM_LoadScript : 0x" << std::hex << std::uppercase << p_SQVM_LoadScript.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: SQVM_LoadRson : 0x" << std::hex << std::uppercase << p_SQVM_LoadRson.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: SQVM_WarningCmd : 0x" << std::hex << std::uppercase << p_SQVM_WarningCmd.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: SQVM_RegisterFunc : 0x" << std::hex << std::uppercase << p_SQVM_RegisterFunc.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: SQVM_CompileError : 0x" << std::hex << std::uppercase << p_SQVM_CompileError.GetPtr() << std::setw(nPad) << " |" << std::endl;
#ifndef CLIENT_DLL
std::cout << "| FUN: SQVM_InitializeSVGlobalScriptStructs : 0x" << std::hex << std::uppercase << p_SQVM_InitializeSVGlobalScriptStructs.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_InitializeSVGlobalScriptStructs : 0x" << std::hex << std::uppercase << p_SQVM_InitializeSVGlobalScriptStructs.GetPtr() << std::setw(nPad) << " |" << std::endl;
#endif // !CLIENT_DLL
#ifndef DEDICATED
std::cout << "| FUN: SQVM_InitializeCLGlobalScriptStructs : 0x" << std::hex << std::uppercase << p_SQVM_InitializeCLGlobalScriptStructs.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_InitializeCLGlobalScriptStructs : 0x" << std::hex << std::uppercase << p_SQVM_InitializeCLGlobalScriptStructs.GetPtr() << std::setw(nPad) << " |" << std::endl;
#endif // !DEDICATED
#ifndef CLIENT_DLL
std::cout << "| FUN: SQVM_CreateServerVM : 0x" << std::hex << std::uppercase << p_SQVM_CreateServerVM.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_CreateServerVM : 0x" << std::hex << std::uppercase << p_SQVM_CreateServerVM.GetPtr() << std::setw(nPad) << " |" << std::endl;
#endif // !CLIENT_DLL
#ifndef DEDICATED
std::cout << "| FUN: SQVM_CreateClientVM : 0x" << std::hex << std::uppercase << p_SQVM_CreateClientVM.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_CreateUIVM : 0x" << std::hex << std::uppercase << p_SQVM_CreateUIVM.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: SQVM_CreateClientVM : 0x" << std::hex << std::uppercase << p_SQVM_CreateClientVM.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: SQVM_CreateUIVM : 0x" << std::hex << std::uppercase << p_SQVM_CreateUIVM.GetPtr() << std::setw(nPad) << " |" << std::endl;
#endif // !DEDICATED
#ifndef CLIENT_DLL
std::cout << "| VAR: g_pServerVM : 0x" << std::hex << std::uppercase << g_pServerVM.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pServerVM : 0x" << std::hex << std::uppercase << g_pServerVM.GetPtr() << std::setw(nPad) << " |" << std::endl;
#endif // !CLIENT_DLL
#ifndef DEDICATED
std::cout << "| VAR: g_pClientVM : 0x" << std::hex << std::uppercase << g_pClientVM.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pUIVM : 0x" << std::hex << std::uppercase << g_pUIVM.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pClientVM : 0x" << std::hex << std::uppercase << g_pClientVM.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pUIVM : 0x" << std::hex << std::uppercase << g_pUIVM.GetPtr() << std::setw(nPad) << " |" << std::endl;
#endif // !DEDICATED
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -20,12 +20,17 @@ inline CMemory CStudioRenderContext__LoadMaterials = g_mGameDll.FindPatternSIMD(
///////////////////////////////////////////////////////////////////////////////
class HStudioRenderContext : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CStudioRenderContext::LoadModel : 0x" << std::hex << std::uppercase << CStudioRenderContext__LoadModel.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CStudioRenderContext::LoadMaterials : 0x" << std::hex << std::uppercase << CStudioRenderContext__LoadMaterials.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CStudioRenderContext::LoadModel : 0x" << std::hex << std::uppercase << CStudioRenderContext__LoadModel.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CStudioRenderContext::LoadMaterials : 0x" << std::hex << std::uppercase << CStudioRenderContext__LoadMaterials.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -1,9 +1,7 @@
#include <vector>
#ifndef IDETOUR_H
#define IDETOUR_H
#define ADDDETOUR(x,y) static size_t dummy_reg_##y = AddDetour( new x() );
#define ADDDETOUR(x,y) static std::size_t dummy_reg_##y = AddDetour( new x() );
#define XREGISTER(x,y) ADDDETOUR(x, y)
#define REGISTER(x) XREGISTER(x, __COUNTER__)
@ -11,29 +9,36 @@ class IDetour
{
public:
virtual ~IDetour() { ; }
//virtual void attach() = 0;
//virtual void detach() = 0;
virtual void debugp() = 0;
virtual void GetAdr(void) const = 0;
virtual void GetFun(void) const = 0;
virtual void GetVar(void) const = 0;
virtual void GetCon(void) const = 0;
virtual void Attach(void) const = 0;
virtual void Detach(void) const = 0;
};
class HDetour : public IDetour
{
virtual void GetAdr(void) const { }
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
namespace
{
std::int32_t npad = 9;
std::vector<IDetour*> vdetour;
size_t AddDetour(IDetour* idtr)
std::int32_t nPad = 9;
std::vector<IDetour*> vDetour;
std::size_t AddDetour(IDetour* pDetour)
{
vdetour.push_back(idtr);
return vdetour.size();
vDetour.push_back(pDetour);
return vDetour.size();
}
}
class H : public IDetour
{
virtual void debugp()
{
//
}
};
REGISTER(H);
REGISTER(HDetour);
#endif // IDETOUR_H

View File

@ -23,11 +23,16 @@ extern CCommandLine* g_pCmdLine;
///////////////////////////////////////////////////////////////////////////////
class HCommandLine : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| VAR: g_pCmdLine : 0x" << std::hex << std::uppercase << g_pCmdLine << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -178,15 +178,20 @@ extern ConVar* g_pConVar;
///////////////////////////////////////////////////////////////////////////////
class HConVar : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: IConVar::IsFlagSet : 0x" << std::hex << std::uppercase << p_IConVar_IsFlagSet.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: IConVar::SetInfo : 0x" << std::hex << std::uppercase << p_ConVar_SetInfo.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: IConVar::Register : 0x" << std::hex << std::uppercase << p_ConVar_Register.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pConVarVtable : 0x" << std::hex << std::uppercase << g_pConVarVtable.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pIConVarVtable : 0x" << std::hex << std::uppercase << g_pIConVarVtable.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: IConVar::IsFlagSet : 0x" << std::hex << std::uppercase << p_IConVar_IsFlagSet.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: IConVar::SetInfo : 0x" << std::hex << std::uppercase << p_ConVar_SetInfo.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: IConVar::Register : 0x" << std::hex << std::uppercase << p_ConVar_Register.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pConVarVtable : 0x" << std::hex << std::uppercase << g_pConVarVtable.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pIConVarVtable : 0x" << std::hex << std::uppercase << g_pIConVarVtable.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -166,21 +166,26 @@ extern ConCommand* g_pConCommand;
///////////////////////////////////////////////////////////////////////////////
class HConCommand : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: Cbuf_AddText : 0x" << std::hex << std::uppercase << p_Cbuf_AddText.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Cbuf_Execute : 0x" << std::hex << std::uppercase << p_Cbuf_Execute.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Cbuf_AddText : 0x" << std::hex << std::uppercase << p_Cbuf_AddText.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: Cbuf_Execute : 0x" << std::hex << std::uppercase << p_Cbuf_Execute.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
std::cout << "| FUN: ConCommandBase::IsFlagSet : 0x" << std::hex << std::uppercase << p_ConCommandBase_IsFlagSet.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: ConCommand::CMaterialSystemCmdInit : 0x" << std::hex << std::uppercase << p_ConCommand_CMaterialSystemCmdInit.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: ConCommand::RegisterConCommand : 0x" << std::hex << std::uppercase << p_ConCommand_RegisterConCommand.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: ConCommandBase::IsFlagSet : 0x" << std::hex << std::uppercase << p_ConCommandBase_IsFlagSet.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: ConCommand::CMaterialSystemCmdInit : 0x" << std::hex << std::uppercase << p_ConCommand_CMaterialSystemCmdInit.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: ConCommand::RegisterConCommand : 0x" << std::hex << std::uppercase << p_ConCommand_RegisterConCommand.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
std::cout << "| FUN: CallbackStub : 0x" << std::hex << std::uppercase << p_CallbackStub.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: NullSub : 0x" << std::hex << std::uppercase << p_NullSub.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CallbackStub : 0x" << std::hex << std::uppercase << p_CallbackStub.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: NullSub : 0x" << std::hex << std::uppercase << p_NullSub.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
std::cout << "| VAR: g_pConCommandVtable : 0x" << std::hex << std::uppercase << g_pConCommandVtable.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pConCommandVtable : 0x" << std::hex << std::uppercase << g_pConCommandVtable.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -140,13 +140,18 @@ inline auto CCVar_GetCommandLineValue = p_CCVar_GetCommandLineValue.RCast<const
///////////////////////////////////////////////////////////////////////////////
class HCvar : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CCVar::Disconnect : 0x" << std::hex << std::uppercase << p_CCVar_Disconnect.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CCVar::GetCommandLineValue : 0x" << std::hex << std::uppercase << p_CCVar_GetCommandLineValue.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CCVar::Disconnect : 0x" << std::hex << std::uppercase << p_CCVar_Disconnect.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CCVar::GetCommandLineValue : 0x" << std::hex << std::uppercase << p_CCVar_GetCommandLineValue.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pCVar : 0x" << std::hex << std::uppercase << g_pCVar << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -27,13 +27,18 @@ inline void* g_pEngineVGui = CGameServer__SpawnServer.Offset(0x18).FindPatternSe
///////////////////////////////////////////////////////////////////////////////
class HEngineVGui : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CEngineVGui::Paint : 0x" << std::hex << std::uppercase << p_CEngineVGui_Paint.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CEngineVGui::Unknown : 0x" << std::hex << std::uppercase << p_CEngineVGui_Unknown.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CEngineVGui::Paint : 0x" << std::hex << std::uppercase << p_CEngineVGui_Paint.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: CEngineVGui::Unknown : 0x" << std::hex << std::uppercase << p_CEngineVGui_Unknown.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pEngineVGui : 0x" << std::hex << std::uppercase << g_pEngineVGui << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -11,11 +11,16 @@ void CFPSPanel_Detach();
///////////////////////////////////////////////////////////////////////////////
class HFPSPanel : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CFPSPanel::Paint : 0x" << std::hex << std::uppercase << p_CFPSPanel_Paint.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CFPSPanel::Paint : 0x" << std::hex << std::uppercase << p_CFPSPanel_Paint.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -11,12 +11,17 @@ inline CMemory g_pMatSystemSurface = p_CHLClient_PostInit.Offset(0x0).FindPatter
///////////////////////////////////////////////////////////////////////////////
class HMatSystemSurface : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: CMatSystemSurface::DrawColoredText : 0x" << std::hex << std::uppercase << p_CMatSystemSurface_DrawColoredText.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pMatSystemSurface : 0x" << std::hex << std::uppercase << g_pMatSystemSurface.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: CMatSystemSurface::DrawColoredText : 0x" << std::hex << std::uppercase << p_CMatSystemSurface_DrawColoredText.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pMatSystemSurface : 0x" << std::hex << std::uppercase << g_pMatSystemSurface.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -7,11 +7,16 @@ inline auto IAppSystem_LoadLibrary = p_IAppSystem_LoadLibrary.RCast<void* (*)(vo
///////////////////////////////////////////////////////////////////////////////
class HAppSystem : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: IAppSystem::LoadLibrary : 0x" << std::hex << std::uppercase << p_IAppSystem_LoadLibrary.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: IAppSystem::LoadLibrary : 0x" << std::hex << std::uppercase << p_IAppSystem_LoadLibrary.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -94,11 +94,16 @@ inline CMemory s_pInterfacesRegs = g_mGameDll.FindPatternSIMD(reinterpret_cast<r
///////////////////////////////////////////////////////////////////////////////
class HFactory : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| VAR: s_pInterfacesRegs : 0x" << std::hex << std::uppercase << s_pInterfacesRegs.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: s_pInterfacesRegs : 0x" << std::hex << std::uppercase << s_pInterfacesRegs.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -91,15 +91,20 @@ extern KeyValues** g_pPlaylistKeyValues;
///////////////////////////////////////////////////////////////////////////////
class HKeyValues : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: KeyValues::Init : 0x" << std::hex << std::uppercase << p_KeyValues_Init.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: KeyValues::FindKey : 0x" << std::hex << std::uppercase << p_KeyValues_FindKey.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: KeyValues::LoadPlaylist : 0x" << std::hex << std::uppercase << p_KeyValues_LoadPlaylist.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: KeyValues::GetCurrentPlaylist : 0x" << std::hex << std::uppercase << p_KeyValues_GetCurrentPlaylist.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: KeyValues::Init : 0x" << std::hex << std::uppercase << p_KeyValues_Init.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: KeyValues::FindKey : 0x" << std::hex << std::uppercase << p_KeyValues_FindKey.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: KeyValues::LoadPlaylist : 0x" << std::hex << std::uppercase << p_KeyValues_LoadPlaylist.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: KeyValues::GetCurrentPlaylist : 0x" << std::hex << std::uppercase << p_KeyValues_GetCurrentPlaylist.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pPlaylistKeyValues : 0x" << std::hex << std::uppercase << g_pPlaylistKeyValues << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -15,12 +15,17 @@ void QHull_Detach();
///////////////////////////////////////////////////////////////////////////////
class HQHull : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: QHull_PrintFunc : 0x" << std::hex << std::uppercase << p_QHull_PrintFunc.GetPtr() << std::setw(npad) << " |" << std::endl;
//std::cout << "| FUN: speex_warning_int : 0x" << std::hex << std::uppercase << p_speex_warning_int.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: QHull_PrintFunc : 0x" << std::hex << std::uppercase << p_QHull_PrintFunc.GetPtr() << std::setw(nPad) << " |" << std::endl;
//std::cout << "| FUN: speex_warning_int : 0x" << std::hex << std::uppercase << p_speex_warning_int.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -47,12 +47,17 @@ void _CMaterial_GetMaterialAtCrossHair_f_ComplectionFunc(const CCommand& args);
///////////////////////////////////////////////////////////////////////////////
class HCompletion : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| FUN: Host_Map_f_CompletionFunc : 0x" << std::hex << std::uppercase << p_Host_Map_f_CompletionFunc.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: DownloadPlaylist_f_CompletionFunc : 0x" << std::hex << std::uppercase << p_DownloadPlaylists_f_CompletionFunc.GetPtr() << std::setw(npad) << " |" << std::endl;
std::cout << "| FUN: Host_Map_f_CompletionFunc : 0x" << std::hex << std::uppercase << p_Host_Map_f_CompletionFunc.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "| FUN: DownloadPlaylist_f_CompletionFunc : 0x" << std::hex << std::uppercase << p_DownloadPlaylists_f_CompletionFunc.GetPtr() << std::setw(nPad) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -46,12 +46,17 @@ inline CKeyValuesSystem* g_pKeyValuesSystem = g_mGameDll.FindPatternSIMD(
///////////////////////////////////////////////////////////////////////////////
class HKeyValuesSystem : public IDetour
{
virtual void debugp()
virtual void GetAdr(void) const
{
std::cout << "| VAR: g_pKeyValuesMemPool : 0x" << std::hex << std::uppercase << g_pKeyValuesMemPool << std::setw(npad) << " |" << std::endl;
std::cout << "| VAR: g_pKeyValuesMemPool : 0x" << std::hex << std::uppercase << g_pKeyValuesMemPool << std::setw(nPad) << " |" << std::endl;
std::cout << "| VAR: g_pKeyValuesSystem : 0x" << std::hex << std::uppercase << g_pKeyValuesSystem << std::setw(0) << " |" << std::endl;
std::cout << "+----------------------------------------------------------------+" << std::endl;
}
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
};
///////////////////////////////////////////////////////////////////////////////

View File

@ -525,7 +525,7 @@ void DirectX_Shutdown()
ImGui_ImplDX11_Shutdown();
}
void HIDXGI::debugp()
void HIDXGI::GetAdr(void) const
{
///////////////////////////////////////////////////////////////////////////////
std::cout << "| VAR: ID3D11DeviceContext : " << std::hex << std::uppercase << g_pDeviceContext << std::setw(4) << " |" << std::endl;

View File

@ -114,7 +114,12 @@ enum class DXGISwapChainVTbl : short
class HIDXGI : public IDetour
{
virtual void debugp();
virtual void GetAdr(void) const;
virtual void GetFun(void) const { }
virtual void GetVar(void) const { }
virtual void GetCon(void) const { }
virtual void Attach(void) const { }
virtual void Detach(void) const { }
///////////////////////////////////////////////////////////////////////////////
};
REGISTER(HIDXGI);