CUtlRBTree<CBalanceTeamGroup,unsigned_short,bool(*)(CBalanceTeamGroup_const&,CBalanceTeamGroup_const&),CUtlMemory<UtlRBTreeNode_t<CBalanceTeamGroup,unsigned_short>,unsigned_short>>::InsertRebalance
0x004cfcd0 · 2919 bytes · __thiscall
_ZN10CUtlRBTreeI17CBalanceTeamGrouptPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_tEtEE15InsertRebalanceEt
Decompiled
undefined (2 params)
/* CUtlRBTree<CBalanceTeamGroup, unsigned short, bool (*)(CBalanceTeamGroup const&,
CBalanceTeamGroup const&), CUtlMemory<UtlRBTreeNode_t<CBalanceTeamGroup, unsigned short>,
unsigned short> >::InsertRebalance(unsigned short) */
void __thiscall
CUtlRBTree<CBalanceTeamGroup,unsigned_short,bool(*)(CBalanceTeamGroup_const&,CBalanceTeamGroup_const&),CUtlMemory<UtlRBTreeNode_t<CBalanceTeamGroup,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<CBalanceTeamGroup,unsigned_short,bool(*)(CBalanceTeamGroup_const&,CBalanceTeamGroup_const&),CUtlMemory<UtlRBTreeNode_t<CBalanceTeamGroup,unsigned_short>,unsigned_short>>
*this,ushort param_1)
{
ushort uVar1;
ushort uVar2;
short sVar3;
undefined2 *puVar4;
undefined2 *puVar5;
int iVar6;
ushort uVar7;
ushort *puVar8;
uint uVar9;
uint uVar10;
uint uVar11;
ushort uVar12;
uint uVar13;
uVar13 = (uint)param_1;
do {
uVar1 = *(ushort *)(this + 0x10);
uVar12 = (ushort)uVar13;
if (uVar12 == uVar1) {
LAB_004cfd3f:
*(undefined2 *)((uint)uVar1 * 0x2c + *(int *)(this + 4) + 6) = 1;
return;
}
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
DAT_00f1ad1a = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar12 == 0xffff) goto LAB_004d00c5;
LAB_004cfd02:
puVar4 = (undefined2 *)(uVar13 * 0x2c + *(int *)(this + 4));
}
else {
if (uVar12 != 0xffff) goto LAB_004cfd02;
LAB_004d00c5:
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
uVar1 = puVar4[2];
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar1 == 0xffff) goto LAB_004d0090;
LAB_004cfd26:
puVar4 = (undefined2 *)((uint)uVar1 * 0x2c + *(int *)(this + 4));
}
else {
if (uVar1 != 0xffff) goto LAB_004cfd26;
LAB_004d0090:
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
if (puVar4[3] != 0) {
uVar1 = *(ushort *)(this + 0x10);
goto LAB_004cfd3f;
}
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
DAT_00f1ad1a = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar12 == 0xffff) goto LAB_004d0035;
LAB_004cfd79:
puVar4 = (undefined2 *)(uVar13 * 0x2c + *(int *)(this + 4));
}
else {
if (uVar12 != 0xffff) goto LAB_004cfd79;
LAB_004d0035:
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
uVar1 = puVar4[2];
uVar11 = (uint)uVar1;
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) goto LAB_004cfffd;
LAB_004cfda3:
puVar4 = (undefined2 *)(uVar11 * 0x2c + *(int *)(this + 4));
}
else {
if (uVar1 != 0xffff) goto LAB_004cfda3;
LAB_004cfffd:
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
uVar7 = puVar4[2];
uVar10 = (uint)uVar7;
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_004cfdbd;
}
if (uVar1 == 0xffff) goto LAB_004cffcb;
LAB_004cfdc7:
puVar4 = (undefined2 *)(uVar11 * 0x2c + *(int *)(this + 4));
}
else {
LAB_004cfdbd:
if (uVar1 != 0xffff) goto LAB_004cfdc7;
LAB_004cffcb:
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
uVar2 = puVar4[2];
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_004cfdda;
}
if (uVar2 == 0xffff) goto LAB_004cff91;
LAB_004cfde4:
puVar8 = (ushort *)((uint)uVar2 * 0x2c + *(int *)(this + 4));
}
else {
LAB_004cfdda:
if (uVar2 != 0xffff) goto LAB_004cfde4;
LAB_004cff91:
puVar8 = &Links(unsigned_short)::s_Sentinel;
}
if (uVar1 == *puVar8) {
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_004cfdfe;
}
if (uVar7 == 0xffff) goto LAB_004d01fb;
LAB_004cfe08:
puVar4 = (undefined2 *)(uVar10 * 0x2c + *(int *)(this + 4));
}
else {
LAB_004cfdfe:
if (uVar7 != 0xffff) goto LAB_004cfe08;
LAB_004d01fb:
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
uVar7 = puVar4[1];
uVar9 = (uint)uVar7;
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
sVar3 = DAT_00f1ad1e;
if (uVar7 != 0xffff) {
sVar3 = *(short *)(uVar9 * 0x2c + *(int *)(this + 4) + 6);
}
if (sVar3 == 0) {
LAB_004cfe3b:
*(undefined2 *)(uVar11 * 0x2c + *(int *)(this + 4) + 6) = 1;
*(undefined2 *)(uVar9 * 0x2c + *(int *)(this + 4) + 6) = 1;
*(undefined2 *)(uVar10 * 0x2c + *(int *)(this + 4) + 6) = 0;
uVar13 = uVar10;
}
else {
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_004d014f;
}
if (uVar12 == 0xffff) goto LAB_004d0583;
LAB_004d0159:
uVar7 = *(ushort *)(uVar13 * 0x2c + *(int *)(this + 4) + 4);
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004d016e;
LAB_004d0598:
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 == 0) goto LAB_004d016e;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar7 == 0xffff) goto LAB_004d05f8;
LAB_004d0178:
if (uVar12 != *(ushort *)((uint)uVar7 * 0x2c + *(int *)(this + 4) + 2)) goto LAB_004d0190;
LAB_004d0610:
RotateLeft(this,uVar1);
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
DAT_00f1ad1a = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
else {
puVar4 = (undefined2 *)(uVar11 * 0x2c + *(int *)(this + 4));
}
uVar1 = puVar4[2];
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
puVar4 = &Links(unsigned_short)::s_Sentinel;
puVar5 = (undefined2 *)(*(int *)(this + 4) + 0x2bffd4);
}
else {
puVar5 = (undefined2 *)((uint)uVar1 * 0x2c + *(int *)(this + 4));
puVar4 = puVar5;
}
uVar10 = (uint)(ushort)puVar4[2];
}
else {
LAB_004d014f:
if (uVar12 != 0xffff) goto LAB_004d0159;
LAB_004d0583:
uVar7 = DAT_00f1ad1c;
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004d0598;
LAB_004d016e:
if (uVar7 != 0xffff) goto LAB_004d0178;
LAB_004d05f8:
if (uVar12 == DAT_00f1ad1a) goto LAB_004d0610;
LAB_004d0190:
puVar5 = (undefined2 *)(uVar11 * 0x2c + *(int *)(this + 4));
uVar11 = uVar13;
}
puVar5[3] = 1;
*(undefined2 *)(uVar10 * 0x2c + *(int *)(this + 4) + 6) = 0;
RotateRight(this,(ushort)uVar10);
uVar13 = uVar11;
}
}
else {
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_004cfe90;
}
if (uVar7 == 0xffff) goto LAB_004d02ab;
LAB_004cfe9a:
puVar8 = (ushort *)(uVar10 * 0x2c + *(int *)(this + 4));
}
else {
LAB_004cfe90:
if (uVar7 != 0xffff) goto LAB_004cfe9a;
LAB_004d02ab:
puVar8 = &Links(unsigned_short)::s_Sentinel;
}
uVar7 = *puVar8;
uVar9 = (uint)uVar7;
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar7 == 0xffff) goto LAB_004d0270;
LAB_004cfeb8:
puVar4 = (undefined2 *)(uVar9 * 0x2c + *(int *)(this + 4));
}
else {
if (uVar7 != 0xffff) goto LAB_004cfeb8;
LAB_004d0270:
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
if (puVar4[3] == 0) goto LAB_004cfe3b;
if (Links(unsigned_short)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_004cfedb;
}
if (uVar12 == 0xffff) goto LAB_004d04d3;
LAB_004cfee5:
uVar7 = *(ushort *)(uVar13 * 0x2c + *(int *)(this + 4) + 4);
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_004cfefa;
LAB_004d04e8:
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 == 0) goto LAB_004cfefa;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar7 == 0xffff) goto LAB_004d0548;
LAB_004cff04:
puVar8 = (ushort *)((uint)uVar7 * 0x2c + *(int *)(this + 4));
}
else {
LAB_004cfedb:
if (uVar12 != 0xffff) goto LAB_004cfee5;
LAB_004d04d3:
uVar7 = DAT_00f1ad1c;
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_004d04e8;
LAB_004cfefa:
if (uVar7 != 0xffff) goto LAB_004cff04;
LAB_004d0548:
puVar8 = &Links(unsigned_short)::s_Sentinel;
}
if (uVar12 == *puVar8) {
RotateRight(this,uVar1);
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
DAT_00f1ad1a = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
else {
puVar4 = (undefined2 *)(uVar11 * 0x2c + *(int *)(this + 4));
}
uVar1 = puVar4[2];
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f1ad1a = 0xffff;
DAT_00f1ad1c = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
puVar4 = &Links(unsigned_short)::s_Sentinel;
puVar5 = (undefined2 *)(*(int *)(this + 4) + 0x2bffd4);
}
else {
puVar5 = (undefined2 *)((uint)uVar1 * 0x2c + *(int *)(this + 4));
puVar4 = puVar5;
}
uVar10 = (uint)(ushort)puVar4[2];
}
else {
puVar5 = (undefined2 *)(uVar11 * 0x2c + *(int *)(this + 4));
uVar11 = uVar13;
}
puVar5[3] = 1;
*(undefined2 *)(uVar10 * 0x2c + *(int *)(this + 4) + 6) = 0;
RotateLeft(this,(ushort)uVar10);
uVar13 = uVar11;
}
} 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.