CUtlBuffer::GetToken
0x00b7eea0 · 343 bytes · __thiscall
_ZN10CUtlBuffer8GetTokenEPKc
Decompiled
undefined (2 params)
/* CUtlBuffer::GetToken(char const*) */
char __thiscall CUtlBuffer::GetToken(CUtlBuffer *this,char *param_1)
{
int iVar1;
char cVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int iVar8;
char *pcVar9;
CUtlBuffer *this_00;
int in_stack_ffffffc8;
int in_stack_ffffffcc;
this_00 = (CUtlBuffer *)param_1;
iVar3 = _V_strlen(param_1);
iVar1 = *(int *)(this + 0xc);
iVar8 = (*(int *)(this + 4) - iVar1) + *(int *)(this + 0x20);
iVar4 = *(int *)(this + 4);
if (iVar3 < iVar8) {
iVar4 = iVar8;
}
for (iVar8 = *(int *)(this + 0x1c) - iVar1; iVar3 <= iVar8; iVar8 = iVar8 + iVar3) {
iVar5 = iVar4;
if (iVar8 <= iVar4) {
iVar5 = iVar8;
}
if ((((byte)this[0x14] & 2) != 0) ||
(cVar2 = CheckPeekGet(this_00,in_stack_ffffffc8,in_stack_ffffffcc), cVar2 == '\0')) break;
pcVar9 = (char *)((*(int *)(this + 0xc) - *(int *)(this + 0x20)) + *(int *)this);
iVar6 = V_strnistr(pcVar9,param_1,iVar5);
iVar7 = iVar6 - (int)pcVar9;
if ((iVar4 < iVar8) && (iVar7 == *(int *)(this + 4) - iVar3)) {
iVar8 = iVar8 - iVar5;
if (iVar6 == 0) {
LAB_00b7ef98:
if (iVar8 < iVar3) break;
}
}
else {
if (iVar6 != 0) {
SeekGet(this,1,iVar7 + iVar3);
return cVar2;
}
iVar8 = iVar8 - iVar5;
if (cVar2 != '\0') goto LAB_00b7ef98;
}
iVar4 = *(int *)(this + 4);
in_stack_ffffffc8 = 1;
in_stack_ffffffcc = iVar5 - iVar3;
this_00 = this;
SeekGet();
}
SeekGet(this,0,iVar1);
return '\0';
}
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.