L L4D2node

COM_CreatePath

0x00126610 · 143 bytes · __cdecl

_Z14COM_CreatePathPKc

Decompiled

undefined (1 param)

/* COM_CreatePath(char const*) */

void COM_CreatePath(char *param_1)

{
  char *pcVar1;
  int in_GS_OFFSET;
  char local_220;
  char local_21f [511];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  V_strncpy(&local_220,param_1,0x200);
  pcVar1 = local_21f;
  while (local_21f[0] != '\0') {
    while ((local_21f[0] != '\\' && (local_21f[0] != '/'))) {
      pcVar1 = pcVar1 + 1;
      local_21f[0] = *pcVar1;
      if (local_21f[0] == '\0') goto LAB_0012668c;
    }
    *pcVar1 = '\0';
    Sys_mkdir(&local_220);
    *pcVar1 = local_21f[0];
    local_21f[0] = pcVar1[1];
    pcVar1 = pcVar1 + 1;
  }
LAB_0012668c:
  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)