CDedicatedServerAPI::ModShutdown
0x00217800 · 245 bytes · __thiscall
_ZN19CDedicatedServerAPI11ModShutdownEv
Decompiled
undefined (1 param)
/* CDedicatedServerAPI::ModShutdown() */
void __thiscall CDedicatedServerAPI::ModShutdown(CDedicatedServerAPI *this)
{
undefined4 *puVar1;
puVar1 = *(undefined4 **)(this + 8);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = &PTR___cxa_pure_virtual_002ccf48;
CUtlDict<int,unsigned_short>::RemoveAll((CUtlDict<int,unsigned_short> *)(puVar1 + 0xb));
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>>
*)(puVar1 + 0xb));
*(undefined2 *)(puVar1 + 0x10) = 0xffff;
CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
::Purge((CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
*)(puVar1 + 0xc));
*(undefined2 *)((int)puVar1 + 0x42) = 0xffff;
CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
::Purge((CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,unsigned_short>::Node_t,unsigned_short>,unsigned_short>
*)(puVar1 + 0xc));
puVar1[9] = 0;
CUtlMemory<IAppSystem*,int>::Purge((CUtlMemory<IAppSystem*,int> *)(puVar1 + 6));
puVar1[10] = puVar1[6];
CUtlMemory<IAppSystem*,int>::Purge((CUtlMemory<IAppSystem*,int> *)(puVar1 + 6));
puVar1[4] = 0;
CUtlMemory<CAppSystemGroup::Module_t,int>::Purge
((CUtlMemory<CAppSystemGroup::Module_t,int> *)(puVar1 + 1));
puVar1[5] = puVar1[1];
CUtlMemory<CAppSystemGroup::Module_t,int>::Purge
((CUtlMemory<CAppSystemGroup::Module_t,int> *)(puVar1 + 1));
operator_delete(puVar1);
*(undefined4 *)(this + 8) = 0;
}
g_AppSystemFactory = 0;
(**(code **)(*(int *)eng + 0xc))(eng);
(**(code **)(*(int *)game + 0xc))(game);
(**(code **)(*materials + 0x24))(materials);
TraceShutdown("COM_ShutdownFileSystem()",0);
COM_ShutdownFileSystem();
return;
}
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.