CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>::InsertRebalance
0x00065110 · 2918 bytes · __thiscall
_ZN10CUtlRBTreeIPKN5GCSDK9JobType_tEtPFbRKS3_S5_E10CUtlMemoryI15UtlRBTreeNode_tIS3_tEtEE15InsertRebalanceEt
Decompiled
undefined (2 params)
/* CUtlRBTree<GCSDK::JobType_t const*, unsigned short, bool (*)(GCSDK::JobType_t const* const&,
GCSDK::JobType_t const* const&), CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t const*, unsigned
short>, unsigned short> >::InsertRebalance(unsigned short) */
void __thiscall
CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,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_00065185:
*(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_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_0006514f;
LAB_000654d1:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_000654d1;
LAB_0006514f:
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_000d2822 = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar1 != 0xffff) goto LAB_00065171;
LAB_00065498:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_00065498;
LAB_00065171:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0xc);
}
if (puVar3[3] != 0) {
uVar1 = *(ushort *)(this + 0x10);
goto LAB_00065185;
}
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_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_000651bd;
LAB_00065439:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_00065439;
LAB_000651bd:
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_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_000651e2;
LAB_000653c5:
local_20 = DAT_000d2824;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_000651fb;
LAB_000653e0:
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_00065205;
LAB_00065405:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_000653c5;
LAB_000651e2:
local_20 = *(ushort *)(*(int *)(this + 4) + uVar7 * 0xc + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_000653e0;
LAB_000651fb:
if (uVar1 == 0xffff) goto LAB_00065405;
LAB_00065205:
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_000d2824 = 0xffff;
DAT_000d2822 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_0006521a;
}
if (uVar4 != 0xffff) goto LAB_00065224;
LAB_00065393:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
LAB_0006521a:
if (uVar4 == 0xffff) goto LAB_00065393;
LAB_00065224:
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_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_0006524f;
LAB_00065699:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_00065699;
LAB_0006524f:
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_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_00065271;
LAB_000655c8:
if (DAT_000d2826 == 0) goto LAB_00065288;
LAB_000655e0:
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_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_000655fd;
LAB_00065979:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_00065979;
LAB_000655fd:
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_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_0006561f;
LAB_000658d0:
if (local_1e != DAT_000d2822) goto LAB_00065639;
LAB_000658e8:
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_000d2822 = 0xffff;
DAT_000d2824 = 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_000d2822 = 0xffff;
DAT_000d2824 = 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_000658d0;
LAB_0006561f:
if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0xc + 2))
goto LAB_000658e8;
LAB_00065639:
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_000655c8;
LAB_00065271:
if (*(short *)(*(int *)(this + 4) + (uint)uVar4 * 0xc + 6) != 0) goto LAB_000655e0;
LAB_00065288:
*(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_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_000652e6;
LAB_00065739:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_00065739;
LAB_000652e6:
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_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_00065307;
LAB_00065700:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar4 == 0xffff) goto LAB_00065700;
LAB_00065307:
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_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_000654fd;
LAB_000659e9:
uVar4 = DAT_000d2824;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00065515;
LAB_00065a00:
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 == 0) goto LAB_00065515;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_0006551f;
LAB_00065a60:
if (local_1e != Links(unsigned_short)::s_Sentinel) goto LAB_00065538;
LAB_00065a78:
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_000d2822 = 0xffff;
DAT_000d2824 = 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_000d2822 = 0xffff;
DAT_000d2824 = 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_000659e9;
LAB_000654fd:
uVar4 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0xc + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00065a00;
LAB_00065515:
if (uVar4 == 0xffff) goto LAB_00065a60;
LAB_0006551f:
if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0xc)) goto LAB_00065a78;
LAB_00065538:
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.