CUtlRBTree<CUtlMap<char_const*,CMapListItem,int>::Node_t,int,CUtlMap<char_const*,CMapListItem,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CMapListItem,int>::Node_t,int>,int>>::InsertRebalance
0x00180b00 · 2727 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIPKc12CMapListItemiE6Node_tEiNS4_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS5_iEiEE15InsertRebalanceEi
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlMap<char const*, CMapListItem, int>::Node_t, int, CUtlMap<char const*,
CMapListItem, int>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<char const*, CMapListItem,
int>::Node_t, int>, int> >::InsertRebalance(int) */
void __thiscall
CUtlRBTree<CUtlMap<char_const*,CMapListItem,int>::Node_t,int,CUtlMap<char_const*,CMapListItem,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CMapListItem,int>::Node_t,int>,int>>
::InsertRebalance(CUtlRBTree<CUtlMap<char_const*,CMapListItem,int>::Node_t,int,CUtlMap<char_const*,CMapListItem,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CMapListItem,int>::Node_t,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_00180b67:
*(undefined4 *)(iVar2 * 0x1c + *(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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (param_1 == -1) goto LAB_00180ea4;
LAB_00180b2f:
puVar1 = (undefined4 *)(param_1 * 0x1c + *(int *)(this + 4));
}
else {
if (param_1 != -1) goto LAB_00180b2f;
LAB_00180ea4:
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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar2 == -1) goto LAB_00180e70;
LAB_00180b50:
puVar1 = (undefined4 *)(iVar2 * 0x1c + *(int *)(this + 4));
}
else {
if (iVar2 != -1) goto LAB_00180b50;
LAB_00180e70:
puVar1 = &Links(int)::s_Sentinel;
}
if (puVar1[3] != 0) {
iVar2 = *(int *)(this + 0x10);
goto LAB_00180b67;
}
if (Links(int)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar2 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (param_1 == -1) goto LAB_00180e14;
LAB_00180ba0:
puVar1 = (undefined4 *)(param_1 * 0x1c + *(int *)(this + 4));
}
else {
if (param_1 != -1) goto LAB_00180ba0;
LAB_00180e14:
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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar2 == -1) goto LAB_00180ddc;
LAB_00180bc1:
puVar1 = (undefined4 *)(iVar2 * 0x1c + *(int *)(this + 4));
}
else {
if (iVar2 != -1) goto LAB_00180bc1;
LAB_00180ddc:
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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_00180bd9;
}
if (iVar2 == -1) goto LAB_00180daa;
LAB_00180be2:
puVar1 = (undefined4 *)(iVar2 * 0x1c + *(int *)(this + 4));
}
else {
LAB_00180bd9:
if (iVar2 != -1) goto LAB_00180be2;
LAB_00180daa:
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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_00180bf3;
}
if (iVar5 == -1) goto LAB_00180d70;
LAB_00180bfc:
piVar7 = (int *)(iVar5 * 0x1c + *(int *)(this + 4));
}
else {
LAB_00180bf3:
if (iVar5 != -1) goto LAB_00180bfc;
LAB_00180d70:
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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_00180c12;
}
if (iVar6 == -1) goto LAB_00180fd2;
LAB_00180c1b:
puVar1 = (undefined4 *)(iVar6 * 0x1c + *(int *)(this + 4));
}
else {
LAB_00180c12:
if (iVar6 != -1) goto LAB_00180c1b;
LAB_00180fd2:
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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
iVar4 = DAT_003412a4;
if (iVar5 != -1) {
iVar4 = *(int *)(iVar5 * 0x1c + *(int *)(this + 4) + 0xc);
}
if (iVar4 == 0) {
LAB_00180c46:
*(undefined4 *)(iVar2 * 0x1c + *(int *)(this + 4) + 0xc) = 1;
*(undefined4 *)(iVar5 * 0x1c + *(int *)(this + 4) + 0xc) = 1;
*(undefined4 *)(iVar6 * 0x1c + *(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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_00180f2f;
}
if (param_1 == -1) goto LAB_0018132a;
LAB_00180f38:
iVar5 = *(int *)(param_1 * 0x1c + *(int *)(this + 4) + 8);
if (Links(int)::s_Sentinel != '\0') goto LAB_00180f49;
LAB_00181340:
iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar4 == 0) goto LAB_00180f49;
Links(int)::s_Sentinel = 0xffffffff;
DAT_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar5 == -1) goto LAB_001813a0;
LAB_00180f52:
if (param_1 != *(int *)(iVar5 * 0x1c + *(int *)(this + 4) + 4)) goto LAB_00180f68;
LAB_001813b0:
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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar2 == -1) {
puVar1 = &Links(int)::s_Sentinel;
}
else {
puVar1 = (undefined4 *)(iVar2 * 0x1c + *(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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar6 == -1) {
puVar1 = &Links(int)::s_Sentinel;
puVar3 = (undefined4 *)(*(int *)(this + 4) + -0x1c);
}
else {
puVar3 = (undefined4 *)(iVar6 * 0x1c + *(int *)(this + 4));
puVar1 = puVar3;
}
iVar6 = puVar1[2];
}
else {
LAB_00180f2f:
if (param_1 != -1) goto LAB_00180f38;
LAB_0018132a:
iVar5 = DAT_003412a0;
if (Links(int)::s_Sentinel == '\0') goto LAB_00181340;
LAB_00180f49:
if (iVar5 != -1) goto LAB_00180f52;
LAB_001813a0:
if (param_1 == DAT_0034129c) goto LAB_001813b0;
LAB_00180f68:
puVar3 = (undefined4 *)(iVar2 * 0x1c + *(int *)(this + 4));
iVar2 = param_1;
}
puVar3[3] = 1;
*(undefined4 *)(iVar6 * 0x1c + *(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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_00180c90;
}
if (iVar6 == -1) goto LAB_0018107a;
LAB_00180c99:
piVar7 = (int *)(iVar6 * 0x1c + *(int *)(this + 4));
}
else {
LAB_00180c90:
if (iVar6 != -1) goto LAB_00180c99;
LAB_0018107a:
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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar5 == -1) goto LAB_00181040;
LAB_00180cb2:
puVar1 = (undefined4 *)(iVar5 * 0x1c + *(int *)(this + 4));
}
else {
if (iVar5 != -1) goto LAB_00180cb2;
LAB_00181040:
puVar1 = &Links(int)::s_Sentinel;
}
if (puVar1[3] == 0) goto LAB_00180c46;
if (Links(int)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar5 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_00180cce;
}
if (param_1 == -1) goto LAB_0018127a;
LAB_00180cd7:
iVar5 = *(int *)(param_1 * 0x1c + *(int *)(this + 4) + 8);
if (Links(int)::s_Sentinel != '\0') goto LAB_00180ce8;
LAB_00181290:
iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar4 == 0) goto LAB_00180ce8;
Links(int)::s_Sentinel = 0xffffffff;
DAT_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar5 == -1) goto LAB_001812f0;
LAB_00180cf1:
piVar7 = (int *)(iVar5 * 0x1c + *(int *)(this + 4));
}
else {
LAB_00180cce:
if (param_1 != -1) goto LAB_00180cd7;
LAB_0018127a:
iVar5 = DAT_003412a0;
if (Links(int)::s_Sentinel == '\0') goto LAB_00181290;
LAB_00180ce8:
if (iVar5 != -1) goto LAB_00180cf1;
LAB_001812f0:
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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar2 == -1) {
puVar1 = &Links(int)::s_Sentinel;
}
else {
puVar1 = (undefined4 *)(iVar2 * 0x1c + *(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_0034129c = -1;
DAT_003412a0 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar6 == -1) {
puVar1 = &Links(int)::s_Sentinel;
puVar3 = (undefined4 *)(*(int *)(this + 4) + -0x1c);
}
else {
puVar3 = (undefined4 *)(iVar6 * 0x1c + *(int *)(this + 4));
puVar1 = puVar3;
}
iVar6 = puVar1[2];
}
else {
puVar3 = (undefined4 *)(iVar2 * 0x1c + *(int *)(this + 4));
iVar2 = param_1;
}
puVar3[3] = 1;
*(undefined4 *)(iVar6 * 0x1c + *(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.