VOX_ParseWordParams
0x000f0560 · 763 bytes · __cdecl
_Z19VOX_ParseWordParamsPcP9voxword_ti
Decompiled
undefined (3 params)
/* VOX_ParseWordParams(char*, voxword_t*, int) */
undefined4 VOX_ParseWordParams(char *param_1,voxword_t *param_2,int param_3)
{
characterset_t cVar1;
size_t sVar2;
undefined4 uVar3;
char *pcVar4;
char *pcVar5;
long lVar6;
char cVar7;
char *pcVar8;
int in_GS_OFFSET;
char local_22d;
char local_228 [8];
characterset_t local_220 [256];
characterset_t local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
CharacterSetBuild(local_220,"vpset)");
if (param_3 != 0) {
DAT_00350444 = 0xffffffff;
VOX_ParseWordParams(char*,voxword_t*,int)::voxwordDefault = 100;
DAT_00350448 = 0;
DAT_0035044c = 100;
DAT_00350454 = 0;
DAT_0035045c = 0;
}
*(undefined4 *)param_2 = VOX_ParseWordParams(char*,voxword_t*,int)::voxwordDefault;
*(undefined4 *)(param_2 + 4) = DAT_00350444;
*(undefined4 *)(param_2 + 8) = DAT_00350448;
*(undefined4 *)(param_2 + 0xc) = DAT_0035044c;
*(undefined4 *)(param_2 + 0x10) = DAT_00350450;
*(undefined4 *)(param_2 + 0x14) = DAT_00350454;
*(undefined4 *)(param_2 + 0x18) = DAT_00350458;
*(undefined4 *)(param_2 + 0x1c) = DAT_0035045c;
*(undefined4 *)(param_2 + 0x20) = DAT_00350460;
sVar2 = strlen(param_1);
if (param_1[sVar2 - 1] == ')') {
CharacterSetBuild(local_120,"()");
cVar7 = *param_1;
cVar1 = local_120[cVar7];
pcVar4 = param_1;
while (cVar1 == (characterset_t)0x0) {
pcVar4 = pcVar4 + 1;
cVar7 = *pcVar4;
cVar1 = local_120[cVar7];
}
if (cVar7 == ')') {
uVar3 = 0;
goto LAB_000f063d;
}
*pcVar4 = '\0';
pcVar8 = pcVar4 + 1;
local_22d = pcVar4[1];
LAB_000f06c8:
while (local_22d == '\0') {
LAB_000f06f3:
cVar7 = pcVar8[1];
pcVar4 = pcVar8 + 1;
local_228[0] = '\0';
local_228[1] = '\0';
local_228[2] = '\0';
local_228[3] = '\0';
local_228[4] = '\0';
local_228[5] = '\0';
local_228[6] = '\0';
local_228[7] = '\0';
if (9 < (int)cVar7 - 0x30U) goto LAB_000f0808;
pcVar5 = local_228;
do {
pcVar4 = pcVar4 + 1;
*pcVar5 = cVar7;
cVar7 = *pcVar4;
if (9 < (int)cVar7 - 0x30U) break;
pcVar5 = pcVar5 + 1;
} while (pcVar4 != pcVar8 + 8);
lVar6 = strtol(local_228,(char **)0x0,10);
pcVar8 = pcVar4;
switch(local_22d) {
case 'e':
*(long *)(param_2 + 0xc) = lVar6;
local_22d = cVar7;
break;
default:
local_22d = cVar7;
break;
case 'p':
*(long *)(param_2 + 4) = lVar6;
local_22d = cVar7;
break;
case 's':
*(long *)(param_2 + 8) = lVar6;
local_22d = cVar7;
break;
case 't':
*(long *)(param_2 + 0x1c) = lVar6;
local_22d = cVar7;
break;
case 'v':
*(long *)param_2 = lVar6;
local_22d = cVar7;
}
}
if (local_220[local_22d] == (characterset_t)0x0) {
pcVar4 = pcVar8 + 1;
pcVar8 = pcVar8 + 1;
local_22d = *pcVar4;
goto LAB_000f06c8;
}
if (local_22d != ')') goto LAB_000f06f3;
LAB_000f0808:
if (*param_1 == '\0') {
VOX_ParseWordParams(char*,voxword_t*,int)::voxwordDefault = *(undefined4 *)param_2;
DAT_00350444 = *(undefined4 *)(param_2 + 4);
DAT_00350448 = *(undefined4 *)(param_2 + 8);
DAT_0035044c = *(undefined4 *)(param_2 + 0xc);
DAT_00350450 = *(undefined4 *)(param_2 + 0x10);
DAT_00350454 = *(undefined4 *)(param_2 + 0x14);
DAT_00350458 = *(undefined4 *)(param_2 + 0x18);
DAT_0035045c = *(undefined4 *)(param_2 + 0x1c);
DAT_00350460 = *(undefined4 *)(param_2 + 0x20);
uVar3 = 0;
goto LAB_000f063d;
}
}
uVar3 = 1;
LAB_000f063d:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return uVar3;
}
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.