CUtlRBTree<CIPRateLimit::iprate_s,int,bool(*)(CIPRateLimit::iprate_s_const&,CIPRateLimit::iprate_s_const&),CUtlMemory<UtlRBTreeNode_t<CIPRateLimit::iprate_s,int>,int>>::Insert
0x001f98a0 · 467 bytes · __thiscall
_ZN10CUtlRBTreeIN12CIPRateLimit8iprate_sEiPFbRKS1_S3_E10CUtlMemoryI15UtlRBTreeNode_tIS1_iEiEE6InsertES3_
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>
>::Insert(CIPRateLimit::iprate_s const&) */
int __thiscall
CUtlRBTree<CIPRateLimit::iprate_s,int,bool(*)(CIPRateLimit::iprate_s_const&,CIPRateLimit::iprate_s_const&),CUtlMemory<UtlRBTreeNode_t<CIPRateLimit::iprate_s,int>,int>>
::Insert(CUtlRBTree<CIPRateLimit::iprate_s,int,bool(*)(CIPRateLimit::iprate_s_const&,CIPRateLimit::iprate_s_const&),CUtlMemory<UtlRBTreeNode_t<CIPRateLimit::iprate_s,int>,int>>
*this,iprate_s *param_1)
{
bool bVar1;
char cVar2;
int iVar3;
undefined4 *puVar4;
int iVar5;
int iVar6;
int local_24;
int local_20;
iVar3 = *(int *)(this + 0x10);
if (*(int *)(this + 0x10) == -1) {
local_20 = NewNode(this);
local_24 = local_20 * 0x20;
puVar4 = (undefined4 *)(local_24 + *(int *)(this + 4));
puVar4[2] = 0xffffffff;
puVar4[1] = 0xffffffff;
*puVar4 = 0xffffffff;
puVar4[3] = 0;
}
else {
do {
iVar6 = iVar3;
iVar5 = iVar6 * 0x20;
cVar2 = (**(code **)this)(param_1,*(int *)(this + 4) + iVar5 + 0x10);
if (cVar2 == '\0') {
if ((Links(int)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar3 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00341804 = 0xffffffff;
DAT_00341808 = 0xffffffff;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
bVar1 = false;
iVar3 = *(int *)(*(int *)(this + 4) + 4 + iVar5);
}
else {
if ((Links(int)::s_Sentinel == '\0') &&
(iVar3 = __cxa_guard_acquire(&Links(int)::s_Sentinel), iVar3 != 0)) {
Links(int)::s_Sentinel = 0xffffffff;
DAT_00341804 = 0xffffffff;
DAT_00341808 = 0xffffffff;
__cxa_guard_release(&Links(int)::s_Sentinel);
}
bVar1 = true;
iVar3 = *(int *)(*(int *)(this + 4) + iVar5);
}
} while (iVar3 != -1);
local_20 = NewNode(this);
local_24 = local_20 * 0x20;
puVar4 = (undefined4 *)(local_24 + *(int *)(this + 4));
puVar4[2] = iVar6;
puVar4[1] = 0xffffffff;
*puVar4 = 0xffffffff;
puVar4[3] = 0;
if (iVar6 != -1) {
if (bVar1) {
*(int *)(*(int *)(this + 4) + iVar5) = local_20;
}
else {
*(int *)(*(int *)(this + 4) + 4 + iVar5) = local_20;
}
goto LAB_001f9963;
}
}
*(int *)(this + 0x10) = local_20;
LAB_001f9963:
InsertRebalance(this,local_20);
*(int *)(this + 0x14) = *(int *)(this + 0x14) + 1;
local_24 = local_24 + *(int *)(this + 4);
if (local_24 != -0x10) {
*(undefined4 *)(local_24 + 0x10) = *(undefined4 *)param_1;
*(undefined4 *)(local_24 + 0x14) = *(undefined4 *)(param_1 + 4);
*(undefined4 *)(local_24 + 0x18) = *(undefined4 *)(param_1 + 8);
*(undefined4 *)(local_24 + 0x1c) = *(undefined4 *)(param_1 + 0xc);
}
return local_20;
}
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.