CUtlRBTree<CUtlMap<char_const*,CActivityRemapCache,int>::Node_t,int,CUtlMap<char_const*,CActivityRemapCache,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CActivityRemapCache,int>::Node_t,int>,int>>::NewNode
0x003f8280 · 365 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIPKc19CActivityRemapCacheiE6Node_tEiNS4_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS5_iEiEE7NewNodeEv
Decompiled
undefined (1 param)
/* CUtlRBTree<CUtlMap<char const*, CActivityRemapCache, int>::Node_t, int, CUtlMap<char const*,
CActivityRemapCache, int>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<char const*,
CActivityRemapCache, int>::Node_t, int>, int> >::NewNode() */
int __thiscall
CUtlRBTree<CUtlMap<char_const*,CActivityRemapCache,int>::Node_t,int,CUtlMap<char_const*,CActivityRemapCache,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CActivityRemapCache,int>::Node_t,int>,int>>
::NewNode(CUtlRBTree<CUtlMap<char_const*,CActivityRemapCache,int>::Node_t,int,CUtlMap<char_const*,CActivityRemapCache,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CActivityRemapCache,int>::Node_t,int>,int>>
*this)
{
int iVar1;
int iVar2;
void *pvVar3;
int iVar4;
int iVar5;
int iVar6;
iVar5 = *(int *)(this + 0x18);
if (iVar5 != -1) {
iVar6 = *(int *)(this + 4);
iVar2 = iVar6 + iVar5 * 0x28;
*(undefined4 *)(this + 0x18) = *(undefined4 *)(iVar2 + 4);
goto LAB_003f82a3;
}
iVar6 = *(int *)(this + 0x1c);
iVar2 = *(int *)(this + 8);
if ((iVar6 < 0) || (iVar2 <= iVar6)) {
if (iVar2 < 1) goto LAB_003f8320;
LAB_003f830c:
iVar2 = 0;
iVar5 = 0;
}
else {
iVar4 = iVar6 + 1;
if ((iVar4 < 0) || (iVar2 <= iVar4)) {
LAB_003f8320:
iVar4 = *(int *)(this + 0xc);
if (-1 < iVar4) {
iVar1 = iVar2 + 1;
if (iVar4 == 0) {
iVar4 = 1;
if (iVar2 != 0) {
iVar4 = iVar2;
}
while (iVar2 = iVar4, iVar2 < iVar1) {
iVar4 = iVar2 * 2;
}
}
else {
for (iVar2 = iVar4 * (iVar2 / iVar4 + 1); iVar2 < iVar1; iVar2 = (iVar2 + iVar1) / 2) {
}
}
*(int *)(this + 8) = iVar2;
if (*(void **)(this + 4) == (void *)0x0) {
pvVar3 = malloc(iVar2 * 0x28);
*(void **)(this + 4) = pvVar3;
}
else {
pvVar3 = realloc(*(void **)(this + 4),iVar2 * 0x28);
iVar6 = *(int *)(this + 0x1c);
*(void **)(this + 4) = pvVar3;
iVar2 = *(int *)(this + 8);
}
}
if ((iVar6 < 0) || (iVar2 <= iVar6)) {
if (0 < iVar2) goto LAB_003f830c;
}
else {
iVar6 = iVar6 + 1;
if ((-1 < iVar6) && (iVar6 < iVar2)) {
iVar2 = iVar6 * 0x28;
iVar5 = iVar6;
goto LAB_003f8310;
}
}
Error("CUtlRBTree overflow!\n");
iVar2 = -0x28;
}
else {
iVar2 = iVar4 * 0x28;
iVar5 = iVar4;
}
}
LAB_003f8310:
iVar6 = *(int *)(this + 4);
*(int *)(this + 0x1c) = iVar5;
iVar2 = iVar2 + iVar6;
LAB_003f82a3:
if (iVar2 != -0x10) {
*(undefined4 *)(iVar2 + 0x14) = 0;
*(undefined4 *)(iVar2 + 0x18) = 0;
*(undefined4 *)(iVar2 + 0x1c) = 0;
*(undefined4 *)(iVar2 + 0x20) = 0;
*(undefined4 *)(iVar2 + 0x24) = 0;
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.