CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,unsigned_short>,unsigned_short>>::InsertRebalance
0x00473ef0 · 2918 bytes · __thiscall
_ZN10CUtlRBTreeImtPFbRKmS1_E10CUtlMemoryI15UtlRBTreeNode_tImtEtEE15InsertRebalanceEt
Decompiled
undefined (2 params)
/* CUtlRBTree<unsigned long, unsigned short, bool (*)(unsigned long const&, unsigned long const&),
CUtlMemory<UtlRBTreeNode_t<unsigned long, unsigned short>, unsigned short>
>::InsertRebalance(unsigned short) */
void __thiscall
CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<unsigned_long,unsigned_short,bool(*)(unsigned_long_const&,unsigned_long_const&),CUtlMemory<UtlRBTreeNode_t<unsigned_long,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_00473f65:
*(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_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_00473f2f;
LAB_004742b1:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_004742b1;
LAB_00473f2f:
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_00f16242 = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar1 != 0xffff) goto LAB_00473f51;
LAB_00474278:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_00474278;
LAB_00473f51:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0xc);
}
if (puVar3[3] != 0) {
uVar1 = *(ushort *)(this + 0x10);
goto LAB_00473f65;
}
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_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_00473f9d;
LAB_00474219:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_00474219;
LAB_00473f9d:
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_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_00473fc2;
LAB_004741a5:
local_20 = DAT_00f16244;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00473fdb;
LAB_004741c0:
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_00473fe5;
LAB_004741e5:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_004741a5;
LAB_00473fc2:
local_20 = *(ushort *)(*(int *)(this + 4) + uVar7 * 0xc + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004741c0;
LAB_00473fdb:
if (uVar1 == 0xffff) goto LAB_004741e5;
LAB_00473fe5:
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_00f16244 = 0xffff;
DAT_00f16242 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_00473ffa;
}
if (uVar4 != 0xffff) goto LAB_00474004;
LAB_00474173:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
LAB_00473ffa:
if (uVar4 == 0xffff) goto LAB_00474173;
LAB_00474004:
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_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_0047402f;
LAB_00474479:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_00474479;
LAB_0047402f:
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_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_00474051;
LAB_004743a8:
if (DAT_00f16246 == 0) goto LAB_00474068;
LAB_004743c0:
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_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_004743dd;
LAB_00474759:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_00474759;
LAB_004743dd:
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_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_004743ff;
LAB_004746b0:
if (local_1e != DAT_00f16242) goto LAB_00474419;
LAB_004746c8:
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_00f16242 = 0xffff;
DAT_00f16244 = 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_00f16242 = 0xffff;
DAT_00f16244 = 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_004746b0;
LAB_004743ff:
if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0xc + 2))
goto LAB_004746c8;
LAB_00474419:
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_004743a8;
LAB_00474051:
if (*(short *)(*(int *)(this + 4) + (uint)uVar4 * 0xc + 6) != 0) goto LAB_004743c0;
LAB_00474068:
*(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_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_004740c6;
LAB_00474519:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_00474519;
LAB_004740c6:
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_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_004740e7;
LAB_004744e0:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar4 == 0xffff) goto LAB_004744e0;
LAB_004740e7:
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_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_004742dd;
LAB_004747c9:
uVar4 = DAT_00f16244;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004742f5;
LAB_004747e0:
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 == 0) goto LAB_004742f5;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f16242 = 0xffff;
DAT_00f16244 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_004742ff;
LAB_00474840:
if (local_1e != Links(unsigned_short)::s_Sentinel) goto LAB_00474318;
LAB_00474858:
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_00f16242 = 0xffff;
DAT_00f16244 = 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_00f16242 = 0xffff;
DAT_00f16244 = 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_004747c9;
LAB_004742dd:
uVar4 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0xc + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004747e0;
LAB_004742f5:
if (uVar4 == 0xffff) goto LAB_00474840;
LAB_004742ff:
if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0xc)) goto LAB_00474858;
LAB_00474318:
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.