L L4D2node

CGCClientJobDataRequest::BYieldingRunGCJob

0x0005e0a0 · 861 bytes · __thiscall

_ZN23CGCClientJobDataRequest17BYieldingRunGCJobEv

Decompiled

undefined (1 param)

/* CGCClientJobDataRequest::BYieldingRunGCJob() */

undefined4 __thiscall CGCClientJobDataRequest::BYieldingRunGCJob(CGCClientJobDataRequest *this)

{
  undefined4 uVar1;
  char cVar2;
  byte bVar3;
  undefined4 *__s;
  KeyValues *pKVar4;
  void *pvVar5;
  int iVar6;
  CUtlBuffer *this_00;
  uint uVar7;
  CUtlBuffer *pCVar8;
  undefined **local_cc;
  undefined4 *local_c8;
  int local_c4;
  size_t local_c0;
  int local_bc;
  undefined4 local_b8;
  char local_b4;
  undefined4 local_b0;
  undefined **local_ac;
  int *local_a8;
  char *local_a4;
  uint local_a0;
  int local_9c;
  int local_98;
  char local_94;
  void *local_90;
  CUtlBuffer local_8c [16];
  int local_7c;
  CNetPacket *local_54 [17];
  
  this_00 = local_8c;
  local_cc = &PTR__CMsgBase_t_000b51f8;
  local_bc = 0x1e;
  local_b8 = 1;
  local_c0 = 0x1f;
  __s = (undefined4 *)
        CThreadSafeMultiMemoryPool::Alloc((CThreadSafeMultiMemoryPool *)GCSDK::g_MemPoolMsg,0x5f);
  local_c4 = (int)__s + local_bc;
  local_c8 = __s;
  memset(__s,0,local_c0);
  local_b4 = '\x01';
  local_b0 = 0;
  local_cc = &PTR__CGCMsg_000b5270;
  *__s = 0x3e9;
  local_a8 = (int *)0x0;
  local_a4 = (char *)0x1e;
  local_ac = &PTR__CGCMsg_000b52b0;
  *(undefined2 *)(local_c8 + 3) = 1;
  *(undefined4 *)((int)local_c8 + 0xe) = 0xffffffff;
  *(undefined4 *)((int)local_c8 + 0x12) = 0xffffffff;
  *(undefined4 *)((int)local_c8 + 0x16) = 0xffffffff;
  *(undefined4 *)((int)local_c8 + 0x1a) = 0xffffffff;
  uVar7 = 0;
  local_9c = 0x1e;
  local_98 = 1;
  local_a0 = 0;
  local_94 = '\0';
  local_90 = (void *)0x1f;
                    /* try { // try from 0005e1d3 to 0005e1d7 has its CatchHandler @ 0005e476 */
  CUtlBuffer::CUtlBuffer(this_00,0,0,0);
                    /* try { // try from 0005e1df to 0005e1e3 has its CatchHandler @ 0005e472 */
  pKVar4 = KeyValues::operator_new((KeyValues *)0x2c,uVar7);
  uVar7 = 0;
                    /* try { // try from 0005e201 to 0005e205 has its CatchHandler @ 0005e465 */
  KeyValues::KeyValues(pKVar4,"datarequest",(IKeyValuesSystem *)0x0,false);
  *(KeyValues **)(this + 0x74) = pKVar4;
  pCVar8 = this_00;
                    /* try { // try from 0005e210 to 0005e38d has its CatchHandler @ 0005e472 */
  KeyValues::WriteAsBinary(pKVar4,this_00);
  if (local_7c != 0) {
    GCSDK::CMsgBase_t<GCSDK::GCMsgHdrEx_t>::AddVariableLenData
              ((CMsgBase_t<GCSDK::GCMsgHdrEx_t> *)pKVar4,pCVar8,uVar7);
  }
  local_54[0] = (CNetPacket *)0x0;
  uVar1 = *(undefined4 *)(this + 0xc);
  *(undefined4 *)((int)local_c8 + 0x16) = *(undefined4 *)(this + 8);
  *(undefined4 *)((int)local_c8 + 0x1a) = uVar1;
  cVar2 = GCSDK::CGCClient::BSendMessage(*(CGCClient **)(this + 0x6c),(CMsgBase_t *)&local_cc);
  if (cVar2 != '\0') {
    *(undefined4 *)(this + 0x70) = 4;
    cVar2 = GCSDK::CJob::BYieldingWaitForMsg((CJob *)this,local_54);
    if (cVar2 != '\0') {
      local_a8 = *(int **)local_54[0];
      local_a4 = (char *)((int)local_a8 + local_9c);
      local_a0 = *(uint *)(local_54[0] + 4);
      local_94 = '\0';
      pvVar5 = (void *)(local_98 + local_9c + (int)local_a8);
      local_90 = pvVar5;
      if ((*local_a8 == 0x3ea) && (*local_a4 != '\0')) {
        iVar6 = 0;
        this[0x7d] = (CGCClientJobDataRequest)0x1;
        if ((uint)(local_98 + local_9c) <= local_a0) {
          iVar6 = (local_a0 - local_9c) - local_98;
        }
        CUtlBuffer::CUtlBuffer((CUtlBuffer *)local_54,pvVar5,iVar6,8);
                    /* try { // try from 0005e395 to 0005e399 has its CatchHandler @ 0005e400 */
        pKVar4 = KeyValues::operator_new((KeyValues *)0x2c,(uint)pvVar5);
                    /* try { // try from 0005e3b7 to 0005e3bb has its CatchHandler @ 0005e459 */
        KeyValues::KeyValues(pKVar4,"results",(IKeyValuesSystem *)0x0,false);
        *(KeyValues **)(this + 0x78) = pKVar4;
                    /* try { // try from 0005e3c9 to 0005e3cd has its CatchHandler @ 0005e400 */
        bVar3 = KeyValues::ReadAsBinary(pKVar4,(CUtlBuffer *)local_54);
        this[0x7d] = (CGCClientJobDataRequest)((byte)this[0x7d] & bVar3);
        CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_54);
        goto LAB_0005e269;
      }
    }
  }
  this[0x7d] = (CGCClientJobDataRequest)0x0;
LAB_0005e269:
  this[0x7c] = (CGCClientJobDataRequest)0x1;
  if (this[0x7e] != (CGCClientJobDataRequest)0x0) {
    iVar6 = 6;
    do {
      iVar6 = iVar6 + -1;
      if (iVar6 == 0) break;
      GCSDK::CJob::BYieldingWaitOneFrame((CJob *)this);
    } while (this[0x7e] != (CGCClientJobDataRequest)0x0);
  }
  CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)this_00);
  local_ac = &PTR__CMsgBase_t_000b51f8;
  if (local_94 != '\0') {
    GCSDK::CMsgBase_t<GCSDK::GCMsgHdrEx_t>::~CMsgBase_t((CMsgBase_t<GCSDK::GCMsgHdrEx_t> *)this_00);
  }
  local_cc = &PTR__CMsgBase_t_000b51f8;
  if (local_b4 != '\0') {
    GCSDK::CMsgBase_t<GCSDK::GCMsgHdrEx_t>::~CMsgBase_t((CMsgBase_t<GCSDK::GCMsgHdrEx_t> *)this_00);
  }
  return 1;
}

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)