RecvTable_CreateDecoders
0x00151540 · 425 bytes · __cdecl
_Z24RecvTable_CreateDecodersPK20CStandardSendProxiesbPb
Decompiled
undefined (3 params)
/* RecvTable_CreateDecoders(CStandardSendProxies const*, bool, bool*) */
char RecvTable_CreateDecoders(CStandardSendProxies *param_1,bool param_2,bool *param_3)
{
ushort uVar1;
char cVar2;
uint uVar3;
CRecvDecoder *pCVar4;
char local_41;
code *local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined2 local_28;
undefined2 local_26;
undefined2 local_24;
undefined2 local_22;
undefined4 local_20;
DTI_Init();
if (param_3 != (bool *)0x0) {
*param_3 = false;
}
local_41 = SetupClientSendTableHierarchy();
if ((local_41 != '\0') && (uVar3 = (uint)DAT_0039f680, DAT_0039f680 != 0xffff)) {
pCVar4 = *(CRecvDecoder **)(g_RecvDecoders + uVar3 * 8);
if (*(int *)(pCVar4 + 4) != 0) {
do {
cVar2 = CSendTablePrecalc::SetupFlatPropertyArray((CSendTablePrecalc *)(pCVar4 + 8));
if (cVar2 == '\0') break;
local_30 = 0;
local_28 = 0xffff;
local_26 = 0;
local_24 = 0xffff;
local_22 = 0xffff;
local_2c = 0;
local_20 = 0;
local_38 = MatchingProp_t::LessFunc;
local_34 = 0;
/* try { // try from 00151612 to 00151646 has its CatchHandler @ 001516f3 */
cVar2 = MatchRecvPropsToSendProps_R
((CUtlRBTree *)&local_38,*(char **)(*(SendTable **)(pCVar4 + 0x94) + 8),
*(SendTable **)(pCVar4 + 0x94),*(RecvTable **)pCVar4,param_2,param_3);
if (cVar2 == '\0') {
CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
::RemoveAll((CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
*)&local_38);
local_24 = 0xffff;
CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>::Purge
((CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short> *)
&local_34);
local_22 = 0xffff;
CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>::Purge
((CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short> *)
&local_34);
return '\0';
}
CopySendPropsToRecvProps
((CUtlRBTree *)&local_38,(CUtlVector *)(pCVar4 + 0x34),
(CUtlVector *)(pCVar4 + 0x120));
CopySendPropsToRecvProps
((CUtlRBTree *)&local_38,(CUtlVector *)(pCVar4 + 0x5c),
(CUtlVector *)(pCVar4 + 0x134));
DTI_HookRecvDecoder(pCVar4);
CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
::RemoveAll((CUtlRBTree<MatchingProp_t,unsigned_short,bool(*)(MatchingProp_t_const&,MatchingProp_t_const&),CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>>
*)&local_38);
local_24 = 0xffff;
CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>::Purge
((CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short> *)
&local_34);
local_22 = 0xffff;
CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short>::Purge
((CUtlMemory<UtlRBTreeNode_t<MatchingProp_t,unsigned_short>,unsigned_short> *)
&local_34);
uVar1 = *(ushort *)(g_RecvDecoders + 6 + uVar3 * 8);
uVar3 = (uint)uVar1;
if (uVar1 == 0xffff) {
return local_41;
}
pCVar4 = *(CRecvDecoder **)(g_RecvDecoders + uVar3 * 8);
} while (*(int *)(pCVar4 + 4) != 0);
}
local_41 = '\0';
}
return local_41;
}
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.