CLog::PrintServerVars
0x001fa220 · 233 bytes · __thiscall
_ZN4CLog15PrintServerVarsEv
Decompiled
undefined (1 param)
/* CLog::PrintServerVars() */
void __thiscall CLog::PrintServerVars(CLog *this)
{
char cVar1;
int *piVar2;
int *piVar3;
undefined4 uVar4;
char *pcVar5;
if (this[8] == (CLog)0x0) {
return;
}
Printf(this,"server cvars start\n");
piVar2 = (int *)(**(code **)(*g_pCVar + 0x98))(g_pCVar);
/* try { // try from 001fa267 to 001fa2fe has its CatchHandler @ 001fa310 */
(**(code **)(*piVar2 + 8))(piVar2);
while( true ) {
cVar1 = (**(code **)(*piVar2 + 0x10))(piVar2);
if (cVar1 == '\0') break;
piVar3 = (int *)(**(code **)(*piVar2 + 0x14))(piVar2);
cVar1 = (**(code **)(*piVar3 + 8))(piVar3);
if (cVar1 == '\0') {
cVar1 = (**(code **)(*piVar3 + 0xc))(piVar3,0x100);
if (cVar1 != '\0') {
pcVar5 = "FCVAR_NEVER_AS_STRING";
if (((*(byte *)((int)piVar3 + 0x15) & 0x10) == 0) &&
(pcVar5 = *(char **)(piVar3[7] + 0x24), pcVar5 == (char *)0x0)) {
pcVar5 = "";
}
uVar4 = (**(code **)(*piVar3 + 0x1c))(piVar3);
Printf(this,"\"%s\" = \"%s\"\n",uVar4,pcVar5);
}
}
(**(code **)(*piVar2 + 0xc))(piVar2);
}
Printf(this,"server cvars end\n");
/* WARNING: Could not recover jumptable at 0x001fa30e. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*piVar2 + 4))();
return;
}
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.