CBaseGameStats_Driver::SendData
0x004632e0 · 289 bytes · __thiscall
_ZN21CBaseGameStats_Driver8SendDataEv
Decompiled
undefined (1 param)
/* CBaseGameStats_Driver::SendData() */
void __thiscall CBaseGameStats_Driver::SendData(CBaseGameStats_Driver *this)
{
int *piVar1;
int iVar2;
int in_GS_OFFSET;
undefined4 local_58 [4];
undefined4 local_48;
undefined4 local_1e;
undefined4 local_1a;
undefined4 local_16;
undefined2 local_12;
int local_10;
local_10 = *(int *)(in_GS_OFFSET + 0x14);
if ((*(int *)(this + 0x1384) != 0) && (*(char *)(*(int *)(this + 0x1384) + 4) != '\0')) {
CUtlBuffer::CUtlBuffer((CUtlBuffer *)local_58,0,0,1);
/* try { // try from 0046335a to 00463401 has its CatchHandler @ 00463409 */
KeyValues::RecursiveSaveToFile
((KeyValues *)**(undefined4 **)(this + 0x1384),(CUtlBuffer *)local_58,0);
piVar1 = (int *)CommandLine_Tier0();
iVar2 = (**(code **)(*piVar1 + 0x28))(piVar1,"-gamestatsfileoutputonly");
if (iVar2 == 0) {
if (gamestatsuploader != (undefined4 *)0x0) {
(**(code **)*gamestatsuploader)(gamestatsuploader,&DAT_00d539c2,1,local_48,local_58[0]);
}
}
else {
local_1e = 0x656d6167;
local_12 = 0x74;
local_1a = 0x74617473;
local_16 = 0x61642e73;
(**(code **)(*(int *)(filesystem + 4) + 0x3c))
(filesystem + 4,&local_1e,&DAT_00c146f4,(CUtlBuffer *)local_58);
}
ResetData(this);
CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_58);
}
if (local_10 == *(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.