L L4D2node

CBaseFlex::FindNamedSetting

0x00625b30 · 107 bytes · __thiscall

_ZN9CBaseFlex16FindNamedSettingEPK16flexsettinghdr_tPKc

Decompiled

undefined (3 params)

/* CBaseFlex::FindNamedSetting(flexsettinghdr_t const*, char const*) */

flexsettinghdr_t * __thiscall
CBaseFlex::FindNamedSetting(CBaseFlex *this,flexsettinghdr_t *param_1,char *param_2)

{
  flexsettinghdr_t *pfVar1;
  int iVar2;
  flexsettinghdr_t *pfVar3;
  int iVar4;
  int iVar5;
  
  if (0 < *(int *)(param_1 + 0x4c)) {
    iVar4 = 0;
    iVar5 = 0;
    do {
      pfVar1 = param_1 + *(int *)(param_1 + 0x50) + iVar4;
      if (pfVar1 != (flexsettinghdr_t *)0x0) {
        iVar2 = _V_stricmp((char *)(pfVar1 + *(int *)pfVar1),param_2);
        if (iVar2 == 0) {
          pfVar3 = (flexsettinghdr_t *)0x0;
          if (iVar5 < *(int *)(param_1 + 0x4c)) {
            pfVar3 = pfVar1;
          }
          return pfVar3;
        }
      }
      iVar5 = iVar5 + 1;
      iVar4 = iVar4 + 0x18;
    } while (iVar5 < *(int *)(param_1 + 0x4c));
  }
  return (flexsettinghdr_t *)0x0;
}

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)