L L4D2node

CNetChan::UncompressFragments

0x001aefe0 · 586 bytes · __thiscall

_ZN8CNetChan19UncompressFragmentsEPNS_15dataFragments_sE

Decompiled

undefined (2 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CNetChan::UncompressFragments(CNetChan::dataFragments_s*) */

uint __thiscall CNetChan::UncompressFragments(CNetChan *this,dataFragments_s *param_1)

{
  int iVar1;
  char cVar2;
  int iVar3;
  char *pcVar4;
  uint uVar5;
  uint local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  uVar5 = (uint)(byte)param_1[0x118];
  if (param_1[0x118] != (dataFragments_s)0x0) {
    local_34 = 0;
    local_30 = 0;
    if (_exit == 0) {
      local_20 = 0;
    }
    else {
      (**(code **)(_exit + 0x50))
                (_exit,&local_34,0,0,0,0,"/data/src/engine/./net_chan.cpp",0x26f,
                 &UncompressFragments(CNetChan::dataFragments_s*)::tm_fmt,"(%s)%s","Unaccounted",
                 "UncompressFragments");
      local_20 = _exit;
    }
    iVar1 = _DAT_0040b9d4;
    local_28 = local_34;
    local_24 = local_30;
    if ((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) {
                    /* try { // try from 001af0a3 to 001af0a7 has its CatchHandler @ 001af260 */
      iVar3 = ThreadGetCurrentId();
      if (iVar1 == iVar3) {
        if ((char *)*_DAT_0040b030 != "UncompressFragments") {
                    /* try { // try from 001af1e8 to 001af1f9 has its CatchHandler @ 001af260 */
          _DAT_0040b030 =
               (int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2baf96,&DAT_00000001,0x2a054b);
        }
        CVProfNode::EnterScope();
        DAT_0040b02c = '\0';
      }
    }
                    /* try { // try from 001af0bf to 001af0f1 has its CatchHandler @ 001af23f */
    pcVar4 = operator_new__(*(int *)(param_1 + 0x11c) + 3U & 0xfffffffc);
    local_38 = *(uint *)(param_1 + 0x11c);
    uVar5 = NET_BufferToBufferDecompress
                      (pcVar4,&local_38,*(char **)(param_1 + 0x108),*(uint *)(param_1 + 0x10c));
    if (((char)uVar5 == '\0') || (local_38 == 0)) {
      uVar5 = 0;
      if (pcVar4 != (char *)0x0) {
        uVar5 = 0;
        operator_delete__(pcVar4);
      }
    }
    else {
      if (*(void **)(param_1 + 0x108) != (void *)0x0) {
        operator_delete__(*(void **)(param_1 + 0x108));
      }
      *(char **)(param_1 + 0x108) = pcVar4;
      *(uint *)(param_1 + 0x10c) = local_38;
      param_1[0x118] = (dataFragments_s)0x0;
    }
    iVar1 = _DAT_0040b9d4;
    if ((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) {
      iVar3 = ThreadGetCurrentId();
      if (iVar1 == iVar3) {
        cVar2 = CVProfNode::ExitScope();
        if (cVar2 != '\0') {
          _DAT_0040b030 = (int *)_DAT_0040b030[0x19];
        }
        DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
      }
    }
    if (local_20 != 0) {
      (**(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)