VOX_GroupAdd
0x000f2ee0 · 361 bytes · __cdecl
_Z12VOX_GroupAddPKc
Decompiled
undefined (1 param)
/* VOX_GroupAdd(char const*) */
int VOX_GroupAdd(char *param_1)
{
undefined2 *puVar1;
int iVar2;
size_t sVar3;
uint uVar4;
short *psVar5;
int iVar6;
int iVar7;
undefined1 *puVar8;
int in_GS_OFFSET;
int iStackY_40;
int local_30 [3];
short local_24;
undefined2 local_22;
int local_20;
puVar8 = &stack0xffffffc4;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iStackY_40 = 0xf2eff;
sVar3 = strlen(param_1);
iVar6 = sVar3 - 1;
if ((iVar6 < 1) || (9 < (int)param_1[sVar3 - 1] - 0x30U)) {
iVar6 = -1;
}
else {
do {
if (9 < (int)param_1[iVar6] - 0x30U) {
iVar7 = iVar6 + 2;
uVar4 = iVar6 + 0x11U & 0xfffffff0;
goto LAB_000f2f3f;
}
iVar6 = iVar6 + -1;
} while (iVar6 != 0);
iVar7 = 2;
uVar4 = 0x10;
LAB_000f2f3f:
iVar2 = -(uVar4 + 0x10);
puVar8 = &stack0xffffffc4 + iVar2;
*(int *)(&stack0xffffffcc + iVar2) = iVar7;
local_30[0] = (int)local_30 + iVar2;
*(char **)(&stack0xffffffc8 + iVar2) = param_1;
iVar6 = local_30[0];
*(int *)(&stack0xffffffc4 + iVar2) = local_30[0];
*(undefined4 *)((int)&iStackY_40 + iVar2) = 0xf2f62;
V_strncpy(*(char **)(&stack0xffffffc4 + iVar2),*(char **)(&stack0xffffffc8 + iVar2),
*(int *)(&stack0xffffffcc + iVar2));
*(int *)(&stack0xffffffcc + iVar2) = iVar6;
*(undefined1 **)(&stack0xffffffc8 + iVar2) = sentencegroup_t::s_SymbolTable;
*(short **)(&stack0xffffffc4 + iVar2) = &local_24;
*(undefined4 *)((int)&iStackY_40 + iVar2) = 0xf2f79;
CUtlSymbolTable::AddString(*(char **)(&stack0xffffffc4 + iVar2));
if (DAT_00350424 < 1) {
LAB_000f2fca:
*(int *)(&stack0xffffffc8 + iVar2) = DAT_00350424;
*(int **)(&stack0xffffffc4 + iVar2) = &g_SentenceGroups;
*(undefined4 *)((int)&iStackY_40 + iVar2) = 0xf2fda;
iVar6 = CUtlVector<sentencegroup_t,CUtlMemory<sentencegroup_t,int>>::InsertBefore
(*(CUtlVector<sentencegroup_t,CUtlMemory<sentencegroup_t,int>> **)
(&stack0xffffffc4 + iVar2),*(int *)(&stack0xffffffc8 + iVar2));
iVar7 = local_30[0];
*(undefined1 **)(&stack0xffffffc8 + iVar2) = sentencegroup_t::s_SymbolTable;
*(int *)(&stack0xffffffcc + iVar2) = iVar7;
puVar1 = (undefined2 *)(g_SentenceGroups + iVar6 * 6);
*(undefined2 **)(&stack0xffffffc4 + iVar2) = &local_22;
*(undefined4 *)((int)&iStackY_40 + iVar2) = 0xf3001;
CUtlSymbolTable::AddString(*(char **)(&stack0xffffffc4 + iVar2));
puVar1[2] = local_22;
*puVar1 = 1;
}
else {
iVar6 = 0;
psVar5 = (short *)(g_SentenceGroups + ((DAT_00350424 + -1) % DAT_00350424) * 6);
if (psVar5[2] == local_24) {
iVar6 = 0;
}
else {
do {
iVar6 = iVar6 + 1;
if (iVar6 == DAT_00350424) goto LAB_000f2fca;
psVar5 = (short *)(g_SentenceGroups + ((DAT_00350424 + -1 + iVar6) % DAT_00350424) * 6);
} while (psVar5[2] != local_24);
}
*psVar5 = *psVar5 + 1;
puVar8 = &stack0xffffffc4 + iVar2;
}
}
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
*(undefined **)(puVar8 + -4) = &UNK_000f305a;
__stack_chk_fail();
}
return iVar6;
}
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.