ParseStringToExclusionArray
0x0051fea0 · 283 bytes · __cdecl
_Z27ParseStringToExclusionArrayPKcPA128_ci
Decompiled
undefined (3 params)
/* ParseStringToExclusionArray(char const*, char (*) [128], int) */
int ParseStringToExclusionArray(char *param_1,char *param_2,int param_3)
{
int iVar1;
undefined1 *puVar2;
int iVar3;
char *pcVar4;
char *pcVar5;
int in_GS_OFFSET;
char local_420 [1024];
int local_20;
iVar3 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar1 = _V_strlen(param_1);
if (iVar1 != 0) {
pcVar5 = local_420;
V_strncpy(pcVar5,param_1,0x400);
puVar2 = (undefined1 *)V_stristr(pcVar5," ");
if ((puVar2 == (undefined1 *)0x0) || (param_3 < 2)) {
iVar1 = 0;
iVar3 = 1;
}
else {
iVar1 = 0;
pcVar4 = param_2;
do {
iVar3 = iVar1;
*puVar2 = 0;
iVar1 = iVar3 + 1;
V_strncpy(pcVar4,pcVar5,0x80);
pcVar5 = puVar2 + 1;
puVar2 = (undefined1 *)V_stristr(pcVar5," ");
if (puVar2 == (undefined1 *)0x0) break;
pcVar4 = pcVar4 + 0x80;
} while (iVar1 != param_3 + -1);
iVar3 = iVar3 + 2;
iVar1 = iVar1 * 0x80;
}
_V_strcpy(param_2 + iVar1,pcVar5);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return iVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.