CUtlRBTree<CIPRateLimit::iprate_s,int,bool(*)(CIPRateLimit::iprate_s_const&,CIPRateLimit::iprate_s_const&),CUtlMemory<UtlRBTreeNode_t<CIPRateLimit::iprate_s,int>,int>>::InsertRebalance
0x001f8dc0 · 2655 bytes · __thiscall
_ZN10CUtlRBTreeIN12CIPRateLimit8iprate_sEiPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_iEiEE15InsertRebalanceEi
Decompiled
undefined (2 params)
/* CUtlRBTree<CIPRateLimit::iprate_s, int, bool (*)(CIPRateLimit::iprate_s const&,
CIPRateLimit::iprate_s const&), CUtlMemory<UtlRBTreeNode_t<CIPRateLimit::iprate_s, int>, int>
>::InsertRebalance(int) */
void __thiscall
CUtlRBTree<CIPRateLimit::iprate_s,int,bool(*)(CIPRateLimit::iprate_s_const&,CIPRateLimit::iprate_s_const&),CUtlMemory<UtlRBTreeNode_t<CIPRateLimit::iprate_s,int>,int>>
::InsertRebalance(CUtlRBTree<CIPRateLimit::iprate_s,int,bool(*)(CIPRateLimit::iprate_s_const&,CIPRateLimit::iprate_s_const&),CUtlMemory<UtlRBTreeNode_t<CIPRateLimit::iprate_s,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_001f8e1d:
*(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_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (param_1 == -1) goto LAB_001f9134;
LAB_001f8def:
puVar1 = (undefined4 *)(param_1 * 0x20 + *(int *)(this + 4));
}
else {
if (param_1 != -1) goto LAB_001f8def;
LAB_001f9134:
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_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar2 == -1) goto LAB_001f9100;
LAB_001f8e0b:
puVar1 = (undefined4 *)(iVar2 * 0x20 + *(int *)(this + 4));
}
else {
if (iVar2 != -1) goto LAB_001f8e0b;
LAB_001f9100:
puVar1 = &Links(int)::s_Sentinel;
}
if (puVar1[3] != 0) {
iVar2 = *(int *)(this + 0x10);
goto LAB_001f8e1d;
}
if (Links(int)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar2 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (param_1 == -1) goto LAB_001f90a4;
LAB_001f8e50:
puVar1 = (undefined4 *)(param_1 * 0x20 + *(int *)(this + 4));
}
else {
if (param_1 != -1) goto LAB_001f8e50;
LAB_001f90a4:
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_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
if (iVar2 == -1) goto LAB_001f906c;
LAB_001f8e6c:
puVar1 = (undefined4 *)(iVar2 * 0x20 + *(int *)(this + 4));
}
else {
if (iVar2 != -1) goto LAB_001f8e6c;
LAB_001f906c:
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_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_001f8e7f;
}
if (iVar2 == -1) goto LAB_001f903a;
LAB_001f8e88:
puVar1 = (undefined4 *)(iVar2 * 0x20 + *(int *)(this + 4));
}
else {
LAB_001f8e7f:
if (iVar2 != -1) goto LAB_001f8e88;
LAB_001f903a:
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_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_001f8e9b;
}
if (iVar5 == -1) goto LAB_001f9000;
LAB_001f8ea4:
piVar7 = (int *)(iVar5 * 0x20 + *(int *)(this + 4));
}
else {
LAB_001f8e9b:
if (iVar5 != -1) goto LAB_001f8ea4;
LAB_001f9000:
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_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_001f8eb6;
}
if (iVar6 == -1) goto LAB_001f9252;
LAB_001f8ebf:
puVar1 = (undefined4 *)(iVar6 * 0x20 + *(int *)(this + 4));
}
else {
LAB_001f8eb6:
if (iVar6 != -1) goto LAB_001f8ebf;
LAB_001f9252:
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_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
iVar4 = DAT_0034180c;
if (iVar5 != -1) {
iVar4 = *(int *)(iVar5 * 0x20 + *(int *)(this + 4) + 0xc);
}
if (iVar4 == 0) {
LAB_001f8eee:
*(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_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_001f91bf;
}
if (param_1 == -1) goto LAB_001f95a2;
LAB_001f91c8:
iVar5 = *(int *)(param_1 * 0x20 + *(int *)(this + 4) + 8);
if (Links(int)::s_Sentinel != '\0') goto LAB_001f91db;
LAB_001f95b8:
iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar4 == 0) goto LAB_001f91db;
Links(int)::s_Sentinel = 0xffffffff;
DAT_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar5 == -1) goto LAB_001f9618;
LAB_001f91e4:
if (param_1 != *(int *)(iVar5 * 0x20 + *(int *)(this + 4) + 4)) goto LAB_001f91f5;
LAB_001f9630:
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_00341804 = -1;
DAT_00341808 = -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_00341804 = -1;
DAT_00341808 = -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_001f91bf:
if (param_1 != -1) goto LAB_001f91c8;
LAB_001f95a2:
iVar5 = DAT_00341808;
if (Links(int)::s_Sentinel == '\0') goto LAB_001f95b8;
LAB_001f91db:
if (iVar5 != -1) goto LAB_001f91e4;
LAB_001f9618:
if (param_1 == DAT_00341804) goto LAB_001f9630;
LAB_001f91f5:
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_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_001f8f28;
}
if (iVar6 == -1) goto LAB_001f92fa;
LAB_001f8f31:
piVar7 = (int *)(iVar6 * 0x20 + *(int *)(this + 4));
}
else {
LAB_001f8f28:
if (iVar6 != -1) goto LAB_001f8f31;
LAB_001f92fa:
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_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar5 == -1) goto LAB_001f92c0;
LAB_001f8f4c:
puVar1 = (undefined4 *)(iVar5 * 0x20 + *(int *)(this + 4));
}
else {
if (iVar5 != -1) goto LAB_001f8f4c;
LAB_001f92c0:
puVar1 = &Links(int)::s_Sentinel;
}
if (puVar1[3] == 0) goto LAB_001f8eee;
if (Links(int)::s_Sentinel == '\0') {
iVar5 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar5 != 0) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
goto LAB_001f8f6a;
}
if (param_1 == -1) goto LAB_001f94f2;
LAB_001f8f73:
iVar5 = *(int *)(param_1 * 0x20 + *(int *)(this + 4) + 8);
if (Links(int)::s_Sentinel != '\0') goto LAB_001f8f86;
LAB_001f9508:
iVar4 = __cxa_guard_acquire(&Links(int)::s_Sentinel);
if (iVar4 == 0) goto LAB_001f8f86;
Links(int)::s_Sentinel = 0xffffffff;
DAT_00341804 = -1;
DAT_00341808 = -1;
__cxa_guard_release(&Links(int)::s_Sentinel);
if (iVar5 == -1) goto LAB_001f9568;
LAB_001f8f8f:
piVar7 = (int *)(iVar5 * 0x20 + *(int *)(this + 4));
}
else {
LAB_001f8f6a:
if (param_1 != -1) goto LAB_001f8f73;
LAB_001f94f2:
iVar5 = DAT_00341808;
if (Links(int)::s_Sentinel == '\0') goto LAB_001f9508;
LAB_001f8f86:
if (iVar5 != -1) goto LAB_001f8f8f;
LAB_001f9568:
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_00341804 = -1;
DAT_00341808 = -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_00341804 = -1;
DAT_00341808 = -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.