GCSDK::CJobMgr::BLaunchJobFromNetworkMsg
0x00060300 · 613 bytes · __thiscall
_ZN5GCSDK7CJobMgr24BLaunchJobFromNetworkMsgEPvRKNS_12JobMsgInfo_tEPNS_10CNetPacketE
Decompiled
undefined (4 params)
/* GCSDK::CJobMgr::BLaunchJobFromNetworkMsg(void*, GCSDK::JobMsgInfo_t const&, GCSDK::CNetPacket*)
*/
undefined4 __thiscall
GCSDK::CJobMgr::BLaunchJobFromNetworkMsg
(CJobMgr *this,void *param_1,JobMsgInfo_t *param_2,CNetPacket *param_3)
{
ushort uVar1;
char cVar2;
undefined4 *puVar3;
int iVar4;
CNetPacket *pCVar5;
int iVar6;
ushort *puVar7;
uint uVar8;
undefined4 *local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
local_2c = 0;
local_20 = 0;
local_28 = *(undefined4 *)param_2;
local_24 = *(undefined4 *)(param_2 + 0x14);
local_30 = &local_2c;
puVar3 = (undefined4 *)GMapJobTypes();
uVar1 = *(ushort *)(puVar3 + 4);
if (uVar1 != 0xffff) {
iVar4 = puVar3[1];
do {
while( true ) {
uVar8 = (uint)uVar1;
iVar6 = uVar8 * 0xc;
cVar2 = (*(code *)*puVar3)(&local_30,iVar4 + 8 + iVar6);
if (cVar2 != '\0') break;
cVar2 = (*(code *)*puVar3)(puVar3[1] + iVar6 + 8,&local_30);
if (cVar2 == '\0') goto LAB_000603e1;
if ((CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
iVar4 = puVar3[1];
uVar1 = *(ushort *)(iVar4 + 2 + iVar6);
if (uVar1 == 0xffff) goto LAB_000603d3;
}
if ((CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar4 = __cxa_guard_acquire(&CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel), iVar4 != 0)) {
CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
iVar4 = puVar3[1];
uVar1 = *(ushort *)(iVar4 + uVar8 * 0xc);
} while (uVar1 != 0xffff);
}
LAB_000603d3:
uVar8 = 0xffff;
uVar1 = 0xffff;
LAB_000603e1:
iVar4 = GMapJobTypes();
if (((int)uVar8 < *(int *)(iVar4 + 8)) && (uVar1 <= *(ushort *)(iVar4 + 0x16))) {
if ((CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel == '\0') &&
(iVar6 = __cxa_guard_acquire(&CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel), iVar6 != 0)) {
CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel = 0xffff;
DAT_000d2822 = 0xffff;
DAT_000d2824 = 0xffff;
__cxa_guard_release(&CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel);
}
if (uVar1 == 0xffff) {
puVar7 = &CUtlRBTree<GCSDK::JobType_t_const*,unsigned_short,bool(*)(GCSDK::JobType_t_const*const&,GCSDK::JobType_t_const*const&),CUtlMemory<UtlRBTreeNode_t<GCSDK::JobType_t_const*,unsigned_short>,unsigned_short>>
::Links(unsigned_short)::s_Sentinel;
}
else {
puVar7 = (ushort *)(*(int *)(iVar4 + 4) + (uint)uVar1 * 0xc);
}
if (*puVar7 != uVar1) {
iVar4 = GMapJobTypes();
pCVar5 = (CNetPacket *)
(**(code **)(*(int *)(*(int *)(iVar4 + 4) + (uint)uVar1 * 0xc + 8) + 0xc))(param_1,0)
;
CJob::StartJobFromNetworkMsg(pCVar5,(ulonglong *)param_3);
return 1;
}
}
return 0;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.