L L4D2node

Unserialize

0x00bf1ef0 · 151 bytes · __cdecl

_Z11UnserializeR10CUtlBufferRb

Decompiled

undefined (2 params)

/* Unserialize(CUtlBuffer&, bool&) */

uint Unserialize(CUtlBuffer *param_1,bool *param_2)

{
  char cVar1;
  char extraout_AL;
  undefined3 extraout_var;
  uint uVar2;
  int iVar3;
  undefined3 uVar4;
  bool bVar5;
  int local_10 [2];
  
  if (((byte)param_1[0x15] & 1) == 0) {
    CUtlBuffer::CheckGet(param_1,1);
    bVar5 = false;
    uVar4 = extraout_var;
    if (extraout_AL != '\0') {
      iVar3 = *(int *)(param_1 + 0xc) + 1;
      cVar1 = *(char *)(*(int *)param_1 + (*(int *)(param_1 + 0xc) - *(int *)(param_1 + 0x20)));
      *(int *)(param_1 + 0xc) = iVar3;
      bVar5 = cVar1 != '\0';
      uVar4 = (undefined3)((uint)iVar3 >> 8);
    }
    *param_2 = bVar5;
    return CONCAT31(uVar4,param_1[0x14] == (CUtlBuffer)0x0);
  }
  local_10[0] = 0;
  iVar3 = CUtlBuffer::Scanf(param_1,"%d",local_10);
  *param_2 = local_10[0] != 0;
  if (iVar3 == 1) {
    uVar2 = (uint)(param_1[0x14] == (CUtlBuffer)0x0);
  }
  else {
    uVar2 = 0;
  }
  return uVar2;
}

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)