CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>::NewNode
0x0018f000 · 330 bytes · __thiscall
_ZN10CUtlRBTreeI10CUtlStringiPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_iEiEE7NewNodeEv
Decompiled
undefined (1 param)
/* CUtlRBTree<CUtlString, int, bool (*)(CUtlString const&, CUtlString const&),
CUtlMemory<UtlRBTreeNode_t<CUtlString, int>, int> >::NewNode() */
int __thiscall
CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
::NewNode(CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
*this)
{
int iVar1;
void *pvVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
iVar5 = *(int *)(this + 0x18);
if (iVar5 != -1) {
iVar6 = *(int *)(this + 4);
iVar4 = iVar5 * 0x20 + iVar6;
*(undefined4 *)(this + 0x18) = *(undefined4 *)(iVar4 + 4);
goto LAB_0018f024;
}
iVar6 = *(int *)(this + 0x1c);
iVar4 = *(int *)(this + 8);
if ((iVar6 < 0) || (iVar4 <= iVar6)) {
if (iVar4 < 1) goto LAB_0018f088;
LAB_0018f074:
iVar4 = 0;
iVar5 = 0;
}
else {
iVar3 = iVar6 + 1;
if ((iVar3 < 0) || (iVar4 <= iVar3)) {
LAB_0018f088:
iVar3 = *(int *)(this + 0xc);
if (-1 < iVar3) {
iVar1 = iVar4 + 1;
if (iVar3 == 0) {
iVar3 = 1;
if (iVar4 != 0) {
iVar3 = iVar4;
}
while (iVar4 = iVar3, iVar4 < iVar1) {
iVar3 = iVar4 * 2;
}
}
else {
for (iVar4 = iVar3 * (iVar4 / iVar3 + 1); iVar4 < iVar1; iVar4 = (iVar4 + iVar1) / 2) {
}
}
*(int *)(this + 8) = iVar4;
if (*(void **)(this + 4) == (void *)0x0) {
pvVar2 = malloc(iVar4 << 5);
*(void **)(this + 4) = pvVar2;
}
else {
pvVar2 = realloc(*(void **)(this + 4),iVar4 << 5);
iVar6 = *(int *)(this + 0x1c);
*(void **)(this + 4) = pvVar2;
iVar4 = *(int *)(this + 8);
}
}
if ((iVar6 < 0) || (iVar4 <= iVar6)) {
if (0 < iVar4) goto LAB_0018f074;
}
else {
iVar6 = iVar6 + 1;
if ((-1 < iVar6) && (iVar6 < iVar4)) {
iVar4 = iVar6 * 0x20;
iVar5 = iVar6;
goto LAB_0018f078;
}
}
Error("CUtlRBTree overflow!\n");
iVar4 = -0x20;
}
else {
iVar4 = iVar3 * 0x20;
iVar5 = iVar3;
}
}
LAB_0018f078:
iVar6 = *(int *)(this + 4);
*(int *)(this + 0x1c) = iVar5;
iVar4 = iVar4 + iVar6;
LAB_0018f024:
if ((CUtlString *)(iVar4 + 0x10) != (CUtlString *)0x0) {
CUtlString::CUtlString((CUtlString *)(iVar4 + 0x10));
iVar6 = *(int *)(this + 4);
}
*(int *)(this + 0x20) = iVar6;
return iVar5;
}
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.