CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::InsertRebalance
0x00897fc0 · 2918 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIyP9KeyValuestE6Node_tEtNS3_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS4_tEtEE15InsertRebalanceEt
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlMap<unsigned long long, KeyValues*, unsigned short>::Node_t, unsigned short,
CUtlMap<unsigned long long, KeyValues*, unsigned short>::CKeyLess,
CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned long long, KeyValues*, unsigned short>::Node_t,
unsigned short>, unsigned short> >::InsertRebalance(unsigned short) */
void __thiscall
CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,KeyValues*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*this,ushort param_1)
{
ushort uVar1;
int iVar2;
undefined2 *puVar3;
ushort uVar4;
ushort *puVar5;
undefined2 *puVar6;
uint uVar7;
ushort local_20;
ushort local_1e;
local_1e = param_1;
do {
uVar1 = *(ushort *)(this + 0x10);
if (local_1e == uVar1) {
LAB_00898035:
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0x14 + 6) = 1;
return;
}
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_00897fff;
LAB_00898381:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_00898381;
LAB_00897fff:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x14);
}
uVar1 = puVar3[2];
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
DAT_00f5e1e6 = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar1 != 0xffff) goto LAB_00898021;
LAB_00898348:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_00898348;
LAB_00898021:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0x14);
}
if (puVar3[3] != 0) {
uVar1 = *(ushort *)(this + 0x10);
goto LAB_00898035;
}
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_0089806d;
LAB_008982e9:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_008982e9;
LAB_0089806d:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x14);
}
uVar1 = puVar3[2];
uVar7 = (uint)uVar1;
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_00898092;
LAB_00898275:
local_20 = DAT_00f5e1e8;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_008980ab;
LAB_00898290:
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_008980b5;
LAB_008982b5:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_00898275;
LAB_00898092:
local_20 = *(ushort *)(*(int *)(this + 4) + uVar7 * 0x14 + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00898290;
LAB_008980ab:
if (uVar1 == 0xffff) goto LAB_008982b5;
LAB_008980b5:
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14);
}
uVar4 = puVar3[2];
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e8 = 0xffff;
DAT_00f5e1e6 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_008980ca;
}
if (uVar4 != 0xffff) goto LAB_008980d4;
LAB_00898243:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
LAB_008980ca:
if (uVar4 == 0xffff) goto LAB_00898243;
LAB_008980d4:
puVar5 = (ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x14);
}
if (uVar1 == *puVar5) {
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_008980ff;
LAB_00898549:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_00898549;
LAB_008980ff:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x14);
}
uVar4 = puVar3[1];
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_00898121;
LAB_00898478:
if (DAT_00f5e1ea == 0) goto LAB_00898138;
LAB_00898490:
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_008984ad;
LAB_00898829:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_00898829;
LAB_008984ad:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x14);
}
uVar4 = puVar3[2];
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_008984cf;
LAB_00898780:
if (local_1e != DAT_00f5e1e6) goto LAB_008984e9;
LAB_00898798:
RotateLeft(this,uVar1);
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14);
}
uVar4 = puVar3[2];
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar4 == 0xffff) {
puVar6 = &Links(unsigned_short)::s_Sentinel;
puVar3 = (undefined2 *)(*(int *)(this + 4) + 0x13ffec);
}
else {
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x14);
puVar6 = puVar3;
}
local_20 = puVar6[2];
local_1e = uVar1;
}
else {
if (uVar4 == 0xffff) goto LAB_00898780;
LAB_008984cf:
if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x14 + 2))
goto LAB_00898798;
LAB_008984e9:
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14);
}
puVar3[3] = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x14 + 6) = 0;
RotateRight(this,local_20);
}
else {
if (uVar4 == 0xffff) goto LAB_00898478;
LAB_00898121:
if (*(short *)(*(int *)(this + 4) + (uint)uVar4 * 0x14 + 6) != 0) goto LAB_00898490;
LAB_00898138:
*(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14 + 6) = 1;
local_1e = local_20;
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x14 + 6) = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x14 + 6) = 0;
}
}
else {
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_00898196;
LAB_008985e9:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_008985e9;
LAB_00898196:
puVar5 = (ushort *)(*(int *)(this + 4) + (uint)local_20 * 0x14);
}
uVar4 = *puVar5;
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_008981b7;
LAB_008985b0:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar4 == 0xffff) goto LAB_008985b0;
LAB_008981b7:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x14);
}
if (puVar3[3] == 0) {
*(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14 + 6) = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x14 + 6) = 1;
local_1e = local_20;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x14 + 6) = 0;
}
else {
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_008983ad;
LAB_00898899:
uVar4 = DAT_00f5e1e8;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_008983c5;
LAB_008988b0:
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 == 0) goto LAB_008983c5;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_008983cf;
LAB_00898910:
if (local_1e != Links(unsigned_short)::s_Sentinel) goto LAB_008983e8;
LAB_00898928:
RotateRight(this,uVar1);
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14);
}
uVar4 = puVar3[2];
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f5e1e6 = 0xffff;
DAT_00f5e1e8 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar4 == 0xffff) {
puVar6 = &Links(unsigned_short)::s_Sentinel;
puVar3 = (undefined2 *)(*(int *)(this + 4) + 0x13ffec);
}
else {
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x14);
puVar6 = puVar3;
}
local_20 = puVar6[2];
local_1e = uVar1;
}
else {
if (local_1e == 0xffff) goto LAB_00898899;
LAB_008983ad:
uVar4 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0x14 + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_008988b0;
LAB_008983c5:
if (uVar4 == 0xffff) goto LAB_00898910;
LAB_008983cf:
if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x14)) goto LAB_00898928;
LAB_008983e8:
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14);
}
puVar3[3] = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x14 + 6) = 0;
RotateLeft(this,local_20);
}
}
} 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.