L L4D2node

GCSDK::CGCClient::BMainLoop

0x0005e9e0 · 141 bytes · __cdecl

_ZN5GCSDK9CGCClient9BMainLoopEy

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* GCSDK::CGCClient::BMainLoop(unsigned long long) */

uint GCSDK::CGCClient::BMainLoop(ulonglong param_1)

{
  longlong lVar1;
  longlong lVar2;
  uint uVar3;
  uint uVar4;
  int in_stack_0000000c;
  longlong local_24 [2];
  
  uVar3 = 0;
  if (*(int *)((int)param_1 + 0x18) != 0) {
    lVar2 = rdtsc();
    lVar1 = (ulonglong)_g_dwClockSpeed * (param_1 >> 0x20);
    local_24[0] = __udivdi3((int)lVar1,
                            (int)((ulonglong)lVar1 >> 0x20) + in_stack_0000000c * _g_dwClockSpeed,
                            1000000,0);
    local_24[0] = local_24[0] + lVar2;
    CJobTime::UpdateJobTime(50000);
    uVar4 = CJobMgr::BFrameFuncRunSleepingJobs
                      ((CJobMgr *)((int)param_1 + 0x28),(CLimitTimer *)local_24);
    uVar3 = CJobMgr::BFrameFuncRunYieldingJobs
                      ((CJobMgr *)((int)param_1 + 0x28),(CLimitTimer *)local_24);
    uVar3 = uVar3 | uVar4;
  }
  return uVar3;
}

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)