L L4D2node

CCvarUtilities::CountVariablesWithFlags

0x00128c50 · 119 bytes · __thiscall

_ZN14CCvarUtilities23CountVariablesWithFlagsEi

Decompiled

undefined (2 params)

/* CCvarUtilities::CountVariablesWithFlags(int) */

int __thiscall CCvarUtilities::CountVariablesWithFlags(CCvarUtilities *this,int param_1)

{
  char cVar1;
  int *piVar2;
  int *piVar3;
  int iVar4;
  
  piVar2 = (int *)(**(code **)(*g_pCVar + 0x98))(g_pCVar);
                    /* try { // try from 00128c70 to 00128cb9 has its CatchHandler @ 00128cd0 */
  (**(code **)(*piVar2 + 8))(piVar2);
  iVar4 = 0;
  while( true ) {
    cVar1 = (**(code **)(*piVar2 + 0x10))(piVar2);
    if (cVar1 == '\0') break;
    piVar3 = (int *)(**(code **)(*piVar2 + 0x14))(piVar2);
    cVar1 = (**(code **)(*piVar3 + 8))(piVar3);
    if (cVar1 == '\0') {
      cVar1 = (**(code **)(*piVar3 + 0xc))(piVar3,param_1);
      iVar4 = (iVar4 + 1) - (uint)(cVar1 == '\0');
    }
    (**(code **)(*piVar2 + 0xc))(piVar2);
  }
  (**(code **)(*piVar2 + 4))(piVar2);
  return iVar4;
}

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)