BuildTokenList
0x0010bd40 · 277 bytes · __regparm3
_ZL14BuildTokenListPKccR10CUtlVectorI10CUtlString10CUtlMemoryIS2_iEE.constprop.140
Decompiled
undefined (3 params)
/* BuildTokenList(char const*, char, CUtlVector<CUtlString, CUtlMemory<CUtlString, int> >&) [clone
.constprop.140] */
void __regparm3 BuildTokenList(char *param_1,char param_2,CUtlVector *param_3)
{
char cVar1;
undefined4 uVar2;
int iVar3;
int iVar4;
char *pcVar5;
undefined3 in_register_00000009;
char *pcVar6;
int in_GS_OFFSET;
int iStackY_50;
int local_40 [4];
undefined1 local_30 [16];
int local_20;
local_40[0] = CONCAT31(in_register_00000009,param_2);
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iStackY_50 = 0x10bd61;
iVar4 = _V_strlen(param_1);
iVar3 = -((iVar4 + 0x10U & 0xfffffff0) + 0x10);
pcVar6 = (char *)((int)local_40 + iVar3);
*(int *)(&stack0xffffffbc + iVar3) = iVar4 + 1;
*(char **)(&stack0xffffffb8 + iVar3) = param_1;
*(char **)(local_30 + iVar3 + -0x1c) = pcVar6;
*(undefined4 *)((int)&iStackY_50 + iVar3) = 0x10bd86;
V_strncpy(*(char **)(local_30 + iVar3 + -0x1c),*(char **)(&stack0xffffffb8 + iVar3),
*(int *)(&stack0xffffffbc + iVar3));
*(undefined4 *)(&stack0xffffffb8 + iVar3) = 0x2c;
*(char **)(local_30 + iVar3 + -0x1c) = pcVar6;
*(undefined4 *)((int)&iStackY_50 + iVar3) = 0x10bd96;
pcVar5 = strchr(*(char **)(local_30 + iVar3 + -0x1c),*(int *)(&stack0xffffffb8 + iVar3));
if (pcVar5 != (char *)0x0) {
do {
cVar1 = *pcVar5;
*pcVar5 = '\0';
if (*pcVar6 != '\0') {
*(char **)(&stack0xffffffb8 + iVar3) = pcVar6;
*(undefined1 **)(local_30 + iVar3 + -0x1c) = local_30;
*(undefined4 *)((int)&iStackY_50 + iVar3) = 0x10bddb;
CUtlString::CUtlString
(*(CUtlString **)(local_30 + iVar3 + -0x1c),*(char **)(&stack0xffffffb8 + iVar3));
iVar4 = local_40[0];
*(undefined1 **)(&stack0xffffffbc + iVar3) = local_30;
uVar2 = *(undefined4 *)(iVar4 + 0xc);
*(int *)(local_30 + iVar3 + -0x1c) = iVar4;
*(undefined4 *)(&stack0xffffffb8 + iVar3) = uVar2;
/* try { // try from 0010bdef to 0010bdf3 has its CatchHandler @ 0010be71 */
*(undefined4 *)((int)&iStackY_50 + iVar3) = 0x10bdf4;
CUtlVector<CUtlString,CUtlMemory<CUtlString,int>>::InsertBefore
(*(CUtlVector<CUtlString,CUtlMemory<CUtlString,int>> **)(local_30 + iVar3 + -0x1c)
,*(int *)(&stack0xffffffb8 + iVar3),*(CUtlString **)(&stack0xffffffbc + iVar3));
*(undefined1 **)(local_30 + iVar3 + -0x1c) = local_30;
*(undefined4 *)((int)&iStackY_50 + iVar3) = 0x10bdff;
CUtlMemory<unsigned_char,int>::Purge
(*(CUtlMemory<unsigned_char,int> **)(local_30 + iVar3 + -0x1c));
}
pcVar6 = pcVar5 + 1;
*pcVar5 = cVar1;
*(undefined4 *)(&stack0xffffffb8 + iVar3) = 0x2c;
*(char **)(local_30 + iVar3 + -0x1c) = pcVar6;
*(undefined4 *)((int)&iStackY_50 + iVar3) = 0x10bdb7;
pcVar5 = strchr(*(char **)(local_30 + iVar3 + -0x1c),*(int *)(&stack0xffffffb8 + iVar3));
} while ((pcVar5 != (char *)0x0) && (pcVar6 != (char *)0x0));
if (pcVar6 == (char *)0x0) goto LAB_0010be12;
}
if (*pcVar6 != '\0') {
*(char **)(&stack0xffffffb8 + iVar3) = pcVar6;
*(undefined1 **)(local_30 + iVar3 + -0x1c) = local_30;
*(undefined4 *)((int)&iStackY_50 + iVar3) = 0x10be3f;
CUtlString::CUtlString
(*(CUtlString **)(local_30 + iVar3 + -0x1c),*(char **)(&stack0xffffffb8 + iVar3));
iVar4 = local_40[0];
*(undefined1 **)(&stack0xffffffbc + iVar3) = local_30;
uVar2 = *(undefined4 *)(iVar4 + 0xc);
*(int *)(local_30 + iVar3 + -0x1c) = iVar4;
*(undefined4 *)(&stack0xffffffb8 + iVar3) = uVar2;
/* try { // try from 0010be50 to 0010be54 has its CatchHandler @ 0010be5f */
*(undefined4 *)((int)&iStackY_50 + iVar3) = 0x10be55;
CUtlVector<CUtlString,CUtlMemory<CUtlString,int>>::InsertBefore
(*(CUtlVector<CUtlString,CUtlMemory<CUtlString,int>> **)(local_30 + iVar3 + -0x1c),
*(int *)(&stack0xffffffb8 + iVar3),*(CUtlString **)(&stack0xffffffbc + iVar3));
*(undefined1 **)(local_30 + iVar3 + -0x1c) = local_30;
*(undefined4 *)((int)&iStackY_50 + iVar3) = 0x10be5d;
CUtlMemory<unsigned_char,int>::Purge
(*(CUtlMemory<unsigned_char,int> **)(local_30 + iVar3 + -0x1c));
}
LAB_0010be12:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
*(undefined **)((int)&iStackY_50 + iVar3) = &UNK_0010be8b;
__stack_chk_fail();
}
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.