CUtlRBTree<CUtlMap<unsigned_short,unsigned_short,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_short,unsigned_short,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_short,unsigned_short,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::Insert
0x0014e680 · 767 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapItttE6Node_tEtNS1_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS2_tEtEE6InsertERKS2_
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlMap<unsigned short, unsigned short, unsigned short>::Node_t, unsigned short,
CUtlMap<unsigned short, unsigned short, unsigned short>::CKeyLess,
CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned short, unsigned short, unsigned short>::Node_t,
unsigned short>, unsigned short> >::Insert(CUtlMap<unsigned short, unsigned short, unsigned
short>::Node_t const&) */
ushort __thiscall
CUtlRBTree<CUtlMap<unsigned_short,unsigned_short,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_short,unsigned_short,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_short,unsigned_short,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Insert(CUtlRBTree<CUtlMap<unsigned_short,unsigned_short,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_short,unsigned_short,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_short,unsigned_short,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*this,Node_t *param_1)
{
bool bVar1;
char cVar2;
int iVar3;
int iVar4;
uint uVar5;
uint uVar6;
undefined2 *puVar7;
ushort uVar8;
int local_24;
ushort local_20;
ushort local_1e;
local_1e = *(ushort *)(this + 0x10);
uVar8 = local_1e;
if (local_1e == 0xffff) {
bVar1 = false;
}
else {
do {
local_1e = uVar8;
iVar3 = (uint)local_1e * 0xc;
cVar2 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar3 + 8);
if (cVar2 == '\0') {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00340e02 = 0xffff;
DAT_00340e04 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar1 = false;
uVar8 = *(ushort *)(*(int *)(this + 4) + 2 + iVar3);
}
else {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar3 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00340e02 = 0xffff;
DAT_00340e04 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar1 = true;
uVar8 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0xc);
}
} while (uVar8 != 0xffff);
}
uVar8 = *(ushort *)(this + 0x14);
if (uVar8 != 0xffff) {
iVar3 = *(int *)(this + 4);
local_24 = (uint)uVar8 * 0xc;
puVar7 = (undefined2 *)(local_24 + iVar3);
*(undefined2 *)(this + 0x14) = puVar7[1];
local_20 = uVar8;
goto LAB_0014e734;
}
iVar3 = *(int *)(this + 8);
if ((int)(uint)*(ushort *)(this + 0x16) < iVar3) {
uVar6 = *(ushort *)(this + 0x16) + 1;
uVar5 = uVar6 & 0xffff;
if (iVar3 <= (int)uVar5) {
uVar5 = 0xffff;
uVar6 = 0xffff;
}
if (iVar3 <= (int)uVar5) goto LAB_0014e8fb;
LAB_0014e8b9:
local_20 = (ushort)uVar6;
local_24 = (uVar6 & 0xffff) * 0xc;
}
else {
uVar5 = 0xffff;
if (0 < iVar3) {
uVar5 = 0;
}
uVar6 = (0 < iVar3) - 1;
if ((int)uVar5 < iVar3) goto LAB_0014e8b9;
LAB_0014e8fb:
CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_short,unsigned_short,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
::Grow((CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_short,unsigned_short,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
*)(this + 4),1);
iVar3 = *(int *)(this + 8);
if ((int)(uint)*(ushort *)(this + 0x16) < iVar3) {
local_20 = *(ushort *)(this + 0x16) + 1;
uVar5 = (uint)local_20;
if ((int)uVar5 < iVar3) {
local_24 = uVar5 * 0xc;
}
else {
local_24 = 0xbfff4;
uVar5 = 0xffff;
local_20 = uVar8;
}
}
else {
uVar5 = 0;
local_24 = 0xbfff4;
if (iVar3 < 1) {
uVar5 = 0xffff;
}
else {
local_24 = 0;
}
local_20 = 0;
if (iVar3 < 1) {
local_20 = uVar8;
}
}
if (iVar3 <= (int)uVar5) {
Error("CUtlRBTree overflow!\n");
}
}
uVar8 = (ushort)uVar5;
*(ushort *)(this + 0x16) = local_20;
iVar3 = *(int *)(this + 4);
puVar7 = (undefined2 *)(local_24 + iVar3);
LAB_0014e734:
*(int *)(this + 0x18) = iVar3;
puVar7[1] = 0xffff;
*puVar7 = 0xffff;
puVar7[3] = 0;
puVar7[2] = local_1e;
if (local_1e == 0xffff) {
*(ushort *)(this + 0x10) = local_20;
}
else if (bVar1) {
*(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0xc) = local_20;
}
else {
*(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0xc + 2) = local_20;
}
InsertRebalance(this,uVar8);
*(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
local_24 = local_24 + *(int *)(this + 4);
if (local_24 != -8) {
*(undefined2 *)(local_24 + 8) = *(undefined2 *)param_1;
*(undefined2 *)(local_24 + 10) = *(undefined2 *)(param_1 + 2);
}
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.