CUtlRBTree<CBalanceTeamGroup,unsigned_short,bool(*)(CBalanceTeamGroup_const&,CBalanceTeamGroup_const&),CUtlMemory<UtlRBTreeNode_t<CBalanceTeamGroup,unsigned_short>,unsigned_short>>::Insert
0x004d08d0 · 520 bytes · __thiscall
_ZN10CUtlRBTreeI17CBalanceTeamGrouptPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_tEtEE6InsertES2_
Decompiled
undefined (2 params)
/* CUtlRBTree<CBalanceTeamGroup, unsigned short, bool (*)(CBalanceTeamGroup const&,
CBalanceTeamGroup const&), CUtlMemory<UtlRBTreeNode_t<CBalanceTeamGroup, unsigned short>,
unsigned short> >::Insert(CBalanceTeamGroup const&) */
ushort __thiscall
CUtlRBTree<CBalanceTeamGroup,unsigned_short,bool(*)(CBalanceTeamGroup_const&,CBalanceTeamGroup_const&),CUtlMemory<UtlRBTreeNode_t<CBalanceTeamGroup,unsigned_short>,unsigned_short>>
::Insert(CUtlRBTree<CBalanceTeamGroup,unsigned_short,bool(*)(CBalanceTeamGroup_const&,CBalanceTeamGroup_const&),CUtlMemory<UtlRBTreeNode_t<CBalanceTeamGroup,unsigned_short>,unsigned_short>>
*this,CBalanceTeamGroup *param_1)
{
ushort uVar1;
bool bVar2;
char cVar3;
int iVar4;
undefined2 *puVar5;
ushort uVar6;
int iVar7;
int local_24;
ushort local_1e;
uVar1 = *(ushort *)(this + 0x10);
if (*(ushort *)(this + 0x10) == 0xffff) {
local_1e = NewNode(this);
local_24 = (uint)local_1e * 0x2c;
puVar5 = (undefined2 *)(local_24 + *(int *)(this + 4));
puVar5[2] = 0xffff;
puVar5[1] = 0xffff;
*puVar5 = 0xffff;
puVar5[3] = 0;
}
else {
do {
uVar6 = uVar1;
iVar7 = (uint)uVar6 * 0x2c;
cVar3 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar7 + 8);
if (cVar3 == '\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_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar2 = false;
uVar1 = *(ushort *)(*(int *)(this + 4) + 2 + iVar7);
}
else {
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_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
bVar2 = true;
uVar1 = *(ushort *)(*(int *)(this + 4) + iVar7);
}
} while (uVar1 != 0xffff);
local_1e = NewNode(this);
local_24 = (uint)local_1e * 0x2c;
puVar5 = (undefined2 *)(local_24 + *(int *)(this + 4));
puVar5[1] = 0xffff;
*puVar5 = 0xffff;
puVar5[2] = uVar6;
puVar5[3] = 0;
if (uVar6 != 0xffff) {
if (bVar2) {
*(ushort *)(*(int *)(this + 4) + iVar7) = local_1e;
}
else {
*(ushort *)(*(int *)(this + 4) + 2 + iVar7) = local_1e;
}
goto LAB_004d09b1;
}
}
*(ushort *)(this + 0x10) = local_1e;
LAB_004d09b1:
InsertRebalance(this,local_1e);
*(short *)(this + 0x12) = *(short *)(this + 0x12) + 1;
local_24 = local_24 + *(int *)(this + 4);
if ((CSameTeamGroup *)(local_24 + 8) != (CSameTeamGroup *)0x0) {
CSameTeamGroup::CSameTeamGroup((CSameTeamGroup *)(local_24 + 8));
*(undefined ***)(local_24 + 8) = &PTR_Build_00c21278;
*(undefined4 *)(local_24 + 0x24) = *(undefined4 *)(param_1 + 0x1c);
*(undefined4 *)(local_24 + 0x28) = *(undefined4 *)(param_1 + 0x20);
}
return local_1e;
}
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.