CUtlDict<int,unsigned_short>::RemoveAll
0x00218a20 · 322 bytes · __thiscall
_ZN8CUtlDictIitE9RemoveAllEv
Decompiled
undefined (1 param)
/* CUtlDict<int, unsigned short>::RemoveAll() */
void __thiscall CUtlDict<int,unsigned_short>::RemoveAll(CUtlDict<int,unsigned_short> *this)
{
ushort uVar1;
int iVar2;
short *psVar3;
uint uVar4;
ushort *puVar5;
uVar1 = *(ushort *)(this + 0x10);
do {
uVar4 = (uint)uVar1;
if ((CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar2 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel), iVar2 != 0)) {
CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_0034189e = 0xffff;
DAT_003418a0 = 0xffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
if (uVar1 == 0xffff) goto LAB_00218ad0;
LAB_00218a4a:
psVar3 = (short *)(uVar4 * 0x10 + *(int *)(this + 4));
}
else {
if (uVar1 != 0xffff) goto LAB_00218a4a;
LAB_00218ad0:
psVar3 = &CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel;
}
if (*psVar3 == -1) {
for (; (ushort)uVar4 != 0xffff; uVar4 = uVar4 & 0xffff) {
free(*(void **)(uVar4 * 0x10 + *(int *)(this + 4) + 8));
uVar4 = CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::NextInorder((CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)this,(ushort)uVar4);
}
CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::RemoveAll((CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
*)this);
return;
}
if (CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') {
iVar2 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
if (iVar2 != 0) {
CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_0034189e = 0xffff;
DAT_003418a0 = 0xffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
if (uVar1 != 0xffff) goto LAB_00218a76;
LAB_00218b41:
puVar5 = &CUtlRBTree<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short,CUtlMap<char_const*,int,unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel;
}
else {
if (uVar1 == 0xffff) goto LAB_00218b41;
LAB_00218a76:
puVar5 = (ushort *)(uVar4 * 0x10 + *(int *)(this + 4));
}
uVar1 = *puVar5;
} 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.