Sys_mkdir
0x00214d50 · 297 bytes · __cdecl
_Z9Sys_mkdirPKc
Decompiled
undefined (1 param)
/* Sys_mkdir(char const*) */
void Sys_mkdir(char *param_1)
{
char *pcVar1;
char cVar2;
int iVar3;
undefined *puVar4;
int in_GS_OFFSET;
char acStack_125 [261];
int local_20;
pcVar1 = acStack_125 + 1;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
V_strncpy(pcVar1,param_1,0x104);
iVar3 = _V_strlen(pcVar1);
if (0 < iVar3) {
if (acStack_125[iVar3] == '/') {
acStack_125[iVar3] = '\0';
}
else if (acStack_125[iVar3] == '\\') {
acStack_125[iVar3] = '\0';
}
}
if (((acStack_125[1] == '/') || (puVar4 = &DAT_002a0772, acStack_125[1] == '\\')) &&
((acStack_125[2] == '/' || (puVar4 = &DAT_002a0772, acStack_125[2] == '\\')))) {
puVar4 = (undefined *)0x0;
}
cVar2 = (**(code **)(g_pFileSystem[1] + 0x28))(g_pFileSystem + 1,pcVar1,puVar4);
if ((cVar2 != '\0') &&
(cVar2 = (**(code **)(*g_pFileSystem + 0x4c))(g_pFileSystem,pcVar1,puVar4), cVar2 == '\0')) {
(**(code **)(*g_pFileSystem + 0x40))(g_pFileSystem,pcVar1,puVar4);
}
(**(code **)(*g_pFileSystem + 0x48))(g_pFileSystem,param_1,puVar4);
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.