CUtlRBTree<CBaseEntity*,unsigned_short,bool(*)(CBaseEntity*const&,CBaseEntity*const&),CUtlMemory<UtlRBTreeNode_t<CBaseEntity*,unsigned_short>,unsigned_short>>::InsertRebalance
0x007d0290 · 2468 bytes · __thiscall
_ZN10CUtlRBTreeIP11CBaseEntitytPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_tEtEE15InsertRebalanceEt
Decompiled
undefined (2 params)
/* CUtlRBTree<CBaseEntity*, unsigned short, bool (*)(CBaseEntity* const&, CBaseEntity* const&),
CUtlMemory<UtlRBTreeNode_t<CBaseEntity*, unsigned short>, unsigned short>
>::InsertRebalance(unsigned short) */
void __thiscall
CUtlRBTree<CBaseEntity*,unsigned_short,bool(*)(CBaseEntity*const&,CBaseEntity*const&),CUtlMemory<UtlRBTreeNode_t<CBaseEntity*,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<CBaseEntity*,unsigned_short,bool(*)(CBaseEntity*const&,CBaseEntity*const&),CUtlMemory<UtlRBTreeNode_t<CBaseEntity*,unsigned_short>,unsigned_short>>
*this,ushort param_1)
{
ushort uVar1;
ushort uVar2;
ushort uVar3;
int iVar4;
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_007d0305:
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0xc + 6) = 1;
return;
}
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar4 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f4ee62 = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_007d02cf;
LAB_007d0651:
puVar6 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_007d0651;
LAB_007d02cf:
puVar6 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0xc);
}
uVar1 = puVar6[2];
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
DAT_00f4ee62 = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar1 != 0xffff) goto LAB_007d02f1;
LAB_007d0618:
puVar6 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_007d0618;
LAB_007d02f1:
puVar6 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0xc);
}
if (puVar6[3] != 0) {
uVar1 = *(ushort *)(this + 0x10);
goto LAB_007d0305;
}
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar4 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f4ee62 = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_007d033d;
LAB_007d05b9:
puVar6 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_007d05b9;
LAB_007d033d:
puVar6 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0xc);
}
uVar1 = puVar6[2];
uVar7 = (uint)uVar1;
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar4 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f4ee62 = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_007d0362;
LAB_007d0545:
local_20 = DAT_00f4ee64;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_007d037b;
LAB_007d0560:
iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar4 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f4ee62 = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_007d0385;
LAB_007d0585:
puVar6 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_007d0545;
LAB_007d0362:
local_20 = *(ushort *)(*(int *)(this + 4) + uVar7 * 0xc + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_007d0560;
LAB_007d037b:
if (uVar1 == 0xffff) goto LAB_007d0585;
LAB_007d0385:
puVar6 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc);
}
uVar2 = puVar6[2];
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar4 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f4ee64 = 0xffff;
DAT_00f4ee62 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_007d039a;
}
if (uVar2 != 0xffff) goto LAB_007d03a4;
LAB_007d0513:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
LAB_007d039a:
if (uVar2 == 0xffff) goto LAB_007d0513;
LAB_007d03a4:
puVar5 = (ushort *)(*(int *)(this + 4) + (uint)uVar2 * 0xc);
}
if (uVar1 == *puVar5) {
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar4 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f4ee62 = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_007d03cf;
LAB_007d0819:
puVar6 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_007d0819;
LAB_007d03cf:
puVar6 = (undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc);
}
uVar2 = puVar6[1];
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_00f4ee62 = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar2 != 0xffff) goto LAB_007d03f1;
LAB_007d0748:
if (DAT_00f4ee66 == 0) goto LAB_007d0408;
LAB_007d0760:
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar4 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f4ee62 = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_007d077d;
LAB_007d0ac9:
puVar6 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_007d0ac9;
LAB_007d077d:
puVar6 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0xc);
}
uVar2 = puVar6[2];
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_00f4ee62 = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
uVar3 = DAT_00f4ee62;
if (uVar2 != 0xffff) {
uVar3 = *(ushort *)(*(int *)(this + 4) + (uint)uVar2 * 0xc + 2);
}
if (local_1e == uVar3) {
RotateLeft(this,uVar1);
iVar4 = Links(this,uVar1);
uVar7 = (uint)*(ushort *)(iVar4 + 4);
iVar4 = Links(this,*(ushort *)(iVar4 + 4));
local_20 = *(ushort *)(iVar4 + 4);
local_1e = uVar1;
}
*(undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc + 6) = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc + 6) = 0;
RotateRight(this,local_20);
}
else {
if (uVar2 == 0xffff) goto LAB_007d0748;
LAB_007d03f1:
if (*(short *)(*(int *)(this + 4) + (uint)uVar2 * 0xc + 6) != 0) goto LAB_007d0760;
LAB_007d0408:
*(undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc + 6) = 1;
local_1e = local_20;
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar2 * 0xc + 6) = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0xc + 6) = 0;
}
}
else {
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar4 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f4ee62 = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_007d0466;
LAB_007d08b9:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_007d08b9;
LAB_007d0466:
puVar5 = (ushort *)(*(int *)(this + 4) + (uint)local_20 * 0xc);
}
uVar2 = *puVar5;
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_00f4ee62 = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar2 != 0xffff) goto LAB_007d0487;
LAB_007d0880:
puVar6 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar2 == 0xffff) goto LAB_007d0880;
LAB_007d0487:
puVar6 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar2 * 0xc);
}
if (puVar6[3] == 0) {
*(undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc + 6) = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar2 * 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') &&
(iVar4 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f4ee62 = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
uVar2 = DAT_00f4ee64;
if (local_1e != 0xffff) {
uVar2 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0xc + 4);
}
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_00f4ee62 = 0xffff;
DAT_00f4ee64 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
uVar3 = Links(unsigned_short)::s_Sentinel;
if (uVar2 != 0xffff) {
uVar3 = *(ushort *)(*(int *)(this + 4) + (uint)uVar2 * 0xc);
}
if (local_1e == uVar3) {
RotateRight(this,uVar1);
iVar4 = Links(this,uVar1);
uVar7 = (uint)*(ushort *)(iVar4 + 4);
iVar4 = Links(this,*(ushort *)(iVar4 + 4));
local_20 = *(ushort *)(iVar4 + 4);
local_1e = uVar1;
}
*(undefined2 *)(*(int *)(this + 4) + uVar7 * 0xc + 6) = 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.