CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::InsertRebalance
0x005cabd0 · 1865 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIjPKctE6Node_tEtNS3_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS4_tEtEE15InsertRebalanceEt
Decompiled
undefined (2 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CUtlRBTree<CUtlMap<unsigned int, char const*, unsigned short>::Node_t, unsigned short,
CUtlMap<unsigned int, char const*, unsigned short>::CKeyLess,
CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned int, char const*, unsigned short>::Node_t, unsigned
short>, unsigned short> >::InsertRebalance(unsigned short) */
void __thiscall
CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,char_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,char_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*this,ushort param_1)
{
ushort uVar1;
ushort uVar2;
ushort uVar3;
short sVar4;
undefined2 *puVar5;
int iVar6;
ushort *puVar7;
uint uVar8;
uint uVar9;
uint uVar10;
ushort local_1e;
local_1e = param_1;
do {
uVar1 = *(ushort *)(this + 0x10);
if (local_1e == uVar1) {
LAB_005cac3f:
*(undefined2 *)((uint)uVar1 * 0x10 + *(int *)(this + 4) + 6) = 1;
return;
}
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f21ce2 = 0xffff;
DAT_00f21ce4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e == 0xffff) goto LAB_005caf91;
LAB_005cac0f:
puVar5 = (undefined2 *)((uint)local_1e * 0x10 + *(int *)(this + 4));
}
else {
if (local_1e != 0xffff) goto LAB_005cac0f;
LAB_005caf91:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
uVar1 = puVar5[2];
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_00f21ce2 = 0xffff;
DAT_00f21ce4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar1 == 0xffff) goto LAB_005caf58;
LAB_005cac2b:
puVar5 = (undefined2 *)((uint)uVar1 * 0x10 + *(int *)(this + 4));
}
else {
if (uVar1 != 0xffff) goto LAB_005cac2b;
LAB_005caf58:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
if (puVar5[3] != 0) {
uVar1 = *(ushort *)(this + 0x10);
goto LAB_005cac3f;
}
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f21ce2 = 0xffff;
DAT_00f21ce4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e == 0xffff) goto LAB_005caef9;
LAB_005cac7d:
puVar5 = (undefined2 *)((uint)local_1e * 0x10 + *(int *)(this + 4));
}
else {
if (local_1e != 0xffff) goto LAB_005cac7d;
LAB_005caef9:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
uVar1 = puVar5[2];
uVar10 = (uint)uVar1;
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f21ce2 = 0xffff;
DAT_00f21ce4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) goto LAB_005caebd;
LAB_005cac9f:
puVar5 = (undefined2 *)(uVar10 * 0x10 + *(int *)(this + 4));
}
else {
if (uVar1 != 0xffff) goto LAB_005cac9f;
LAB_005caebd:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
uVar2 = puVar5[2];
uVar9 = (uint)uVar2;
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f21ce2 = 0xffff;
DAT_00f21ce4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_005cacb3;
}
if (uVar1 == 0xffff) goto LAB_005cae8b;
LAB_005cacbd:
puVar5 = (undefined2 *)(uVar10 * 0x10 + *(int *)(this + 4));
}
else {
LAB_005cacb3:
if (uVar1 != 0xffff) goto LAB_005cacbd;
LAB_005cae8b:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
uVar3 = puVar5[2];
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f21ce2 = 0xffff;
DAT_00f21ce4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_005cacd1;
}
if (uVar3 == 0xffff) goto LAB_005cae51;
LAB_005cacdb:
puVar7 = (ushort *)((uint)uVar3 * 0x10 + *(int *)(this + 4));
}
else {
LAB_005cacd1:
if (uVar3 != 0xffff) goto LAB_005cacdb;
LAB_005cae51:
puVar7 = &Links(unsigned_short)::s_Sentinel;
}
if (uVar1 == *puVar7) {
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f21ce2 = 0xffff;
DAT_00f21ce4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_005cacf5;
}
if (uVar2 == 0xffff) goto LAB_005cb0a3;
LAB_005cacff:
puVar5 = (undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4));
}
else {
LAB_005cacf5:
if (uVar2 != 0xffff) goto LAB_005cacff;
LAB_005cb0a3:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
uVar3 = puVar5[1];
uVar8 = (uint)uVar3;
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_00f21ce2 = 0xffff;
DAT_00f21ce4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
sVar4 = _DAT_00f21ce6;
if (uVar3 != 0xffff) {
sVar4 = *(short *)(uVar8 * 0x10 + *(int *)(this + 4) + 6);
}
if (sVar4 == 0) {
LAB_005cad32:
*(undefined2 *)(uVar10 * 0x10 + *(int *)(this + 4) + 6) = 1;
*(undefined2 *)(uVar8 * 0x10 + *(int *)(this + 4) + 6) = 1;
*(undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4) + 6) = 0;
local_1e = uVar2;
}
else {
iVar6 = Links(this,local_1e);
iVar6 = Links(this,*(ushort *)(iVar6 + 4));
if (local_1e == *(ushort *)(iVar6 + 2)) {
RotateLeft(this,uVar1);
iVar6 = Links(this,uVar1);
uVar10 = (uint)*(ushort *)(iVar6 + 4);
iVar6 = Links(this,*(ushort *)(iVar6 + 4));
uVar9 = (uint)*(ushort *)(iVar6 + 4);
local_1e = uVar1;
}
*(undefined2 *)(uVar10 * 0x10 + *(int *)(this + 4) + 6) = 1;
*(undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4) + 6) = 0;
RotateRight(this,(ushort)uVar9);
}
}
else {
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f21ce2 = 0xffff;
DAT_00f21ce4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_005cad78;
}
if (uVar2 == 0xffff) goto LAB_005cb14b;
LAB_005cad82:
puVar7 = (ushort *)(uVar9 * 0x10 + *(int *)(this + 4));
}
else {
LAB_005cad78:
if (uVar2 != 0xffff) goto LAB_005cad82;
LAB_005cb14b:
puVar7 = &Links(unsigned_short)::s_Sentinel;
}
uVar3 = *puVar7;
uVar8 = (uint)uVar3;
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_00f21ce2 = 0xffff;
DAT_00f21ce4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar3 == 0xffff) goto LAB_005cb110;
LAB_005cada0:
puVar5 = (undefined2 *)(uVar8 * 0x10 + *(int *)(this + 4));
}
else {
if (uVar3 != 0xffff) goto LAB_005cada0;
LAB_005cb110:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
if (puVar5[3] == 0) goto LAB_005cad32;
iVar6 = Links(this,local_1e);
puVar7 = (ushort *)Links(this,*(ushort *)(iVar6 + 4));
if (local_1e == *puVar7) {
RotateRight(this,uVar1);
iVar6 = Links(this,uVar1);
uVar10 = (uint)*(ushort *)(iVar6 + 4);
iVar6 = Links(this,*(ushort *)(iVar6 + 4));
uVar9 = (uint)*(ushort *)(iVar6 + 4);
local_1e = uVar1;
}
*(undefined2 *)(uVar10 * 0x10 + *(int *)(this + 4) + 6) = 1;
*(undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4) + 6) = 0;
RotateLeft(this,(ushort)uVar9);
}
} while( true );
}
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.