CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int>,int>>::NewNode
0x005d5ac0 · 350 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIPKc16ConceptHistory_tiE6Node_tEiNS4_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS5_iEiEE7NewNodeEv
Decompiled
undefined (1 param)
/* CUtlRBTree<CUtlMap<char const*, ConceptHistory_t, int>::Node_t, int, CUtlMap<char const*,
ConceptHistory_t, int>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<char const*,
ConceptHistory_t, int>::Node_t, int>, int> >::NewNode() */
int __thiscall
CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int>,int>>
::NewNode(CUtlRBTree<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,int,CUtlMap<char_const*,ConceptHistory_t,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,ConceptHistory_t,int>::Node_t,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 * 0xd4 + iVar6;
*(undefined4 *)(this + 0x18) = *(undefined4 *)(iVar4 + 4);
goto LAB_005d5ae5;
}
iVar6 = *(int *)(this + 0x1c);
iVar4 = *(int *)(this + 8);
if ((iVar6 < 0) || (iVar4 <= iVar6)) {
if (iVar4 < 1) goto LAB_005d5b50;
LAB_005d5b3c:
iVar4 = 0;
iVar5 = 0;
}
else {
iVar3 = iVar6 + 1;
if ((iVar3 < 0) || (iVar4 <= iVar3)) {
LAB_005d5b50:
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 * 0xd4);
*(void **)(this + 4) = pvVar2;
}
else {
pvVar2 = realloc(*(void **)(this + 4),iVar4 * 0xd4);
iVar6 = *(int *)(this + 0x1c);
*(void **)(this + 4) = pvVar2;
iVar4 = *(int *)(this + 8);
}
}
if ((iVar6 < 0) || (iVar4 <= iVar6)) {
if (0 < iVar4) goto LAB_005d5b3c;
}
else {
iVar6 = iVar6 + 1;
if ((-1 < iVar6) && (iVar6 < iVar4)) {
iVar4 = iVar6 * 0xd4;
iVar5 = iVar6;
goto LAB_005d5b40;
}
}
Error("CUtlRBTree overflow!\n");
iVar4 = -0xd4;
}
else {
iVar4 = iVar3 * 0xd4;
iVar5 = iVar3;
}
}
LAB_005d5b40:
iVar6 = *(int *)(this + 4);
*(int *)(this + 0x1c) = iVar5;
iVar4 = iVar4 + iVar6;
LAB_005d5ae5:
if (iVar4 != -0x10) {
*(undefined4 *)(iVar4 + 0x14) = 0xbf800000;
AI_Response::AI_Response((AI_Response *)(iVar4 + 0x18));
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.