CResponseSystem::Dispatch
0x005b55b0 · 333 bytes · __thiscall
_ZN15CResponseSystem8DispatchEPKcjR7CUtlMapIjMS_FvvEtE
Decompiled
undefined (4 params)
/* CResponseSystem::Dispatch(char const*, unsigned int, CUtlMap<unsigned int, void
(CResponseSystem::*)(), unsigned short>&) */
undefined4 __thiscall
CResponseSystem::Dispatch(CResponseSystem *this,char *param_1,uint param_2,CUtlMap *param_3)
{
int iVar1;
ushort uVar2;
code *pcVar3;
char cVar4;
uint uVar5;
int iVar6;
CResponseSystem *pCVar7;
uint local_28 [6];
local_28[0] = param_2;
uVar5 = (uint)*(ushort *)(param_3 + 0x10);
if (*(ushort *)(param_3 + 0x10) != 0xffff) {
iVar6 = *(int *)(param_3 + 4);
do {
while( true ) {
iVar1 = uVar5 * 0x14;
cVar4 = (**(code **)param_3)(local_28,iVar6 + 8 + iVar1);
if (cVar4 != '\0') break;
cVar4 = (**(code **)param_3)(*(int *)(param_3 + 4) + iVar1 + 8,local_28);
if (cVar4 == '\0') {
pcVar3 = *(code **)(iVar1 + *(int *)(param_3 + 4) + 0xc);
pCVar7 = this + *(int *)(iVar1 + *(int *)(param_3 + 4) + 0x10);
if (((uint)pcVar3 & 1) == 0) {
(*pcVar3)(pCVar7);
}
else {
(**(code **)(pcVar3 + *(int *)pCVar7 + -1))(pCVar7);
}
return 1;
}
if ((CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f21caa = 0xffff;
DAT_00f21cac = 0xffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
iVar6 = *(int *)(param_3 + 4);
uVar2 = *(ushort *)(iVar6 + 2 + iVar1);
uVar5 = (uint)uVar2;
if (uVar2 == 0xffff) {
return 0;
}
}
if ((CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
DAT_00f21caa = 0xffff;
CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_00f21cac = 0xffff;
__cxa_guard_release(&CUtlRBTree<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short,CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_int,void(CResponseSystem::*)(),unsigned_short>::Node_t,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
iVar6 = *(int *)(param_3 + 4);
uVar2 = *(ushort *)(iVar6 + uVar5 * 0x14);
uVar5 = (uint)uVar2;
} while (uVar2 != 0xffff);
}
return 0;
}
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.