CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCGSSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCGSSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCGSSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::Insert
0x00084850 · 490 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapI8CSteamIDPN5GCSDK12CGCGSSessionEtE6Node_tEtNS5_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS6_tEtEE6InsertERKS6_
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlMap<CSteamID, GCSDK::CGCGSSession*, unsigned short>::Node_t, unsigned short,
CUtlMap<CSteamID, GCSDK::CGCGSSession*, unsigned short>::CKeyLess,
CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID, GCSDK::CGCGSSession*, unsigned short>::Node_t,
unsigned short>, unsigned short> >::Insert(CUtlMap<CSteamID, GCSDK::CGCGSSession*, unsigned
short>::Node_t const&) */
uint __thiscall
CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCGSSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCGSSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCGSSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Insert(CUtlRBTree<CUtlMap<CSteamID,GCSDK::CGCGSSession*,unsigned_short>::Node_t,unsigned_short,CUtlMap<CSteamID,GCSDK::CGCGSSession*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<CSteamID,GCSDK::CGCGSSession*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*this,Node_t *param_1)
{
int iVar1;
ushort uVar2;
undefined4 uVar3;
bool bVar4;
char cVar5;
int iVar6;
uint uVar7;
undefined2 *puVar8;
uint uVar9;
int local_24;
ushort local_1e;
uVar2 = *(ushort *)(this + 0x10);
if (*(ushort *)(this + 0x10) == 0xffff) {
uVar7 = NewNode(this);
uVar9 = uVar7 & 0xffff;
local_24 = uVar9 * 0x14;
puVar8 = (undefined2 *)(local_24 + *(int *)(this + 4));
puVar8[2] = 0xffff;
puVar8[1] = 0xffff;
*puVar8 = 0xffff;
puVar8[3] = 0;
}
else {
do {
local_1e = uVar2;
iVar1 = (uint)local_1e * 0x14;
cVar5 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar1 + 8);
if (cVar5 == '\0') {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d2872 = 0xffff;
DAT_000d2874 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar4 = false;
uVar2 = *(ushort *)(*(int *)(this + 4) + 2 + iVar1);
}
else {
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d2872 = 0xffff;
DAT_000d2874 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar4 = true;
uVar2 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0x14);
}
} while (uVar2 != 0xffff);
uVar7 = NewNode(this);
uVar9 = uVar7 & 0xffff;
local_24 = uVar9 * 0x14;
puVar8 = (undefined2 *)(local_24 + *(int *)(this + 4));
puVar8[2] = local_1e;
puVar8[1] = 0xffff;
*puVar8 = 0xffff;
puVar8[3] = 0;
if (local_1e != 0xffff) {
if (bVar4) {
*(short *)(*(int *)(this + 4) + iVar1) = (short)uVar7;
}
else {
*(short *)(*(int *)(this + 4) + 2 + iVar1) = (short)uVar7;
}
goto LAB_00084928;
}
}
*(short *)(this + 0x10) = (short)uVar7;
LAB_00084928:
InsertRebalance(this,(ushort)uVar9);
*(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
local_24 = local_24 + *(int *)(this + 4);
if (local_24 != -8) {
uVar3 = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(local_24 + 8) = *(undefined4 *)param_1;
*(undefined4 *)(local_24 + 0xc) = uVar3;
*(undefined4 *)(local_24 + 0x10) = *(undefined4 *)(param_1 + 8);
}
return uVar7;
}
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.