CUtlRBTree<CUtlMap<char_const*,EventGroup,int>::Node_t,int,CUtlMap<char_const*,EventGroup,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,EventGroup,int>::Node_t,int>,int>>::Insert
0x00ba2f70 · 611 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIPKc10EventGroupiE6Node_tEiNS4_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS5_iEiEE6InsertERKS5_
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlMap<char const*, EventGroup, int>::Node_t, int, CUtlMap<char const*, EventGroup,
int>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<char const*, EventGroup, int>::Node_t, int>,
int> >::Insert(CUtlMap<char const*, EventGroup, int>::Node_t const&) */
int __thiscall
CUtlRBTree<CUtlMap<char_const*,EventGroup,int>::Node_t,int,CUtlMap<char_const*,EventGroup,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,EventGroup,int>::Node_t,int>,int>>
::Insert(CUtlRBTree<CUtlMap<char_const*,EventGroup,int>::Node_t,int,CUtlMap<char_const*,EventGroup,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,EventGroup,int>::Node_t,int>,int>>
*this,Node_t *param_1)
{
undefined4 uVar1;
bool bVar2;
char cVar3;
ushort uVar4;
undefined4 *puVar5;
int iVar6;
int iVar7;
int iVar8;
int local_20;
iVar6 = *(int *)(this + 0x10);
if (*(int *)(this + 0x10) == -1) {
local_20 = NewNode(this);
iVar6 = local_20 * 0x30;
puVar5 = (undefined4 *)(*(int *)(this + 4) + iVar6);
puVar5[2] = 0xffffffff;
puVar5[1] = 0xffffffff;
*puVar5 = 0xffffffff;
puVar5[3] = 0;
}
else {
do {
iVar8 = iVar6;
iVar7 = iVar8 * 0x30;
cVar3 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar7 + 0x10);
if (cVar3 == '\0') {
if ((Links(int)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar6 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f6d208 = 0xffffffff;
DAT_00f6d20c = 0xffffffff;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
bVar2 = false;
iVar6 = *(int *)(*(int *)(this + 4) + 4 + iVar7);
}
else {
if ((Links(int)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar6 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f6d208 = 0xffffffff;
DAT_00f6d20c = 0xffffffff;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
bVar2 = true;
iVar6 = *(int *)(*(int *)(this + 4) + iVar7);
}
} while (iVar6 != -1);
local_20 = NewNode(this);
iVar6 = local_20 * 0x30;
puVar5 = (undefined4 *)(*(int *)(this + 4) + iVar6);
puVar5[2] = iVar8;
puVar5[1] = 0xffffffff;
*puVar5 = 0xffffffff;
puVar5[3] = 0;
if (iVar8 != -1) {
if (bVar2) {
*(int *)(*(int *)(this + 4) + iVar7) = local_20;
}
else {
*(int *)(*(int *)(this + 4) + 4 + iVar7) = local_20;
}
goto LAB_00ba3036;
}
}
*(int *)(this + 0x10) = local_20;
LAB_00ba3036:
InsertRebalance(this,local_20);
*(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
iVar6 = iVar6 + *(int *)(this + 4);
if (iVar6 != -0x10) {
uVar1 = *(undefined4 *)param_1;
*(undefined2 *)(iVar6 + 0x28) = 0xffff;
*(undefined2 *)(iVar6 + 0x2a) = 0xffff;
*(code **)(iVar6 + 0x14) = ChoreEventStartTimeLessFunc;
*(undefined4 *)(iVar6 + 0x18) = 0;
*(undefined4 *)(iVar6 + 0x10) = uVar1;
*(undefined2 *)(iVar6 + 0x24) = 0xffff;
*(undefined4 *)(iVar6 + 0x1c) = 0;
*(undefined4 *)(iVar6 + 0x20) = 0;
*(undefined2 *)(iVar6 + 0x26) = 0;
*(undefined4 *)(iVar6 + 0x2c) = 0;
CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
::RemoveAll((CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
*)(iVar6 + 0x14));
for (uVar4 = CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
::FirstInorder((CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
*)(param_1 + 4)); uVar4 != 0xffff;
uVar4 = CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
::NextInorder((CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
*)(param_1 + 4),uVar4)) {
/* try { // try from 00ba30e4 to 00ba30e8 has its CatchHandler @ 00ba31e9 */
CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
::Insert((CUtlRBTree<CChoreoEvent*,unsigned_short,bool(*)(CChoreoEvent*const&,CChoreoEvent*const&),CUtlMemory<UtlRBTreeNode_t<CChoreoEvent*,unsigned_short>,unsigned_short>>
*)(iVar6 + 0x14),(CChoreoEvent **)(*(int *)(param_1 + 8) + 8 + (uint)uVar4 * 0xc));
}
}
return local_20;
}
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.