L L4D2node

CBaseEntity::ReadKeyField

0x00609130 · 157 bytes · __thiscall

_ZN11CBaseEntity12ReadKeyFieldEPKcP9variant_t

Decompiled

undefined (3 params)

/* CBaseEntity::ReadKeyField(char const*, variant_t*) */

undefined4 __thiscall CBaseEntity::ReadKeyField(CBaseEntity *this,char *param_1,variant_t *param_2)

{
  int *piVar1;
  int iVar2;
  undefined4 *puVar3;
  int iVar4;
  
  if (param_1 != (char *)0x0) {
    for (piVar1 = (int *)(**(code **)(*(int *)this + 0x30))(this); piVar1 != (int *)0x0;
        piVar1 = (int *)piVar1[3]) {
      if (0 < piVar1[1]) {
        iVar4 = 0;
        do {
          iVar2 = *piVar1 + iVar4 * 0x40;
          if (((*(byte *)(iVar2 + 0xe) & 0x14) != 0) &&
             (iVar2 = _V_stricmp(*(char **)(iVar2 + 0x10),param_1), iVar2 == 0)) {
            puVar3 = (undefined4 *)(*piVar1 + iVar4 * 0x40);
            variant_t::Set((variant_t *)param_2,*puVar3,this + puVar3[2]);
            return 1;
          }
          iVar4 = iVar4 + 1;
        } while (iVar4 < piVar1[1]);
      }
    }
  }
  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)