ResponseRulePartition::RemoveAll
0x005b9640 · 454 bytes · __thiscall
_ZN21ResponseRulePartition9RemoveAllEv
Decompiled
undefined (1 param)
/* ResponseRulePartition::RemoveAll() */
void __thiscall ResponseRulePartition::RemoveAll(ResponseRulePartition *this)
{
undefined4 *puVar1;
short sVar2;
ushort *puVar3;
int iVar4;
ushort uVar5;
uint uVar6;
int local_20;
local_20 = 0;
do {
uVar5 = *(ushort *)(this + 0x10);
while( true ) {
if ((CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = -1;
DAT_00f21cea = 0xffff;
DAT_00f21cec = 0xffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
sVar2 = CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel;
if (uVar5 != 0xffff) {
sVar2 = *(short *)((uint)uVar5 * 0x10 + *(int *)(this + 4));
}
if (sVar2 == -1) break;
if (CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') {
iVar4 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
if (iVar4 != 0) {
DAT_00f21cea = 0xffff;
CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = -1;
DAT_00f21cec = 0xffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
if (uVar5 != 0xffff) goto LAB_005b969a;
LAB_005b97d1:
puVar3 = (ushort *)
&CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar5 == 0xffff) goto LAB_005b97d1;
LAB_005b969a:
puVar3 = (ushort *)((uint)uVar5 * 0x10 + *(int *)(this + 4));
}
uVar5 = *puVar3;
}
for (uVar6 = (uint)uVar5; uVar6 != 0xffff; uVar6 = uVar6 & 0xffff) {
puVar1 = *(undefined4 **)(uVar6 * 0x10 + *(int *)(this + 4) + 0xc);
if (puVar1 != (undefined4 *)0x0) {
puVar1[6] = 0;
free((void *)puVar1[4]);
puVar1[5] = 0;
puVar1[4] = 0;
puVar1[7] = 0;
puVar1[2] = 0;
free((void *)*puVar1);
puVar1[1] = 0;
*puVar1 = 0;
puVar1[3] = 0;
operator_delete(puVar1);
}
uVar6 = CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::NextInorder((CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)this,(ushort)uVar6);
}
CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::RemoveAll((CUtlRBTree<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,Rule*,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,Rule*,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)this);
local_20 = local_20 + 1;
this = (ResponseRulePartition *)(this + 0x38);
if (local_20 == 0x100) {
return;
}
} while( true );
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
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.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.