L L4D2node

COM_ExpandFilename

0x00126960 · 159 bytes · __cdecl

_Z18COM_ExpandFilenamePci

Decompiled

undefined (2 params)

/* COM_ExpandFilename(char*, int) */

undefined4 COM_ExpandFilename(char *param_1,int param_2)

{
  int iVar1;
  int in_GS_OFFSET;
  undefined4 local_120;
  char local_114 [260];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = (**(code **)(*g_pFileSystem + 0x88))(g_pFileSystem,param_1,local_114,0x104);
  if (iVar1 == 0) {
    local_120 = 0;
    if ((param_1 != (char *)0x0) && (*param_1 != '*')) {
      local_120 = 0;
      Warning("COM_ExpandFilename: can\'t find %s\n",param_1);
    }
  }
  else {
    V_strncpy(param_1,local_114,param_2);
    local_120 = 1;
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_120;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)