CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>::InsertRebalance
0x0018fd70 · 2655 bytes · __thiscall
_ZN10CUtlRBTreeI10CUtlStringiPFbRKS0_S2_E10CUtlMemoryI15UtlRBTreeNode_tIS0_iEiEE15InsertRebalanceEi
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlString, int, bool (*)(CUtlString const&, CUtlString const&),
CUtlMemory<UtlRBTreeNode_t<CUtlString, int>, int> >::InsertRebalance(int) */
void __thiscall
CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
::InsertRebalance(CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
*this,int param_1)
{
undefined4 *puVar1;
int iVar2;
undefined4 *puVar3;
int iVar4;
int iVar5;
int iVar6;
int *piVar7;
do {
iVar2 = *(int *)(this + 0x10);
if (param_1 == iVar2) {
LAB_0018fdcd:
*(undefined4 *)(iVar2 * 0x20 + *(int *)(this + 4) + 0xc) = 1;
return;
}
if (Links(int)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar2 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (param_1 == -1) goto LAB_001900e4;
LAB_0018fd9f:
puVar1 = (undefined4 *)(param_1 * 0x20 + *(int *)(this + 4));
}
else {
if (param_1 != -1) goto LAB_0018fd9f;
LAB_001900e4:
puVar1 = &Links(int)::s_Sentinel;
}
iVar2 = puVar1[2];
if ((Links(int)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar6 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar2 == -1) goto LAB_001900b0;
LAB_0018fdbb:
puVar1 = (undefined4 *)(iVar2 * 0x20 + *(int *)(this + 4));
}
else {
if (iVar2 != -1) goto LAB_0018fdbb;
LAB_001900b0:
puVar1 = &Links(int)::s_Sentinel;
}
if (puVar1[3] != 0) {
iVar2 = *(int *)(this + 0x10);
goto LAB_0018fdcd;
}
if (Links(int)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar2 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (param_1 == -1) goto LAB_00190054;
LAB_0018fe00:
puVar1 = (undefined4 *)(param_1 * 0x20 + *(int *)(this + 4));
}
else {
if (param_1 != -1) goto LAB_0018fe00;
LAB_00190054:
puVar1 = &Links(int)::s_Sentinel;
}
iVar2 = puVar1[2];
if (Links(int)::s_Sentinel == '\0') {
iVar6 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar6 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar2 == -1) goto LAB_0019001c;
LAB_0018fe1c:
puVar1 = (undefined4 *)(iVar2 * 0x20 + *(int *)(this + 4));
}
else {
if (iVar2 != -1) goto LAB_0018fe1c;
LAB_0019001c:
puVar1 = &Links(int)::s_Sentinel;
}
iVar6 = puVar1[2];
if (Links(int)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar5 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_0018fe2f;
}
if (iVar2 == -1) goto LAB_0018ffea;
LAB_0018fe38:
puVar1 = (undefined4 *)(iVar2 * 0x20 + *(int *)(this + 4));
}
else {
LAB_0018fe2f:
if (iVar2 != -1) goto LAB_0018fe38;
LAB_0018ffea:
puVar1 = &Links(int)::s_Sentinel;
}
iVar5 = puVar1[2];
if (Links(int)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar4 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_0018fe4b;
}
if (iVar5 == -1) goto LAB_0018ffb0;
LAB_0018fe54:
piVar7 = (int *)(iVar5 * 0x20 + *(int *)(this + 4));
}
else {
LAB_0018fe4b:
if (iVar5 != -1) goto LAB_0018fe54;
LAB_0018ffb0:
piVar7 = &Links(int)::s_Sentinel;
}
if (iVar2 == *piVar7) {
if (Links(int)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar5 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_0018fe66;
}
if (iVar6 == -1) goto LAB_00190202;
LAB_0018fe6f:
puVar1 = (undefined4 *)(iVar6 * 0x20 + *(int *)(this + 4));
}
else {
LAB_0018fe66:
if (iVar6 != -1) goto LAB_0018fe6f;
LAB_00190202:
puVar1 = &Links(int)::s_Sentinel;
}
iVar5 = puVar1[1];
if ((Links(int)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
iVar4 = DAT_003412d8;
if (iVar5 != -1) {
iVar4 = *(int *)(iVar5 * 0x20 + *(int *)(this + 4) + 0xc);
}
if (iVar4 == 0) {
LAB_0018fe9e:
*(undefined4 *)(iVar2 * 0x20 + *(int *)(this + 4) + 0xc) = 1;
*(undefined4 *)(iVar5 * 0x20 + *(int *)(this + 4) + 0xc) = 1;
*(undefined4 *)(iVar6 * 0x20 + *(int *)(this + 4) + 0xc) = 0;
param_1 = iVar6;
}
else {
if (Links(int)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar5 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_0019016f;
}
if (param_1 == -1) goto LAB_00190552;
LAB_00190178:
iVar5 = *(int *)(param_1 * 0x20 + *(int *)(this + 4) + 8);
if (Links(int)::s_Sentinel != '\0') goto LAB_0019018b;
LAB_00190568:
iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar4 == 0) goto LAB_0019018b;
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar5 == -1) goto LAB_001905c8;
LAB_00190194:
if (param_1 != *(int *)(iVar5 * 0x20 + *(int *)(this + 4) + 4)) goto LAB_001901a5;
LAB_001905e0:
RotateLeft(this,iVar2);
if ((Links(int)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar6 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar2 == -1) {
puVar1 = &Links(int)::s_Sentinel;
}
else {
puVar1 = (undefined4 *)(iVar2 * 0x20 + *(int *)(this + 4));
}
iVar6 = puVar1[2];
if ((Links(int)::s_Sentinel == '\0') &&
(iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar6 == -1) {
puVar1 = &Links(int)::s_Sentinel;
puVar3 = (undefined4 *)(*(int *)(this + 4) + -0x20);
}
else {
puVar3 = (undefined4 *)(iVar6 * 0x20 + *(int *)(this + 4));
puVar1 = puVar3;
}
iVar6 = puVar1[2];
}
else {
LAB_0019016f:
if (param_1 != -1) goto LAB_00190178;
LAB_00190552:
iVar5 = DAT_003412d4;
if (Links(int)::s_Sentinel == '\0') goto LAB_00190568;
LAB_0019018b:
if (iVar5 != -1) goto LAB_00190194;
LAB_001905c8:
if (param_1 == DAT_003412d0) goto LAB_001905e0;
LAB_001901a5:
puVar3 = (undefined4 *)(iVar2 * 0x20 + *(int *)(this + 4));
iVar2 = param_1;
}
puVar3[3] = 1;
*(undefined4 *)(iVar6 * 0x20 + *(int *)(this + 4) + 0xc) = 0;
RotateRight(this,iVar6);
param_1 = iVar2;
}
}
else {
if (Links(int)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar5 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_0018fed8;
}
if (iVar6 == -1) goto LAB_001902aa;
LAB_0018fee1:
piVar7 = (int *)(iVar6 * 0x20 + *(int *)(this + 4));
}
else {
LAB_0018fed8:
if (iVar6 != -1) goto LAB_0018fee1;
LAB_001902aa:
piVar7 = &Links(int)::s_Sentinel;
}
iVar5 = *piVar7;
if ((Links(int)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar5 == -1) goto LAB_00190270;
LAB_0018fefc:
puVar1 = (undefined4 *)(iVar5 * 0x20 + *(int *)(this + 4));
}
else {
if (iVar5 != -1) goto LAB_0018fefc;
LAB_00190270:
puVar1 = &Links(int)::s_Sentinel;
}
if (puVar1[3] == 0) goto LAB_0018fe9e;
if (Links(int)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar5 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_0018ff1a;
}
if (param_1 == -1) goto LAB_001904a2;
LAB_0018ff23:
iVar5 = *(int *)(param_1 * 0x20 + *(int *)(this + 4) + 8);
if (Links(int)::s_Sentinel != '\0') goto LAB_0018ff36;
LAB_001904b8:
iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar4 == 0) goto LAB_0018ff36;
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar5 == -1) goto LAB_00190518;
LAB_0018ff3f:
piVar7 = (int *)(iVar5 * 0x20 + *(int *)(this + 4));
}
else {
LAB_0018ff1a:
if (param_1 != -1) goto LAB_0018ff23;
LAB_001904a2:
iVar5 = DAT_003412d4;
if (Links(int)::s_Sentinel == '\0') goto LAB_001904b8;
LAB_0018ff36:
if (iVar5 != -1) goto LAB_0018ff3f;
LAB_00190518:
piVar7 = &Links(int)::s_Sentinel;
}
if (param_1 == *piVar7) {
RotateRight(this,iVar2);
if ((Links(int)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar6 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar2 == -1) {
puVar1 = &Links(int)::s_Sentinel;
}
else {
puVar1 = (undefined4 *)(iVar2 * 0x20 + *(int *)(this + 4));
}
iVar6 = puVar1[2];
if ((Links(int)::s_Sentinel == '\0') &&
(iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_003412d0 = -1;
DAT_003412d4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar6 == -1) {
puVar1 = &Links(int)::s_Sentinel;
puVar3 = (undefined4 *)(*(int *)(this + 4) + -0x20);
}
else {
puVar3 = (undefined4 *)(iVar6 * 0x20 + *(int *)(this + 4));
puVar1 = puVar3;
}
iVar6 = puVar1[2];
}
else {
puVar3 = (undefined4 *)(iVar2 * 0x20 + *(int *)(this + 4));
iVar2 = param_1;
}
puVar3[3] = 1;
*(undefined4 *)(iVar6 * 0x20 + *(int *)(this + 4) + 0xc) = 0;
RotateLeft(this,iVar6);
param_1 = iVar2;
}
} 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.