CSteamWorksGameStatsUploader::InitializeSystem
0x004c6490 · 313 bytes · __thiscall
_ZN28CSteamWorksGameStatsUploader16InitializeSystemEv
Decompiled
undefined (1 param)
/* CSteamWorksGameStatsUploader::InitializeSystem() */
undefined4 __thiscall
CSteamWorksGameStatsUploader::InitializeSystem(CSteamWorksGameStatsUploader *this)
{
int *piVar1;
char cVar2;
int iVar3;
time_t local_20 [4];
if (*(int *)(steamworks_stats_disable._28_4_ + 0x30) != 0) {
return 0xf;
}
if (*(int *)(this + 0x36c) != 0 || *(int *)(this + 0x368) != 0) {
if (*(int *)(this + 0x36c) == *(int *)(steamworks_server_sessionid._28_4_ + 0x30) >> 0x1f &&
*(int *)(steamworks_server_sessionid._28_4_ + 0x30) == *(int *)(this + 0x368)) {
return 1;
}
ConVar::SetValue(0xf9de00);
if (*(int *)(this + 0x36c) != 0 || *(int *)(this + 0x368) != 0) {
return 1;
}
}
if (this[900] != (CSteamWorksGameStatsUploader)0x0) {
return 0x16;
}
cVar2 = AccessToSteamAPI();
if (cVar2 != '\0') {
time(local_20);
*(time_t *)(this + 0x374) = local_20[0];
iVar3 = GetInterface(this);
*(int *)(this + 0x48) = iVar3;
piVar1 = engine;
if (iVar3 != 0) {
this[900] = (CSteamWorksGameStatsUploader)0x1;
cVar2 = (**(code **)(*piVar1 + 0x1f8))(piVar1);
iVar3 = 2;
if (cVar2 == '\0') {
cVar2 = (**(code **)(*engine + 8))(engine);
iVar3 = (-(uint)(cVar2 == '\0') & 0xfffffffe) + 3;
}
(**(code **)**(undefined4 **)(this + 0x48))
(*(undefined4 **)(this + 0x48),iVar3,*(undefined4 *)(this + 0x50),
*(undefined4 *)(this + 0x54),*(undefined4 *)(this + 0x58),
*(undefined4 *)(this + 0x374));
return 1;
}
return 2;
}
return 3;
}
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.