CUtlRBTree<VisibilityCacheEntry_t,unsigned_short,CVisibilityCacheEntryLess,CUtlMemory<UtlRBTreeNode_t<VisibilityCacheEntry_t,unsigned_short>,unsigned_short>>::InsertRebalance
0x005fa9e0 · 2918 bytes · __thiscall
_ZN10CUtlRBTreeI22VisibilityCacheEntry_tt25CVisibilityCacheEntryLess10CUtlMemoryI15UtlRBTreeNode_tIS0_tEtEE15InsertRebalanceEt
Decompiled
undefined (2 params)
/* CUtlRBTree<VisibilityCacheEntry_t, unsigned short, CVisibilityCacheEntryLess,
CUtlMemory<UtlRBTreeNode_t<VisibilityCacheEntry_t, unsigned short>, unsigned short>
>::InsertRebalance(unsigned short) */
void __thiscall
CUtlRBTree<VisibilityCacheEntry_t,unsigned_short,CVisibilityCacheEntryLess,CUtlMemory<UtlRBTreeNode_t<VisibilityCacheEntry_t,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<VisibilityCacheEntry_t,unsigned_short,CVisibilityCacheEntryLess,CUtlMemory<UtlRBTreeNode_t<VisibilityCacheEntry_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_005faa55:
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0x18 + 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_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_005faa1f;
LAB_005fada1:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_005fada1;
LAB_005faa1f:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x18);
}
uVar1 = puVar3[2];
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
DAT_00f244ba = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar1 != 0xffff) goto LAB_005faa41;
LAB_005fad68:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_005fad68;
LAB_005faa41:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0x18);
}
if (puVar3[3] != 0) {
uVar1 = *(ushort *)(this + 0x10);
goto LAB_005faa55;
}
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_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_005faa8d;
LAB_005fad09:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_005fad09;
LAB_005faa8d:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x18);
}
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_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_005faab2;
LAB_005fac95:
local_20 = DAT_00f244bc;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_005faacb;
LAB_005facb0:
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_005faad5;
LAB_005facd5:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_005fac95;
LAB_005faab2:
local_20 = *(ushort *)(*(int *)(this + 4) + uVar7 * 0x18 + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_005facb0;
LAB_005faacb:
if (uVar1 == 0xffff) goto LAB_005facd5;
LAB_005faad5:
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
}
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_00f244bc = 0xffff;
DAT_00f244ba = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_005faaea;
}
if (uVar4 != 0xffff) goto LAB_005faaf4;
LAB_005fac63:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
LAB_005faaea:
if (uVar4 == 0xffff) goto LAB_005fac63;
LAB_005faaf4:
puVar5 = (ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
}
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_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_005fab1f;
LAB_005faf69:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_005faf69;
LAB_005fab1f:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18);
}
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_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_005fab41;
LAB_005fae98:
if (DAT_00f244be == 0) goto LAB_005fab58;
LAB_005faeb0:
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_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_005faecd;
LAB_005fb249:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_005fb249;
LAB_005faecd:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x18);
}
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_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_005faeef;
LAB_005fb1a0:
if (local_1e != DAT_00f244ba) goto LAB_005faf09;
LAB_005fb1b8:
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_00f244ba = 0xffff;
DAT_00f244bc = 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 * 0x18);
}
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_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar4 == 0xffff) {
puVar6 = &Links(unsigned_short)::s_Sentinel;
puVar3 = (undefined2 *)(*(int *)(this + 4) + 0x17ffe8);
}
else {
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
puVar6 = puVar3;
}
local_20 = puVar6[2];
local_1e = uVar1;
}
else {
if (uVar4 == 0xffff) goto LAB_005fb1a0;
LAB_005faeef:
if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x18 + 2))
goto LAB_005fb1b8;
LAB_005faf09:
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
}
puVar3[3] = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18 + 6) = 0;
RotateRight(this,local_20);
}
else {
if (uVar4 == 0xffff) goto LAB_005fae98;
LAB_005fab41:
if (*(short *)(*(int *)(this + 4) + (uint)uVar4 * 0x18 + 6) != 0) goto LAB_005faeb0;
LAB_005fab58:
*(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18 + 6) = 1;
local_1e = local_20;
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18 + 6) = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18 + 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_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_005fabb6;
LAB_005fb009:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_005fb009;
LAB_005fabb6:
puVar5 = (ushort *)(*(int *)(this + 4) + (uint)local_20 * 0x18);
}
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_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_005fabd7;
LAB_005fafd0:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar4 == 0xffff) goto LAB_005fafd0;
LAB_005fabd7:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
}
if (puVar3[3] == 0) {
*(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18 + 6) = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18 + 6) = 1;
local_1e = local_20;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18 + 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_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_005fadcd;
LAB_005fb2b9:
uVar4 = DAT_00f244bc;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_005fade5;
LAB_005fb2d0:
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 == 0) goto LAB_005fade5;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_005fadef;
LAB_005fb330:
if (local_1e != Links(unsigned_short)::s_Sentinel) goto LAB_005fae08;
LAB_005fb348:
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_00f244ba = 0xffff;
DAT_00f244bc = 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 * 0x18);
}
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_00f244ba = 0xffff;
DAT_00f244bc = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar4 == 0xffff) {
puVar6 = &Links(unsigned_short)::s_Sentinel;
puVar3 = (undefined2 *)(*(int *)(this + 4) + 0x17ffe8);
}
else {
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x18);
puVar6 = puVar3;
}
local_20 = puVar6[2];
local_1e = uVar1;
}
else {
if (local_1e == 0xffff) goto LAB_005fb2b9;
LAB_005fadcd:
uVar4 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0x18 + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_005fb2d0;
LAB_005fade5:
if (uVar4 == 0xffff) goto LAB_005fb330;
LAB_005fadef:
if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x18)) goto LAB_005fb348;
LAB_005fae08:
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x18);
}
puVar3[3] = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x18 + 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.