CUtlRBTree<CUtlMap<unsigned_long_long,UGCFileRequest_t_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,UGCFileRequest_t_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,UGCFileRequest_t_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>::InsertRebalance
0x00226e40 · 2918 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIyPK16UGCFileRequest_ttE6Node_tEtNS4_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS5_tEtEE15InsertRebalanceEt
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlMap<unsigned long long, UGCFileRequest_t const*, unsigned short>::Node_t, unsigned
short, CUtlMap<unsigned long long, UGCFileRequest_t const*, unsigned short>::CKeyLess,
CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned long long, UGCFileRequest_t const*, unsigned
short>::Node_t, unsigned short>, unsigned short> >::InsertRebalance(unsigned short) */
void __thiscall
CUtlRBTree<CUtlMap<unsigned_long_long,UGCFileRequest_t_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,UGCFileRequest_t_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,UGCFileRequest_t_const*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::InsertRebalance(CUtlRBTree<CUtlMap<unsigned_long_long,UGCFileRequest_t_const*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_long_long,UGCFileRequest_t_const*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,UGCFileRequest_t_const*,unsigned_short>::Node_t,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_00226eb5:
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0x14 + 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_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_00226e7f;
LAB_00227201:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_00227201;
LAB_00226e7f:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x14);
}
uVar1 = puVar3[2];
if ((Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
DAT_00341aa2 = 0xffff;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar1 != 0xffff) goto LAB_00226ea1;
LAB_002271c8:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_002271c8;
LAB_00226ea1:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar1 * 0x14);
}
if (puVar3[3] != 0) {
uVar1 = *(ushort *)(this + 0x10);
goto LAB_00226eb5;
}
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_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_00226eed;
LAB_00227169:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_00227169;
LAB_00226eed:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x14);
}
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_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_00226f12;
LAB_002270f5:
local_20 = DAT_00341aa4;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00226f2b;
LAB_00227110:
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_00226f35;
LAB_00227135:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_002270f5;
LAB_00226f12:
local_20 = *(ushort *)(*(int *)(this + 4) + uVar7 * 0x14 + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00227110;
LAB_00226f2b:
if (uVar1 == 0xffff) goto LAB_00227135;
LAB_00226f35:
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14);
}
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_00341aa4 = 0xffff;
DAT_00341aa2 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
goto LAB_00226f4a;
}
if (uVar4 != 0xffff) goto LAB_00226f54;
LAB_002270c3:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
LAB_00226f4a:
if (uVar4 == 0xffff) goto LAB_002270c3;
LAB_00226f54:
puVar5 = (ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x14);
}
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_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_00226f7f;
LAB_002273c9:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_002273c9;
LAB_00226f7f:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x14);
}
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_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_00226fa1;
LAB_002272f8:
if (DAT_00341aa6 == 0) goto LAB_00226fb8;
LAB_00227310:
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_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_0022732d;
LAB_002276a9:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_1e == 0xffff) goto LAB_002276a9;
LAB_0022732d:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)local_1e * 0x14);
}
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_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_0022734f;
LAB_00227600:
if (local_1e != DAT_00341aa2) goto LAB_00227369;
LAB_00227618:
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_00341aa2 = 0xffff;
DAT_00341aa4 = 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 * 0x14);
}
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_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar4 == 0xffff) {
puVar6 = &Links(unsigned_short)::s_Sentinel;
puVar3 = (undefined2 *)(*(int *)(this + 4) + 0x13ffec);
}
else {
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x14);
puVar6 = puVar3;
}
local_20 = puVar6[2];
local_1e = uVar1;
}
else {
if (uVar4 == 0xffff) goto LAB_00227600;
LAB_0022734f:
if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x14 + 2))
goto LAB_00227618;
LAB_00227369:
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14);
}
puVar3[3] = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x14 + 6) = 0;
RotateRight(this,local_20);
}
else {
if (uVar4 == 0xffff) goto LAB_002272f8;
LAB_00226fa1:
if (*(short *)(*(int *)(this + 4) + (uint)uVar4 * 0x14 + 6) != 0) goto LAB_00227310;
LAB_00226fb8:
*(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14 + 6) = 1;
local_1e = local_20;
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x14 + 6) = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x14 + 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_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_20 != 0xffff) goto LAB_00227016;
LAB_00227469:
puVar5 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (local_20 == 0xffff) goto LAB_00227469;
LAB_00227016:
puVar5 = (ushort *)(*(int *)(this + 4) + (uint)local_20 * 0x14);
}
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_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_00227037;
LAB_00227430:
puVar3 = &Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar4 == 0xffff) goto LAB_00227430;
LAB_00227037:
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x14);
}
if (puVar3[3] == 0) {
*(undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14 + 6) = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x14 + 6) = 1;
local_1e = local_20;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x14 + 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_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (local_1e != 0xffff) goto LAB_0022722d;
LAB_00227719:
uVar4 = DAT_00341aa4;
if (Links(unsigned_short)::s_Sentinel != '\0') goto LAB_00227245;
LAB_00227730:
iVar2 = __cxa_guard_acquire(&Links(unsigned_short)::s_Sentinel);
if (iVar2 == 0) goto LAB_00227245;
Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
if (uVar4 != 0xffff) goto LAB_0022724f;
LAB_00227790:
if (local_1e != Links(unsigned_short)::s_Sentinel) goto LAB_00227268;
LAB_002277a8:
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_00341aa2 = 0xffff;
DAT_00341aa4 = 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 * 0x14);
}
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_00341aa2 = 0xffff;
DAT_00341aa4 = 0xffff;
__cxa_guard_release(&Links(unsigned_short)::s_Sentinel);
}
if (uVar4 == 0xffff) {
puVar6 = &Links(unsigned_short)::s_Sentinel;
puVar3 = (undefined2 *)(*(int *)(this + 4) + 0x13ffec);
}
else {
puVar3 = (undefined2 *)(*(int *)(this + 4) + (uint)uVar4 * 0x14);
puVar6 = puVar3;
}
local_20 = puVar6[2];
local_1e = uVar1;
}
else {
if (local_1e == 0xffff) goto LAB_00227719;
LAB_0022722d:
uVar4 = *(ushort *)(*(int *)(this + 4) + (uint)local_1e * 0x14 + 4);
if (Links(unsigned_short)::s_Sentinel == '\0') goto LAB_00227730;
LAB_00227245:
if (uVar4 == 0xffff) goto LAB_00227790;
LAB_0022724f:
if (local_1e == *(ushort *)(*(int *)(this + 4) + (uint)uVar4 * 0x14)) goto LAB_002277a8;
LAB_00227268:
puVar3 = (undefined2 *)(*(int *)(this + 4) + uVar7 * 0x14);
}
puVar3[3] = 1;
*(undefined2 *)(*(int *)(this + 4) + (uint)local_20 * 0x14 + 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.