CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>::InsertRebalance
0x00153530 · 2800 bytes · __thiscall
_ZN10CUtlRBTreeI14MatchingProp_ttPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_tEtEE15InsertRebalanceEt
Decompiled
undefined (2 params)
/* CUtlRBTree<MatchingProp_t, unsigned short, bool (*)(MatchingProp_t const&, MatchingProp_t
const&), CUtlMemory<UtlRBTreeNode_t<MatchingProp_t, unsigned short>, unsigned short>
>::InsertRebalance(unsigned short) */
void __thiscall
CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,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_00153595:
*(undefined2 *)((uint)uVar1 * 0x10 + *(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) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar12 == 0xffff) goto LAB_001538e5;
LAB_00153562:
puVar4 = (undefined2 *)(uVar13 * 0x10 + *(int *)(this + 4));
}
else {
if (uVar12 != 0xffff) goto LAB_00153562;
LAB_001538e5:
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)) {
DAT_00340f22 = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar1 == 0xffff) goto LAB_001538b0;
LAB_00153581:
puVar4 = (undefined2 *)((uint)uVar1 * 0x10 + *(int *)(this + 4));
}
else {
if (uVar1 != 0xffff) goto LAB_00153581;
LAB_001538b0:
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
if (puVar4[3] != 0) {
uVar1 = *(ushort *)(this + 0x10);
goto LAB_00153595;
}
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_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar12 == 0xffff) goto LAB_00153855;
LAB_001535c9:
puVar4 = (undefined2 *)(uVar13 * 0x10 + *(int *)(this + 4));
}
else {
if (uVar12 != 0xffff) goto LAB_001535c9;
LAB_00153855:
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_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) goto LAB_00153825;
LAB_001535ee:
puVar4 = (undefined2 *)(uVar11 * 0x10 + *(int *)(this + 4));
}
else {
if (uVar1 != 0xffff) goto LAB_001535ee;
LAB_00153825:
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_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_00153603;
}
if (uVar1 == 0xffff) goto LAB_001537f3;
LAB_0015360d:
puVar4 = (undefined2 *)(uVar11 * 0x10 + *(int *)(this + 4));
}
else {
LAB_00153603:
if (uVar1 != 0xffff) goto LAB_0015360d;
LAB_001537f3:
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_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_00153622;
}
if (uVar2 == 0xffff) goto LAB_001537b9;
LAB_0015362c:
puVar8 = (ushort *)((uint)uVar2 * 0x10 + *(int *)(this + 4));
}
else {
LAB_00153622:
if (uVar2 != 0xffff) goto LAB_0015362c;
LAB_001537b9:
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) {
DAT_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_00153646;
}
if (uVar7 == 0xffff) goto LAB_00153a0b;
LAB_00153650:
puVar4 = (undefined2 *)(uVar10 * 0x10 + *(int *)(this + 4));
}
else {
LAB_00153646:
if (uVar7 != 0xffff) goto LAB_00153650;
LAB_00153a0b:
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)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00340f24 = 0xffff;
DAT_00340f22 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
sVar3 = DAT_00340f26;
if (uVar7 != 0xffff) {
sVar3 = *(short *)(uVar9 * 0x10 + *(int *)(this + 4) + 6);
}
if (sVar3 == 0) {
LAB_00153683:
*(undefined2 *)(uVar11 * 0x10 + *(int *)(this + 4) + 6) = 1;
*(undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4) + 6) = 1;
*(undefined2 *)(uVar10 * 0x10 + *(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_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_0015396f;
}
if (uVar12 == 0xffff) goto LAB_00153d7b;
LAB_00153979:
uVar7 = *(ushort *)(uVar13 * 0x10 + *(int *)(this + 4) + 4);
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_0015398e;
LAB_00153d90:
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 == 0) goto LAB_0015398e;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar7 == 0xffff) goto LAB_00153df0;
LAB_00153998:
if (uVar12 != *(ushort *)((uint)uVar7 * 0x10 + *(int *)(this + 4) + 2)) goto LAB_001539ae;
LAB_00153e08:
RotateLeft(this,uVar1);
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_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
else {
puVar4 = (undefined2 *)(uVar11 * 0x10 + *(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_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
puVar4 = &Links(unsigned_short)::s_Sentinel;
puVar5 = (undefined2 *)(*(int *)(this + 4) + 0xffff0);
}
else {
puVar5 = (undefined2 *)((uint)uVar1 * 0x10 + *(int *)(this + 4));
puVar4 = puVar5;
}
uVar10 = (uint)(ushort)puVar4[2];
}
else {
LAB_0015396f:
if (uVar12 != 0xffff) goto LAB_00153979;
LAB_00153d7b:
uVar7 = DAT_00340f24;
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00153d90;
LAB_0015398e:
if (uVar7 != 0xffff) goto LAB_00153998;
LAB_00153df0:
if (uVar12 == DAT_00340f22) goto LAB_00153e08;
LAB_001539ae:
puVar5 = (undefined2 *)(uVar11 * 0x10 + *(int *)(this + 4));
uVar11 = uVar13;
}
puVar5[3] = 1;
*(undefined2 *)(uVar10 * 0x10 + *(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_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_001536c8;
}
if (uVar7 == 0xffff) goto LAB_00153ab3;
LAB_001536d2:
puVar8 = (ushort *)(uVar10 * 0x10 + *(int *)(this + 4));
}
else {
LAB_001536c8:
if (uVar7 != 0xffff) goto LAB_001536d2;
LAB_00153ab3:
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)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar7 == 0xffff) goto LAB_00153a78;
LAB_001536f0:
puVar4 = (undefined2 *)(uVar9 * 0x10 + *(int *)(this + 4));
}
else {
if (uVar7 != 0xffff) goto LAB_001536f0;
LAB_00153a78:
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
if (puVar4[3] == 0) goto LAB_00153683;
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_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_00153713;
}
if (uVar12 == 0xffff) goto LAB_00153ccb;
LAB_0015371d:
uVar7 = *(ushort *)(uVar13 * 0x10 + *(int *)(this + 4) + 4);
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00153732;
LAB_00153ce0:
iVar6 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar6 == 0) goto LAB_00153732;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar7 == 0xffff) goto LAB_00153d40;
LAB_0015373c:
puVar8 = (ushort *)((uint)uVar7 * 0x10 + *(int *)(this + 4));
}
else {
LAB_00153713:
if (uVar12 != 0xffff) goto LAB_0015371d;
LAB_00153ccb:
uVar7 = DAT_00340f24;
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00153ce0;
LAB_00153732:
if (uVar7 != 0xffff) goto LAB_0015373c;
LAB_00153d40:
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)) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
puVar4 = &Links(unsigned_short)::s_Sentinel;
}
else {
puVar4 = (undefined2 *)(uVar11 * 0x10 + *(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_00340f22 = 0xffff;
DAT_00340f24 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
puVar4 = &Links(unsigned_short)::s_Sentinel;
puVar5 = (undefined2 *)(*(int *)(this + 4) + 0xffff0);
}
else {
puVar5 = (undefined2 *)((uint)uVar1 * 0x10 + *(int *)(this + 4));
puVar4 = puVar5;
}
uVar10 = (uint)(ushort)puVar4[2];
}
else {
puVar5 = (undefined2 *)(uVar11 * 0x10 + *(int *)(this + 4));
uVar11 = uVar13;
}
puVar5[3] = 1;
*(undefined2 *)(uVar10 * 0x10 + *(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.