VOX_BuildVirtualNameList
0x000f2b00 · 981 bytes · __regparm3
_ZL24VOX_BuildVirtualNameListPcR10CUtlVectorI7WordBuf10CUtlMemoryIS1_iEE
Decompiled
undefined (2 params)
/* WARNING: Type propagation algorithm not settling */
/* VOX_BuildVirtualNameList(char*, CUtlVector<WordBuf, CUtlMemory<WordBuf, int> >&) */
void __regparm3 VOX_BuildVirtualNameList(char *param_1,CUtlVector *param_2)
{
char cVar1;
int iVar2;
int iVar3;
int in_GS_OFFSET;
char local_240 [8];
char local_238;
undefined1 local_237;
char local_220 [255];
char cStack_121;
WordBuf local_120 [7];
char local_119;
undefined1 local_118;
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar2 = _V_strlen(param_1);
cVar1 = param_1[iVar2 + -1];
V_strncpy(local_220,param_1,0x100);
iVar2 = _V_strstr(local_220,"_MAP__");
if (iVar2 != 0) {
if (0 < g_cmapnames) {
iVar3 = 0;
do {
*(undefined1 *)(iVar2 + 4) = 0x30;
if (iVar3 < 10) {
V_snprintf((char *)(iVar2 + 5),1,"%1d",iVar3);
}
else {
V_snprintf((char *)(iVar2 + 4),2,"%d",iVar3);
}
iVar3 = iVar3 + 1;
VOX_BuildVirtualNameList(local_220,param_2);
} while (iVar3 < g_cmapnames);
}
goto LAB_000f2c95;
}
iVar2 = _V_strstr(local_220,"V_MYNAME");
if (((iVar2 == 0) && (iVar2 = _V_strstr(local_220,"V_MYNUM"), iVar2 == 0)) &&
(iVar2 = _V_strstr(local_220,"V_RND"), iVar2 == 0)) {
iVar2 = _V_strstr(local_220,"V_DIST");
if ((iVar2 == 0) && (iVar2 = _V_strstr(local_220,"V_DIR"), iVar2 == 0)) {
iVar2 = _V_strstr(local_220,"V_IDIED");
if (iVar2 != 0) {
_V_strcpy(local_240,"V_MYNAME");
local_237 = 0;
local_238 = cVar1;
_V_strcpy((char *)local_120,"V_MYNUM");
local_118 = 0;
local_119 = cVar1;
VOX_BuildVirtualNameList(local_240,param_2);
VOX_BuildVirtualNameList((char *)local_120,param_2);
goto LAB_000f2c95;
}
iVar2 = _V_strstr(local_220,"V_WHODIED");
if (iVar2 == 0) {
iVar2 = _V_strstr(local_220,"V_SECTOR");
if (((iVar2 != 0) || (iVar2 = _V_strstr(local_220,"V_GRIDX"), iVar2 != 0)) ||
(iVar2 = _V_strstr(local_220,"V_GRIDY"), iVar2 != 0)) goto LAB_000f2d02;
iVar2 = _V_strstr(local_220,"V_G0_");
if (((((iVar2 != 0) || (iVar2 = _V_strstr(local_220,"V_G1_"), iVar2 != 0)) ||
(iVar2 = _V_strstr(local_220,"V_G2_"), iVar2 != 0)) ||
((iVar2 = _V_strstr(local_220,"V_G3_"), iVar2 != 0 ||
(iVar2 = _V_strstr(local_220,"V_SEQG0_"), iVar2 != 0)))) ||
((iVar2 = _V_strstr(local_220,"V_SEQG1_"), iVar2 != 0 ||
((iVar2 = _V_strstr(local_220,"V_SEQG2_"), iVar2 != 0 ||
(iVar2 = _V_strstr(local_220,"V_SEQG3_"), iVar2 != 0)))))) goto LAB_000f2c0f;
}
}
else {
LAB_000f2d02:
VOX_AddNumbers(local_220,param_2);
}
}
else {
LAB_000f2c0f:
VOX_AddRndVirtual(local_220,param_2);
}
iVar2 = V_strnicmp(local_220,"V_",2);
if (iVar2 != 0) {
local_120[0] = (WordBuf)0x0;
V_strncpy((char *)local_120,local_220,0x100);
while ((iVar2 = _V_strlen((char *)local_120), 0 < iVar2 &&
(iVar2 = _V_strlen((char *)local_120), (&cStack_121)[iVar2] == ' '))) {
iVar2 = _V_strlen((char *)local_120);
(&cStack_121)[iVar2] = '\0';
}
CUtlVector<WordBuf,CUtlMemory<WordBuf,int>>::InsertBefore
((CUtlVector<WordBuf,CUtlMemory<WordBuf,int>> *)param_2,*(int *)(param_2 + 0xc),
local_120);
}
LAB_000f2c95:
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.