L L4D2node

FileSystem_MountContent

0x000d8e00 · 266 bytes · __cdecl

_Z23FileSystem_MountContentR19CFSMountContentInfo

Decompiled

undefined (1 param)

/* FileSystem_MountContent(CFSMountContentInfo&) */

void FileSystem_MountContent(CFSMountContentInfo *param_1)

{
  char cVar1;
  int iVar2;
  int extraout_EDX;
  int in_GS_OFFSET;
  undefined8 uVar3;
  int local_22c;
  char local_228 [260];
  char local_124 [260];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  cVar1 = (**(code **)(**(int **)(param_1 + 8) + 0x14))(*(int **)(param_1 + 8));
  if (cVar1 != '\0') {
    local_22c = -1;
    iVar2 = extraout_EDX;
    if (*param_1 != (CFSMountContentInfo)0x0) {
      uVar3 = GetSteamExtraAppId(*(char **)(param_1 + 4),&local_22c);
      iVar2 = (int)((ulonglong)uVar3 >> 0x20);
      if ((int)uVar3 != 0) goto LAB_000d8eb2;
    }
    cVar1 = FileSystem_GetBaseDir(local_228,iVar2);
    if (cVar1 == '\0') {
      SetupFileSystemError(0,3,"FileSystem_GetBaseDir failed.");
      goto LAB_000d8eb2;
    }
    Q_getwd(local_124,0x104);
    chdir(local_228);
    iVar2 = (**(code **)(**(int **)(param_1 + 8) + 0x18))(*(int **)(param_1 + 8),local_22c);
    chdir(local_124);
    if (iVar2 != 0) {
      SetupFileSystemError(1,4,"Unable to mount Steam content in the file system");
      goto LAB_000d8eb2;
    }
  }
  FileSystem_SetBasePaths(*(IFileSystem **)(param_1 + 8));
LAB_000d8eb2:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* 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)