L L4D2node

CUtlFilenameSymbolTable::FindFileName

0x00050070 · 279 bytes · __thiscall

_ZN23CUtlFilenameSymbolTable12FindFileNameEPKc

Decompiled

undefined (2 params)

/* CUtlFilenameSymbolTable::FindFileName(char const*) */

undefined4 __thiscall
CUtlFilenameSymbolTable::FindFileName(CUtlFilenameSymbolTable *this,char *param_1)

{
  short sVar1;
  short sVar2;
  int iVar3;
  undefined4 uVar4;
  int in_GS_OFFSET;
  char local_32c [260];
  char local_228 [260];
  char local_124 [260];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 != (char *)0x0) {
    V_strncpy(local_32c,param_1,0x104);
    V_RemoveDotSlashes(local_32c,'/');
    V_ExtractFilePath(local_32c,local_228,0x104);
    iVar3 = _V_strlen(local_228);
    V_strncpy(local_124,local_32c + iVar3,0x104);
    CThreadSpinRWLock::LockForRead();
    sVar1 = CCountedStringPool::FindStringHandle((CCountedStringPool *)this,local_228);
    sVar2 = CCountedStringPool::FindStringHandle((CCountedStringPool *)this,local_124);
    uVar4 = CONCAT22(sVar2,sVar1);
    CThreadSpinRWLock::UnlockRead();
    if ((sVar1 != 0) && (sVar2 != 0)) goto LAB_00050167;
  }
  uVar4 = 0;
LAB_00050167:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar4;
}

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)