CDebugHistory::DumpDebugHistory
0x0068c760 · 352 bytes · __thiscall
_ZN13CDebugHistory16DumpDebugHistoryEi
Decompiled
undefined (2 params)
/* CDebugHistory::DumpDebugHistory(int) */
void __thiscall CDebugHistory::DumpDebugHistory(CDebugHistory *this,int param_1)
{
CDebugHistory *pCVar1;
CDebugHistory CVar2;
CDebugHistory *pCVar3;
CDebugHistory *pCVar4;
CDebugHistory *pCVar5;
CDebugHistory *pCVar6;
int in_GS_OFFSET;
int iVar7;
CDebugHistory local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if ((uint)param_1 < 5) {
pCVar1 = this + param_1 * 0x3e800 + 0x440;
pCVar6 = *(CDebugHistory **)(this + param_1 * 4 + 0x138c40) + 1;
if (0x3e7ff < (uint)((int)pCVar6 - (int)pCVar1)) {
pCVar6 = pCVar1;
}
do {
if (pCVar6 == pCVar1) {
CVar2 = pCVar6[0x3e7ff];
}
else {
CVar2 = pCVar6[-1];
}
if ((CVar2 == (CDebugHistory)0x0) && (*pCVar6 != (CDebugHistory)0x0)) {
iVar7 = param_1;
Msg("Starting Debug History Dump of Category %d\n",param_1);
pCVar5 = *(CDebugHistory **)(this + param_1 * 4 + 0x138c40);
pCVar3 = local_120;
while (pCVar6 != pCVar5) {
pCVar4 = pCVar3 + 1;
*pCVar3 = *pCVar6;
if (*pCVar6 == (CDebugHistory)0x0) {
if (local_120[0] != (CDebugHistory)0x0) {
Msg(local_120,iVar7);
pCVar5 = *(CDebugHistory **)(this + param_1 * 4 + 0x138c40);
}
local_120[0] = (CDebugHistory)0x0;
pCVar4 = local_120;
}
pCVar6 = pCVar6 + 1;
pCVar3 = pCVar4;
if (0x3e7ff < (uint)((int)pCVar6 - (int)pCVar1)) {
pCVar6 = pCVar1;
}
}
Msg("Ended Debug History Dump of Category %d\n",param_1);
goto LAB_0068c7f8;
}
pCVar5 = pCVar6 + 1;
if (0x3e7ff < (uint)((int)(pCVar6 + 1) - (int)pCVar1)) {
pCVar5 = pCVar1;
}
pCVar6 = pCVar5;
} while (pCVar5 != *(CDebugHistory **)(this + param_1 * 4 + 0x138c40));
Msg("Debug History of Category %d is EMPTY\n",param_1);
}
else {
Warning("Attempted to dump a history for category %d. Valid categories are %d to %d.\n",param_1,
0,4);
}
LAB_0068c7f8:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.