L L4D2node

CBaseEntity::NameMatchesComplex

0x00606d90 · 249 bytes · __thiscall

_ZN11CBaseEntity18NameMatchesComplexEPKc

Decompiled

undefined (2 params)

/* CBaseEntity::NameMatchesComplex(char const*) */

bool __thiscall CBaseEntity::NameMatchesComplex(CBaseEntity *this,char *param_1)

{
  char cVar1;
  bool bVar2;
  undefined1 uVar3;
  int iVar4;
  int iVar5;
  char cVar6;
  char *pcVar7;
  
  iVar4 = _V_stricmp("!player",param_1);
  if (iVar4 == 0) {
                    /* WARNING: Could not recover jumptable at 0x00606e72. Too many branches */
                    /* WARNING: Treating indirect jump as call */
    uVar3 = (**(code **)(*(int *)this + 0x16c))();
    return (bool)uVar3;
  }
  pcVar7 = *(char **)(this + 0x154);
  if (pcVar7 == (char *)0x0) {
    bVar2 = *param_1 == '*' || *param_1 == '\0';
  }
  else if (param_1 == pcVar7) {
    bVar2 = true;
  }
  else {
    cVar1 = *pcVar7;
    if (cVar1 == '\0') {
LAB_00606e24:
      cVar6 = *param_1;
      bVar2 = true;
      if (cVar6 != '\0') {
LAB_00606e30:
        return cVar6 == '*';
      }
    }
    else {
      cVar6 = *param_1;
      while (cVar6 != '\0') {
        pcVar7 = pcVar7 + 1;
        if (cVar1 != cVar6) {
          iVar4 = tolower((int)cVar1);
          iVar5 = tolower((int)cVar6);
          if (iVar4 != iVar5) {
            cVar6 = *param_1;
            if (cVar6 == '\0') {
              return cVar1 == '\0';
            }
            goto LAB_00606e30;
          }
        }
        cVar1 = *pcVar7;
        param_1 = param_1 + 1;
        if (cVar1 == '\0') goto LAB_00606e24;
        cVar6 = *param_1;
      }
      bVar2 = false;
    }
  }
  return bVar2;
}

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)