L L4D2node

CAchievement_AchievedCount::OnSteamUserStatsStored

0x003fc7c0 · 189 bytes · __thiscall

_ZN26CAchievement_AchievedCount22OnSteamUserStatsStoredEv

Decompiled

undefined (1 param)

/* CAchievement_AchievedCount::OnSteamUserStatsStored() */

void __thiscall CAchievement_AchievedCount::OnSteamUserStatsStored(CAchievement_AchievedCount *this)

{
  char cVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  int iVar5;
  int local_24;
  
  iVar2 = (**(code **)(**(int **)(this + 0x70) + 0x5c))(*(int **)(this + 0x70),0);
  if (iVar2 < 1) {
    local_24 = 0;
  }
  else {
    iVar5 = 0;
    local_24 = 0;
    do {
      while( true ) {
        piVar3 = (int *)(**(code **)(**(int **)(this + 0x70) + 0x50))
                                  (*(int **)(this + 0x70),iVar5,0);
        iVar4 = (**(code **)*piVar3)(piVar3);
        if ((iVar4 < *(int *)(this + 0x88)) || (*(int *)(this + 0x8c) < iVar4)) break;
        cVar1 = (**(code **)(*piVar3 + 0x14))(piVar3);
        local_24 = (local_24 + 1) - (uint)(cVar1 == '\0');
        iVar5 = iVar5 + 1;
        if (iVar5 == iVar2) goto LAB_003fc850;
      }
      iVar5 = iVar5 + 1;
    } while (iVar5 != iVar2);
  }
LAB_003fc850:
  if (*(int *)(this + 0x84) <= local_24) {
                    /* WARNING: Could not recover jumptable at 0x003fc87a. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    (**(code **)(*(int *)this + 0xa8))();
    return;
  }
  return;
}

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)