L L4D2node

CBaseGameStats::UploadStatsFileNOW

0x00463170 · 329 bytes · __thiscall

_ZN14CBaseGameStats18UploadStatsFileNOWEv

Decompiled

undefined (1 param)

/* CBaseGameStats::UploadStatsFileNOW() */

undefined4 __thiscall CBaseGameStats::UploadStatsFileNOW(CBaseGameStats *this)

{
  code *pcVar1;
  char cVar2;
  undefined4 uVar3;
  longdouble lVar4;
  undefined4 local_54 [4];
  int local_44;
  
  if ((((CBGSDriver[0x130d] != '\0') && (cVar2 = StatsTrackingIsFullyEnabled(), cVar2 != '\0')) &&
      (cVar2 = (**(code **)(*(int *)this + 0x38))(this), cVar2 != '\0')) &&
     (cVar2 = (*(code *)**(undefined4 **)gamestats)(gamestats), cVar2 != '\0')) {
    pcVar1 = *(code **)(*(int *)(filesystem + 4) + 0x28);
    uVar3 = (**(code **)(*(int *)gamestats + 0x40))(gamestats);
    uVar3 = (*pcVar1)(filesystem + 4,uVar3,&DAT_00c146f4);
    if ((char)uVar3 == '\0') {
      return uVar3;
    }
    lVar4 = (longdouble)Plat_FloatTime();
    CBGSDriver._4884_4_ = (undefined4)lVar4;
    CUtlBuffer::CUtlBuffer((CUtlBuffer *)local_54,0,0,0);
    pcVar1 = *(code **)(*(int *)(filesystem + 4) + 0x38);
                    /* try { // try from 00463234 to 0046329f has its CatchHandler @ 004632c4 */
    uVar3 = (**(code **)(*(int *)this + 0x40))(this);
    (*pcVar1)(filesystem + 4,uVar3,&DAT_00c146f4,(CUtlBuffer *)local_54,0,0,0);
    if ((local_44 == 0) || (gamestatsuploader == (undefined4 *)0x0)) {
      uVar3 = 0;
    }
    else {
      uVar3 = (**(code **)*gamestatsuploader)
                        (gamestatsuploader,&DAT_00d539c2,1,local_44,local_54[0]);
    }
    CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_54);
    return uVar3;
  }
  return 0;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)