L L4D2node

CPureServerWhitelist::GetBestEntry

0x001d78d0 · 342 bytes · __thiscall

_ZN20CPureServerWhitelist12GetBestEntryEPKc

Decompiled

undefined (2 params)

/* CPureServerWhitelist::GetBestEntry(char const*) */

CCommand * __thiscall CPureServerWhitelist::GetBestEntry(CPureServerWhitelist *this,char *param_1)

{
  char cVar1;
  CCommand *pCVar2;
  int in_GS_OFFSET;
  char local_228 [260];
  char local_124 [260];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  V_strncpy(local_228,param_1,0x104);
  cVar1 = V_IsAbsolutePath(local_228);
  if ((cVar1 == '\0') ||
     (cVar1 = (**(code **)(**(int **)(this + 0x74) + 0x8c))
                        (*(int **)(this + 0x74),param_1,local_228,0x104), cVar1 != '\0')) {
    V_FixSlashes(local_228,'/');
    cVar1 = V_ExtractFilePath(local_228,local_124,0x104);
    if (cVar1 == '\0') {
      local_124[0] = '\0';
    }
    pCVar2 = (CCommand *)CheckEntry(this,(CUtlDict *)(this + 8),local_228,(CCommand *)0x0);
    if (local_124[0] != '\0') {
      pCVar2 = (CCommand *)CheckEntry(this,(CUtlDict *)(this + 0x50),local_124,pCVar2);
      do {
        if (local_124[0] == '\0') break;
        pCVar2 = (CCommand *)CheckEntry(this,(CUtlDict *)(this + 0x2c),local_124,pCVar2);
        cVar1 = V_StripLastDir(local_124,0x104);
      } while (cVar1 != '\0');
    }
  }
  else {
    pCVar2 = (CCommand *)0x0;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return pCVar2;
}

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)