coerciblevariant_t::String
0x00644cf0 · 364 bytes · __thiscall
_ZN18coerciblevariant_t6StringEv
Decompiled
undefined (1 param)
/* coerciblevariant_t::String() */
undefined4 __thiscall coerciblevariant_t::String(coerciblevariant_t *this)
{
int iVar1;
char *pcVar2;
uint uVar3;
char *pcVar4;
undefined1 *puVar5;
undefined *puVar6;
char *pcVar7;
uVar3 = *(uint *)(this + 0x18);
if ((uVar3 & 8) != 0) goto LAB_00644da6;
switch(*(undefined4 *)(this + 0x14)) {
default:
switchD_00644d13_caseD_0:
puVar5 = operator_new__(1);
*(undefined1 **)(this + 0xc) = puVar5;
*puVar5 = 0;
uVar3 = *(uint *)(this + 0x18);
break;
case 1:
pcVar4 = operator_new__(0x20);
*(char **)(this + 0xc) = pcVar4;
V_snprintf(pcVar4,0x20,"%.3f",(double)*(float *)(this + 8));
uVar3 = *(uint *)(this + 0x18);
break;
case 2:
break;
case 5:
pcVar4 = operator_new__(0x18);
*(char **)(this + 0xc) = pcVar4;
V_snprintf(pcVar4,0x18,"%d",*(undefined4 *)(this + 4));
uVar3 = *(uint *)(this + 0x18);
break;
case 6:
pcVar4 = operator_new__(2);
*(char **)(this + 0xc) = pcVar4;
*pcVar4 = '1' - (*this == (coerciblevariant_t)0x0);
*(undefined1 *)(*(int *)(this + 0xc) + 1) = 0;
uVar3 = *(uint *)(this + 0x18);
break;
case 0xd:
uVar3 = *(uint *)(this + 0x10);
if ((((uVar3 == 0xffffffff) ||
(puVar6 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar6 + 8) != uVar3 >> 0xc)) || (iVar1 = *(int *)(puVar6 + 4), iVar1 == 0))
goto switchD_00644d13_caseD_0;
pcVar2 = operator_new__(0x40);
*(char **)(this + 0xc) = pcVar2;
pcVar4 = *(char **)(iVar1 + 0x154);
pcVar7 = "";
if (pcVar4 != (char *)0x0) {
pcVar7 = pcVar4;
}
V_strncpy(pcVar2,pcVar7,0x40);
uVar3 = *(uint *)(this + 0x18);
}
*(uint *)(this + 0x18) = uVar3 | 8;
LAB_00644da6:
return *(undefined4 *)(this + 0xc);
}
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.