CUtlRBTree<ConVar*,int,bool(*)(ConVar*const&,ConVar*const&),CUtlMemory<UtlRBTreeNode_t<ConVar*,int>,int>>::NewNode
0x0012b0f0 · 301 bytes · __thiscall
_ZN10CUtlRBTreeIP6ConVariPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_iEiEE7NewNodeEv
Decompiled
undefined (1 param)
/* CUtlRBTree<ConVar*, int, bool (*)(ConVar* const&, ConVar* const&),
CUtlMemory<UtlRBTreeNode_t<ConVar*, int>, int> >::NewNode() */
int __thiscall
CUtlRBTree<ConVar*,int,bool(*)(ConVar*const&,ConVar*const&),CUtlMemory<UtlRBTreeNode_t<ConVar*,int>,int>>
::NewNode(CUtlRBTree<ConVar*,int,bool(*)(ConVar*const&,ConVar*const&),CUtlMemory<UtlRBTreeNode_t<ConVar*,int>,int>>
*this)
{
int iVar1;
undefined4 uVar2;
void *pvVar3;
int iVar4;
int iVar5;
int iVar6;
iVar6 = *(int *)(this + 0x18);
if (iVar6 != -1) {
uVar2 = *(undefined4 *)(*(int *)(this + 4) + 4 + iVar6 * 0x14);
*(int *)(this + 0x20) = *(int *)(this + 4);
*(undefined4 *)(this + 0x18) = uVar2;
return iVar6;
}
iVar6 = *(int *)(this + 0x1c);
iVar5 = *(int *)(this + 8);
if ((iVar6 < 0) || (iVar5 <= iVar6)) {
if (iVar5 < 1) goto LAB_0012b160;
LAB_0012b144:
iVar4 = 0;
}
else {
iVar4 = iVar6 + 1;
if ((-1 < iVar4) && (iVar4 < iVar5)) goto LAB_0012b146;
LAB_0012b160:
iVar4 = *(int *)(this + 0xc);
if (-1 < iVar4) {
iVar1 = iVar5 + 1;
if (iVar4 == 0) {
iVar4 = 2;
if (iVar5 != 0) {
iVar4 = iVar5;
}
while (iVar5 = iVar4, iVar5 < iVar1) {
iVar4 = iVar5 * 2;
}
}
else {
for (iVar5 = iVar4 * (iVar5 / iVar4 + 1); iVar5 < iVar1; iVar5 = (iVar5 + iVar1) / 2) {
}
}
*(int *)(this + 8) = iVar5;
if (*(void **)(this + 4) == (void *)0x0) {
pvVar3 = malloc(iVar5 * 0x14);
*(void **)(this + 4) = pvVar3;
}
else {
pvVar3 = realloc(*(void **)(this + 4),iVar5 * 0x14);
iVar6 = *(int *)(this + 0x1c);
*(void **)(this + 4) = pvVar3;
iVar5 = *(int *)(this + 8);
}
}
if ((iVar6 < 0) || (iVar5 <= iVar6)) {
if (0 < iVar5) goto LAB_0012b144;
}
else {
iVar4 = iVar6 + 1;
if (iVar4 < iVar5) goto LAB_0012b146;
}
Error("CUtlRBTree overflow!\n");
iVar4 = -1;
}
LAB_0012b146:
*(int *)(this + 0x1c) = iVar4;
*(undefined4 *)(this + 0x20) = *(undefined4 *)(this + 4);
return iVar4;
}
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.