L L4D2node

FileSystem_GetFileSystemDLLName

0x000d8560 · 243 bytes · __cdecl

_Z31FileSystem_GetFileSystemDLLNamePciRb

Decompiled

undefined (3 params)

/* FileSystem_GetFileSystemDLLName(char*, int, bool&) */

undefined4 FileSystem_GetFileSystemDLLName(char *param_1,int param_2,bool *param_3)

{
  char cVar1;
  int iVar2;
  int in_GS_OFFSET;
  undefined4 local_180;
  undefined1 local_17c [88];
  char local_124 [260];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *param_3 = false;
  cVar1 = FileSystem_GetExecutableDir(local_124,0x104);
  if (cVar1 == '\0') {
    local_180 = SetupFileSystemError(0,3,"FileSystem_GetExecutableDir failed.");
  }
  else {
    V_snprintf(param_1,param_2,"%s%cfilesystem_stdio_srv.so",local_124,0x2f);
    iVar2 = __wrap___xstat(3,param_1,local_17c);
    local_180 = 0;
    if (iVar2 != 0) {
      local_180 = 0;
      V_snprintf(param_1,param_2,"%s%cfilesystem_steam_srv.so",local_124,0x2f);
      *param_3 = true;
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return local_180;
  }
                    /* 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)