L L4D2node

CInitTracker::Shutdown

0x0021c060 · 263 bytes · __thiscall

_ZN12CInitTracker8ShutdownEPKci

Decompiled

undefined (3 params)

/* CInitTracker::Shutdown(char const*, int) */

void __thiscall CInitTracker::Shutdown(CInitTracker *this,char *param_1,int param_2)

{
  int *piVar1;
  CInitTracker *pCVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  pCVar2 = this + param_2 * 4;
  iVar4 = *(int *)pCVar2;
  if (iVar4 == 0) {
    Msg();
    return;
  }
  if (0 < iVar4) {
    iVar5 = **(int **)(this + param_2 * 0x14 + 0x10);
    if (*(int *)(iVar5 + 8) == 0) {
      iVar3 = 0;
      do {
        iVar3 = iVar3 + 1;
        if (iVar3 == iVar4) {
          if (*(int *)(iVar5 + 8) == 0) goto LAB_0021c0cf;
          break;
        }
        iVar5 = (*(int **)(this + param_2 * 0x14 + 0x10))[iVar3];
      } while (*(int *)(iVar5 + 8) == 0);
    }
    iVar4 = _V_stricmp(*(char **)(iVar5 + 4),param_1);
    if ((iVar4 != 0) && (*(char *)(iVar5 + 0x10) == '\0')) {
      *(undefined1 *)(iVar5 + 0x10) = 1;
    }
    iVar4 = *(int *)pCVar2;
LAB_0021c0cf:
    if (0 < iVar4) {
      iVar4 = 0;
      do {
        iVar5 = *(int *)(*(int *)(this + param_2 * 0x14 + 0x10) + iVar4 * 4);
        iVar3 = _V_stricmp(*(char **)(iVar5 + 4),param_1);
        if (iVar3 == 0) {
          piVar1 = (int *)(iVar5 + 8);
          *piVar1 = *piVar1 + -1;
          return;
        }
        iVar4 = iVar4 + 1;
      } while (iVar4 < *(int *)pCVar2);
    }
  }
  Msg();
  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)