L L4D2node

CBaseServer::UncompressPackedEntity

0x00108f20 · 393 bytes · __thiscall

_ZN11CBaseServer22UncompressPackedEntityEP12PackedEntityRi

Decompiled

undefined (3 params)

/* CBaseServer::UncompressPackedEntity(PackedEntity*, int&) */

void * __thiscall
CBaseServer::UncompressPackedEntity(CBaseServer *this,PackedEntity *param_1,int *param_2)

{
  int iVar1;
  undefined8 uVar2;
  void *local_84;
  bf_write local_7c [12];
  int local_70;
  char *local_64;
  undefined1 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  char *local_40;
  undefined1 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  
  uVar2 = CFrameSnapshotManager::GetCachedUncompressedEntity
                    ((CFrameSnapshotManager *)framesnapshotmanager,param_1);
  iVar1 = (int)uVar2;
  if (0 < *(int *)(iVar1 + 8)) {
    *param_2 = *(int *)(iVar1 + 8);
    return (void *)(iVar1 + 0xc);
  }
  GetClassBaseline((ServerClass *)this,(void **)((ulonglong)uVar2 >> 0x20),(int *)this);
  local_60 = 0;
  local_5c = 0xffffffff;
  local_58 = 0;
  local_64 = "UncompressPackedEntity1";
  CBitRead::StartReading((CBitRead *)&local_64,local_84,0,0,-1);
  local_3c = 0;
  local_38 = 0xffffffff;
  local_34 = 0;
  local_40 = "UncompressPackedEntity2";
  CBitRead::StartReading
            ((CBitRead *)&local_40,*(void **)(param_1 + 0x24),
             (int)((*(uint *)(param_1 + 0x28) & 0x7fffffff) + 7) >> 3,0,-1);
  bf_write::bf_write(local_7c,"UncompressPackedEntity3",(void *)(iVar1 + 0xc),0x4000,-1);
  RecvTable_MergeDeltas
            (*(RecvTable **)(*(int *)(param_1 + 4) + 0xc),(bf_read *)&local_64,(bf_read *)&local_40,
             local_7c,-1,(int *)0x0,false);
  *(int *)(iVar1 + 8) = local_70;
  *param_2 = local_70;
  return (void *)(iVar1 + 0xc);
}

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)