VOX_ParseString
0x000f0260 · 533 bytes · __cdecl
_Z15VOX_ParseStringPc
Decompiled
undefined (1 param)
/* VOX_ParseString(char*) */
undefined4 * VOX_ParseString(char *param_1)
{
byte bVar1;
byte bVar2;
characterset_t cVar3;
bool bVar4;
undefined4 *puVar5;
int iVar6;
int iVar7;
byte *pbVar8;
int in_GS_OFFSET;
characterset_t local_220 [256];
characterset_t local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
puVar5 = &rgpparseword;
for (iVar6 = 0x20; iVar6 != 0; iVar6 = iVar6 + -1) {
*puVar5 = 0;
puVar5 = puVar5 + 1;
}
if (param_1 == (char *)0x0) {
puVar5 = (undefined4 *)0x0;
}
else {
iVar6 = 1;
rgpparseword = param_1;
CharacterSetBuild(local_220," ,.({");
CharacterSetBuild(local_120,"., ");
bVar4 = false;
while (((!bVar4 && (iVar6 < 0x20)) && (bVar1 = *param_1, pbVar8 = (byte *)param_1, bVar1 != 0)))
{
while (local_220[(char)bVar1] == (characterset_t)0x0) {
pbVar8 = pbVar8 + 1;
bVar1 = *pbVar8;
if (bVar1 == 0) goto LAB_000f03b7;
}
if (bVar1 == 0x7b) {
bVar1 = *pbVar8;
while ((bVar1 != 0 && (bVar1 != 0x7d))) {
pbVar8 = pbVar8 + 1;
bVar1 = *pbVar8;
}
LAB_000f0340:
bVar1 = pbVar8[1];
pbVar8 = pbVar8 + 1;
if (bVar1 == 0) break;
}
else if (bVar1 == 0x28) {
bVar1 = *pbVar8;
while ((bVar1 != 0 && (bVar1 != 0x29))) {
pbVar8 = pbVar8 + 1;
bVar1 = *pbVar8;
}
goto LAB_000f0340;
}
bVar2 = pbVar8[1];
iVar7 = (int)(char)bVar2;
if ((bVar1 & 0xfd) == 0x2c) {
if ((bVar2 == 10) || (bVar2 == 0xd)) {
*pbVar8 = 0;
goto LAB_000f0367;
}
if (bVar2 != 0) {
if (bVar1 == 0x2e) {
(&rgpparseword)[iVar6] = voxperiod;
}
else {
(&rgpparseword)[iVar6] = voxcomma;
}
iVar6 = iVar6 + 1;
if (iVar6 < 0x20) {
iVar7 = (int)(char)pbVar8[1];
goto LAB_000f035d;
}
break;
}
param_1 = (char *)(pbVar8 + 1);
*pbVar8 = 0;
bVar4 = true;
}
else {
LAB_000f035d:
param_1 = (char *)(pbVar8 + 1);
*pbVar8 = 0;
if ((char)iVar7 == '\0') {
LAB_000f0398:
bVar4 = true;
}
else {
LAB_000f0367:
param_1 = (char *)(pbVar8 + 1);
cVar3 = local_120[iVar7];
while (cVar3 != (characterset_t)0x0) {
param_1 = param_1 + 1;
if (*param_1 == 0) goto LAB_000f0398;
cVar3 = local_120[*param_1];
}
(&rgpparseword)[iVar6] = param_1;
bVar4 = false;
iVar6 = iVar6 + 1;
}
}
}
LAB_000f03b7:
puVar5 = &rgpparseword;
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return puVar5;
}
/* 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.