CUtlRBTree<CUtlMap<char_const*,CUserMessage*,int>::Node_t,int,CUtlMap<char_const*,CUserMessage*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CUserMessage*,int>::Node_t,int>,int>>::InsertRebalance
0x0057e8a0 · 2562 bytes · __thiscall
_ZN10CUtlRBTreeIN7CUtlMapIPKcP12CUserMessageiE6Node_tEiNS5_8CKeyLessE10CUtlMemoryI15UtlRBTreeNode_tIS6_iEiEE15InsertRebalanceEi
Decompiled
undefined (2 params)
/* CUtlRBTree<CUtlMap<char const*, CUserMessage*, int>::Node_t, int, CUtlMap<char const*,
CUserMessage*, int>::CKeyLess, CUtlMemory<UtlRBTreeNode_t<CUtlMap<char const*, CUserMessage*,
int>::Node_t, int>, int> >::InsertRebalance(int) */
void __thiscall
CUtlRBTree<CUtlMap<char_const*,CUserMessage*,int>::Node_t,int,CUtlMap<char_const*,CUserMessage*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CUserMessage*,int>::Node_t,int>,int>>
::InsertRebalance(CUtlRBTree<CUtlMap<char_const*,CUserMessage*,int>::Node_t,int,CUtlMap<char_const*,CUserMessage*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,CUserMessage*,int>::Node_t,int>,int>>
*this,int param_1)
{
int iVar1;
int *piVar2;
int iVar3;
int iVar4;
int iVar5;
undefined4 *puVar6;
undefined4 *puVar7;
do {
iVar1 = *(int *)(this + 0x10);
if (param_1 == iVar1) {
LAB_0057e904:
*(undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18 + 0xc) = 1;
return;
}
if (Links(int)::s_Sentinel == '\0') {
iVar1 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar1 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (param_1 == -1) goto LAB_0057ec35;
LAB_0057e8d1:
puVar6 = (undefined4 *)(*(int *)(this + 4) + param_1 * 0x18);
}
else {
if (param_1 != -1) goto LAB_0057e8d1;
LAB_0057ec35:
puVar6 = &Links(int)::s_Sentinel;
}
iVar1 = puVar6[2];
if ((Links(int)::s_Sentinel == '\0') &&
(iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar1 == -1) goto LAB_0057ec00;
LAB_0057e8f1:
puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
}
else {
if (iVar1 != -1) goto LAB_0057e8f1;
LAB_0057ec00:
puVar6 = &Links(int)::s_Sentinel;
}
if (puVar6[3] != 0) {
iVar1 = *(int *)(this + 0x10);
goto LAB_0057e904;
}
if (Links(int)::s_Sentinel == '\0') {
iVar1 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar1 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (param_1 == -1) goto LAB_0057eba5;
LAB_0057e939:
puVar6 = (undefined4 *)(*(int *)(this + 4) + param_1 * 0x18);
}
else {
if (param_1 != -1) goto LAB_0057e939;
LAB_0057eba5:
puVar6 = &Links(int)::s_Sentinel;
}
iVar1 = puVar6[2];
if (Links(int)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar5 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar1 == -1) goto LAB_0057eb74;
LAB_0057e959:
puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
}
else {
if (iVar1 != -1) goto LAB_0057e959;
LAB_0057eb74:
puVar6 = &Links(int)::s_Sentinel;
}
iVar5 = puVar6[2];
if (Links(int)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar4 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar1 == -1) goto LAB_0057eb3c;
LAB_0057e976:
puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
}
else {
if (iVar1 != -1) goto LAB_0057e976;
LAB_0057eb3c:
puVar6 = &Links(int)::s_Sentinel;
}
iVar4 = puVar6[2];
if (Links(int)::s_Sentinel == '\0') {
iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar3 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_0057e98a;
}
if (iVar4 == -1) goto LAB_0057eb0a;
LAB_0057e993:
piVar2 = (int *)(*(int *)(this + 4) + iVar4 * 0x18);
}
else {
LAB_0057e98a:
if (iVar4 != -1) goto LAB_0057e993;
LAB_0057eb0a:
piVar2 = &Links(int)::s_Sentinel;
}
if (iVar1 == *piVar2) {
if (Links(int)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar4 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar5 == -1) goto LAB_0057ed44;
LAB_0057e9b5:
puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18);
}
else {
if (iVar5 != -1) goto LAB_0057e9b5;
LAB_0057ed44:
puVar6 = &Links(int)::s_Sentinel;
}
iVar4 = puVar6[1];
if ((Links(int)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar3 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
iVar3 = DAT_00f1ecf8;
if (iVar4 != -1) {
iVar3 = *(int *)(*(int *)(this + 4) + iVar4 * 0x18 + 0xc);
}
if (iVar3 == 0) {
LAB_0057e9e6:
*(undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18 + 0xc) = 1;
*(undefined4 *)(*(int *)(this + 4) + iVar4 * 0x18 + 0xc) = 1;
*(undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18 + 0xc) = 0;
param_1 = iVar5;
}
else {
if (Links(int)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar4 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (param_1 == -1) goto LAB_0057f035;
LAB_0057ecb9:
iVar4 = *(int *)(*(int *)(this + 4) + param_1 * 0x18 + 8);
if (Links(int)::s_Sentinel != '\0') goto LAB_0057ecd0;
LAB_0057f048:
iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar3 == 0) goto LAB_0057ecd0;
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar4 == -1) goto LAB_0057f0a0;
LAB_0057ecd9:
if (param_1 != *(int *)(*(int *)(this + 4) + iVar4 * 0x18 + 4)) goto LAB_0057ecee;
LAB_0057f0b8:
RotateLeft(this,iVar1);
if ((Links(int)::s_Sentinel == '\0') &&
(iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar1 == -1) {
puVar6 = &Links(int)::s_Sentinel;
}
else {
puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
}
iVar5 = puVar6[2];
if ((Links(int)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar5 == -1) {
puVar7 = &Links(int)::s_Sentinel;
puVar6 = (undefined4 *)(*(int *)(this + 4) + -0x18);
}
else {
puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18);
puVar7 = puVar6;
}
iVar5 = puVar7[2];
param_1 = iVar1;
}
else {
if (param_1 != -1) goto LAB_0057ecb9;
LAB_0057f035:
iVar4 = DAT_00f1ecf4;
if (Links(int)::s_Sentinel == '\0') goto LAB_0057f048;
LAB_0057ecd0:
if (iVar4 != -1) goto LAB_0057ecd9;
LAB_0057f0a0:
if (param_1 == DAT_00f1ecf0) goto LAB_0057f0b8;
LAB_0057ecee:
puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
}
puVar6[3] = 1;
*(undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18 + 0xc) = 0;
RotateRight(this,iVar5);
}
}
else {
if (Links(int)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar4 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar5 == -1) goto LAB_0057edd4;
LAB_0057ea31:
piVar2 = (int *)(*(int *)(this + 4) + iVar5 * 0x18);
}
else {
if (iVar5 != -1) goto LAB_0057ea31;
LAB_0057edd4:
piVar2 = &Links(int)::s_Sentinel;
}
iVar4 = *piVar2;
if ((Links(int)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar3 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar4 == -1) goto LAB_0057eda0;
LAB_0057ea4d:
puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar4 * 0x18);
}
else {
if (iVar4 != -1) goto LAB_0057ea4d;
LAB_0057eda0:
puVar6 = &Links(int)::s_Sentinel;
}
if (puVar6[3] == 0) goto LAB_0057e9e6;
if (Links(int)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar4 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (param_1 == -1) goto LAB_0057ef95;
LAB_0057ea76:
iVar4 = *(int *)(*(int *)(this + 4) + param_1 * 0x18 + 8);
if (Links(int)::s_Sentinel != '\0') goto LAB_0057ea8d;
LAB_0057efa8:
iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar3 == 0) goto LAB_0057ea8d;
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar4 == -1) goto LAB_0057f000;
LAB_0057ea96:
piVar2 = (int *)(*(int *)(this + 4) + iVar4 * 0x18);
}
else {
if (param_1 != -1) goto LAB_0057ea76;
LAB_0057ef95:
iVar4 = DAT_00f1ecf4;
if (Links(int)::s_Sentinel == '\0') goto LAB_0057efa8;
LAB_0057ea8d:
if (iVar4 != -1) goto LAB_0057ea96;
LAB_0057f000:
piVar2 = &Links(int)::s_Sentinel;
}
if (param_1 == *piVar2) {
RotateRight(this,iVar1);
if ((Links(int)::s_Sentinel == '\0') &&
(iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar5 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar1 == -1) {
puVar6 = &Links(int)::s_Sentinel;
}
else {
puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
}
iVar5 = puVar6[2];
if ((Links(int)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar4 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00f1ecf0 = -1;
DAT_00f1ecf4 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar5 == -1) {
puVar7 = &Links(int)::s_Sentinel;
puVar6 = (undefined4 *)(*(int *)(this + 4) + -0x18);
}
else {
puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18);
puVar7 = puVar6;
}
iVar5 = puVar7[2];
param_1 = iVar1;
}
else {
puVar6 = (undefined4 *)(*(int *)(this + 4) + iVar1 * 0x18);
}
puVar6[3] = 1;
*(undefined4 *)(*(int *)(this + 4) + iVar5 * 0x18 + 0xc) = 0;
RotateLeft(this,iVar5);
}
} 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.