CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,unsigned_short>,unsigned_short>>::InsertRebalance
0x00051b30 · 2918 bytes · __thiscall
_ZN10CUtlRBTreeIN15CUtlSymbolTable16CStringPoolIndexEtNS0_5CLessE10CUtlMemoryI15UtlRBTreeNode_tIS1_tEtEE15InsertRebalanceEt
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlSymbolTable::CStringPoolIndex, unsigned short, CUtlSymbolTable::CLess,
CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex, unsigned short>, unsigned short>
>::InsertRebalance(unsigned short) */
void __thiscall
CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<CUtlSymbolTable::CStringPoolIndex,unsigned_short,CUtlSymbolTable::CLess,CUtlMemory<UtlRBTreeNode_t<CUtlSymbolTable::CStringPoolIndex,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_00051ba5:
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0xc + 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_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_00051b6f;
LAB_00051ef1:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_00051ef1;
LAB_00051b6f:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0xc);
}
uVar1 = puVar3[2];
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
DAT_000d269c = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar1 != 0xffff) goto LAB_00051b91;
LAB_00051eb8:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_00051eb8;
LAB_00051b91:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0xc);
}
if (puVar3[3] != 0) {
uVar1 = *(ushort *)(this + 0x10);
goto LAB_00051ba5;
}
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_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_00051bdd;
LAB_00051e59:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_00051e59;
LAB_00051bdd:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0xc);
}
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_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_00051c02;
LAB_00051de5:
local_20 = DAT_000d269e;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00051c1b;
LAB_00051e00:
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_00051c25;
LAB_00051e25:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_00051de5;
LAB_00051c02:
local_20 = *(ushort *)(*(int *)(this + 4) + uVar7 * 0xc + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00051e00;
LAB_00051c1b:
if (uVar1 == 0xffff) goto LAB_00051e25;
LAB_00051c25:
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc);
}
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_000d269e = 0xffff;
DAT_000d269c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_00051c3a;
}
if (uVar4 != 0xffff) goto LAB_00051c44;
LAB_00051db3:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
LAB_00051c3a:
if (uVar4 == 0xffff) goto LAB_00051db3;
LAB_00051c44:
puVar5 = (ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0xc);
}
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_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_00051c6f;
LAB_000520b9:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_000520b9;
LAB_00051c6f:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc);
}
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_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_00051c91;
LAB_00051fe8:
if (DAT_000d26a0 == 0) goto LAB_00051ca8;
LAB_00052000:
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_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_0005201d;
LAB_00052399:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_00052399;
LAB_0005201d:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0xc);
}
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_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_0005203f;
LAB_000522f0:
if (local_1e != DAT_000d269c) goto LAB_00052059;
LAB_00052308:
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_000d269c = 0xffff;
DAT_000d269e = 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 * 0xc);
}
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_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar4 == 0xffff) {
puVar6 = &Links(unsigned_short)::s_Sentinel;
puVar3 = (undefined2 *)(*(int *)(this + 4) + 0xbfff4);
}
else {
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0xc);
puVar6 = puVar3;
}
local_20 = puVar6[2];
local_1e = uVar1;
}
else {
if (uVar4 == 0xffff) goto LAB_000522f0;
LAB_0005203f:
if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0xc + 2))
goto LAB_00052308;
LAB_00052059:
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc);
}
puVar3[3] = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc + 6) = 0;
RotateRight(this,local_20);
}
else {
if (uVar4 == 0xffff) goto LAB_00051fe8;
LAB_00051c91:
if (*(short *)(*(int *)(this + 4) + (uint)uVar4 * 0xc + 6) != 0) goto LAB_00052000;
LAB_00051ca8:
*(undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc + 6) = 1;
local_1e = local_20;
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0xc + 6) = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc + 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_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_00051d06;
LAB_00052159:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_00052159;
LAB_00051d06:
puVar5 = (ushort *)(*(int *)(this + 4) + (uint)local_20 * 0xc);
}
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_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_00051d27;
LAB_00052120:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar4 == 0xffff) goto LAB_00052120;
LAB_00051d27:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0xc);
}
if (puVar3[3] == 0) {
*(undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc + 6) = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0xc + 6) = 1;
local_1e = local_20;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc + 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_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_00051f1d;
LAB_00052409:
uVar4 = DAT_000d269e;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00051f35;
LAB_00052420:
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 == 0) goto LAB_00051f35;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_00051f3f;
LAB_00052480:
if (local_1e != Links(unsigned_short)::s_Sentinel) goto LAB_00051f58;
LAB_00052498:
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_000d269c = 0xffff;
DAT_000d269e = 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 * 0xc);
}
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_000d269c = 0xffff;
DAT_000d269e = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar4 == 0xffff) {
puVar6 = &Links(unsigned_short)::s_Sentinel;
puVar3 = (undefined2 *)(*(int *)(this + 4) + 0xbfff4);
}
else {
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0xc);
puVar6 = puVar3;
}
local_20 = puVar6[2];
local_1e = uVar1;
}
else {
if (local_1e == 0xffff) goto LAB_00052409;
LAB_00051f1d:
uVar4 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0xc + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00052420;
LAB_00051f35:
if (uVar4 == 0xffff) goto LAB_00052480;
LAB_00051f3f:
if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0xc)) goto LAB_00052498;
LAB_00051f58:
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc);
}
puVar3[3] = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc + 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.