L L4D2node

GCSDK::CJobMgr::BResumeSleepingJobs

0x00060760 · 305 bytes · __thiscall

_ZN5GCSDK7CJobMgr19BResumeSleepingJobsER11CLimitTimer

Decompiled

undefined (2 params)

/* WARNING: Removing unreachable block (ram,0x0006087d) */
/* GCSDK::CJobMgr::BResumeSleepingJobs(CLimitTimer&) */

undefined4 __thiscall GCSDK::CJobMgr::BResumeSleepingJobs(CJobMgr *this,CLimitTimer *param_1)

{
  undefined4 *puVar1;
  CJob *this_00;
  undefined8 uVar2;
  int iVar3;
  uint uVar4;
  longlong lVar5;
  undefined4 local_28;
  undefined4 local_24;
  
  while( true ) {
    if (*(int *)(this + 0x5c) == 0) {
      return 0;
    }
    puVar1 = *(undefined4 **)(this + 0x50);
    if ((DAT_000d65bc <= (uint)puVar1[3]) &&
       ((DAT_000d65bc < (uint)puVar1[3] || (CJobTime::sm_lTimeCur < (uint)puVar1[2])))) break;
    local_28 = *puVar1;
    local_24 = puVar1[1];
    iVar3 = 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);
    CUtlPriorityQueue<GCSDK::CJobMgr::JobSleeping_t,CDefUtlPriorityQueueLessFunc<GCSDK::CJobMgr::JobSleeping_t>,CUtlMemory<GCSDK::CJobMgr::JobSleeping_t,int>>
    ::RemoveAtHead((CUtlPriorityQueue<GCSDK::CJobMgr::JobSleeping_t,CDefUtlPriorityQueueLessFunc<GCSDK::CJobMgr::JobSleeping_t>,CUtlMemory<GCSDK::CJobMgr::JobSleeping_t,int>>
                    *)(this + 0x50));
    if (iVar3 != -1) {
      this_00 = *(CJob **)(iVar3 * 0x1c + *(int *)(this + 4) + 0x18);
      if (*(int *)(this_00 + 0x24) == 3) {
        CJob::Continue(this_00);
      }
      uVar2 = rdtsc();
      uVar4 = (uint)((ulonglong)uVar2 >> 0x20);
      if ((*(uint *)(param_1 + 4) <= uVar4) &&
         ((*(uint *)(param_1 + 4) < uVar4 || (*(uint *)param_1 <= (uint)uVar2)))) goto LAB_000607e5;
    }
  }
  lVar5 = CJobTime::CServerMicroSecsPassed((CJobTime *)(puVar1 + 4));
  if (9999999 < lVar5) {
    local_28 = *puVar1;
    local_24 = puVar1[1];
    iVar3 = 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);
    if (iVar3 != -1) {
      CJob::Heartbeat(*(CJob **)(iVar3 * 0x1c + *(int *)(this + 4) + 0x18));
    }
  }
LAB_000607e5:
  return CONCAT31((int3)((uint)*(int *)(this + 0x5c) >> 8),0 < *(int *)(this + 0x5c));
}

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)