L L4D2node

GCSDK::CJobMgr::BRouteMsgToJob

0x000623b0 · 1225 bytes · __thiscall

_ZN5GCSDK7CJobMgr14BRouteMsgToJobEPvPNS_10CNetPacketERKNS_12JobMsgInfo_tE

Decompiled

undefined (4 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* GCSDK::CJobMgr::BRouteMsgToJob(void*, GCSDK::CNetPacket*, GCSDK::JobMsgInfo_t const&) */

undefined4 __thiscall
GCSDK::CJobMgr::BRouteMsgToJob
          (CJobMgr *this,void *param_1,CNetPacket *param_2,JobMsgInfo_t *param_3)

{
  uint *puVar1;
  int iVar2;
  char cVar3;
  int iVar4;
  undefined4 uVar5;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  int local_2c;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  if ((*(uint *)(param_3 + 0xc) & *(uint *)(param_3 + 0x10)) != 0xffffffff) {
    local_3c = 0;
    local_38 = 0;
    if (_strstr == 0) {
      local_2c = 0;
    }
    else {
      (**(code **)(_strstr + 0x50))
                (_strstr,&local_3c,0,0,0,0,"/data/src/gcsdk/jobmgr.cpp",0x119,
                 &BRouteMsgToJob(void*,GCSDK::CNetPacket*,GCSDK::JobMsgInfo_t_const&)::tm_fmt,
                 "(%s)%s","Jobs/Coroutines","CJobMgr::BRouteMsgToJob() - continue job");
      local_2c = _strstr;
    }
    iVar2 = _DAT_000e89f8;
    local_34 = local_3c;
    local_30 = local_38;
                    /* try { // try from 00062526 to 00062586 has its CatchHandler @ 000628d0 */
    if (((_DAT_000e804c != 0) || (DAT_000e8050 == '\0')) &&
       (iVar4 = ThreadGetCurrentId(), iVar2 == iVar4)) {
      if ((char *)*_DAT_000e8054 != "CJobMgr::BRouteMsgToJob() - continue job") {
        _DAT_000e8054 =
             (int *)CVProfNode::GetSubNode((char *)_DAT_000e8054,0xb5908,(char *)0x0,0xb561c);
      }
      puVar1 = (uint *)(_DAT_000e80e0 + 4 + _DAT_000e8054[0x1c] * 8);
      *puVar1 = *puVar1 | 4;
      CVProfNode::EnterScope();
      DAT_000e8050 = '\0';
    }
    local_28 = *(undefined4 *)(param_3 + 0xc);
    local_24 = *(undefined4 *)(param_3 + 0x10);
                    /* try { // try from 0006248b to 000624bd has its CatchHandler @ 000628af */
    iVar4 = CUtlRBTree<CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::Node_t,int,CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::Node_t,int>,int>>
            ::Find((CUtlRBTree<CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::Node_t,int,CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<unsigned_long_long,GCSDK::CJob*,int>::Node_t,int>,int>>
                    *)this,(Node_t *)&local_28);
    iVar2 = _DAT_000e89f8;
    if (iVar4 != -1) {
      PassMsgToJob(this,*(CJob **)(iVar4 * 0x1c + *(int *)(this + 4) + 0x18),param_2,param_3);
      iVar2 = _DAT_000e89f8;
      if (((DAT_000e8050 == '\0') || (_DAT_000e804c != 0)) &&
         (iVar4 = ThreadGetCurrentId(), iVar2 == iVar4)) {
        cVar3 = CVProfNode::ExitScope();
        if (cVar3 != '\0') {
          _DAT_000e8054 = (int *)_DAT_000e8054[0x19];
        }
        DAT_000e8050 = _DAT_000e8054 == (int *)0xe8058;
      }
      if (local_2c != 0) {
        (**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,0,0,0);
      }
      return 1;
    }
    if (((DAT_000e8050 == '\0') || (_DAT_000e804c != 0)) &&
       (iVar4 = ThreadGetCurrentId(), iVar2 == iVar4)) {
      cVar3 = CVProfNode::ExitScope();
      if (cVar3 != '\0') {
        _DAT_000e8054 = (int *)_DAT_000e8054[0x19];
      }
      DAT_000e8050 = _DAT_000e8054 == (int *)0xe8058;
    }
    if (local_2c != 0) {
      (**(code **)(local_2c + 0x54))(local_2c,local_34,local_30,0,0,0);
    }
  }
  local_34 = 0;
  local_30 = 0;
  if (_strstr == 0) {
    local_20 = 0;
  }
  else {
    (**(code **)(_strstr + 0x50))
              (_strstr,&local_34,0,0,0,0,"/data/src/gcsdk/jobmgr.cpp",299,
               &BRouteMsgToJob(void*,GCSDK::CNetPacket*,GCSDK::JobMsgInfo_t_const&)::tm_fmt,"(%s)%s"
               ,"Jobs/Coroutines","CJobMgr::BRouteMsgToJob() - job");
    local_20 = _strstr;
  }
  iVar2 = _DAT_000e89f8;
  local_28 = local_34;
  local_24 = local_30;
                    /* try { // try from 00062796 to 000627f6 has its CatchHandler @ 000628f5 */
  if (((_DAT_000e804c != 0) || (DAT_000e8050 == '\0')) &&
     (iVar4 = ThreadGetCurrentId(), iVar2 == iVar4)) {
    if ((char *)*_DAT_000e8054 != "CJobMgr::BRouteMsgToJob() - job") {
      _DAT_000e8054 =
           (int *)CVProfNode::GetSubNode((char *)_DAT_000e8054,0xb5934,(char *)0x0,0xb561c);
    }
    puVar1 = (uint *)(_DAT_000e80e0 + 4 + _DAT_000e8054[0x1c] * 8);
    *puVar1 = *puVar1 | 4;
    CVProfNode::EnterScope();
    DAT_000e8050 = '\0';
  }
                    /* try { // try from 000626f6 to 00062727 has its CatchHandler @ 000628d4 */
  cVar3 = BLaunchJobFromNetworkMsg(this,param_1,param_3,param_2);
  if (cVar3 == '\0') {
    if ((*(uint *)(param_3 + 0xc) & *(uint *)(param_3 + 0x10)) == 0xffffffff) {
      uVar5 = 0;
      goto LAB_0006272d;
    }
    RecordOrphanedMessage((uint)this,CONCAT44(*(uint *)(param_3 + 0xc),*(undefined4 *)param_3));
  }
  uVar5 = 1;
LAB_0006272d:
  iVar2 = _DAT_000e89f8;
  if (((DAT_000e8050 == '\0') || (_DAT_000e804c != 0)) &&
     (iVar4 = ThreadGetCurrentId(), iVar2 == iVar4)) {
    cVar3 = CVProfNode::ExitScope();
    if (cVar3 != '\0') {
      _DAT_000e8054 = (int *)_DAT_000e8054[0x19];
    }
    DAT_000e8050 = _DAT_000e8054 == (int *)0xe8058;
  }
  if (local_20 == 0) {
    return uVar5;
  }
  (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
  return uVar5;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)