CUploadGameStats::UploadGameStats
0x00214a30 · 373 bytes · __thiscall
_ZN16CUploadGameStats15UploadGameStatsEPKcjjPKv
Decompiled
undefined (5 params)
/* CUploadGameStats::UploadGameStats(char const*, unsigned int, unsigned int, void const*) */
bool __thiscall
CUploadGameStats::UploadGameStats
(CUploadGameStats *this,char *param_1,uint param_2,uint param_3,void *param_4)
{
int iVar1;
int in_GS_OFFSET;
bool bVar2;
undefined4 local_108;
undefined4 local_104;
undefined2 local_100;
undefined4 local_fc;
char local_f8 [64];
char local_b8 [64];
char local_78 [64];
uint local_38;
uint local_34;
void *local_30;
int local_24;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
(**(code **)(*(int *)this + 8))(this);
bVar2 = false;
if (this[0x14] != (CUploadGameStats)0x0) {
iVar1 = GetSteamAppID();
bVar2 = false;
if (iVar1 != 0) {
netadr_s::SetIP((netadr_s *)&local_108,0);
netadr_s::SetPort((netadr_s *)&local_108,0);
netadr_s::SetType((netadr_s *)&local_108,3);
local_24 = 0;
_V_memset(&local_108,0,0xe8);
local_108 = *(undefined4 *)(this + 4);
local_104 = *(undefined4 *)(this + 8);
local_100 = *(undefined2 *)(this + 0xc);
local_fc = build_number();
V_strncpy(local_f8,"hl2.exe",0x40);
V_FileBase(com_gamedir,local_b8,0x40);
V_FileBase(param_1,local_78,0x40);
local_30 = param_4;
local_38 = param_2;
local_34 = param_3;
local_24 = iVar1;
iVar1 = Win32UploadGameStatsBlocking((TGameStatsParameters *)&local_108);
bVar2 = iVar1 == 0;
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return bVar2;
}
/* 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.