L L4D2node

Serialize

0x00bf2160 · 195 bytes · __regparm2

_Z9SerializeR10CUtlBufferRKf

Decompiled

undefined (2 params)

/* Serialize(CUtlBuffer&, float const&) */

bool __regparm2 Serialize(CUtlBuffer *param_1,float *param_2)

{
  undefined4 uVar1;
  char cVar2;
  int iVar3;
  void *pvVar4;
  CUtlBuffer *in_stack_00000004;
  undefined4 *in_stack_00000008;
  undefined1 local_14;
  undefined1 uStack_13;
  undefined1 uStack_12;
  undefined1 uStack_11;
  undefined1 local_10;
  undefined1 local_f;
  undefined1 local_e;
  undefined1 local_d;
  
  uVar1 = *in_stack_00000008;
  if (((byte)in_stack_00000004[0x15] & 1) == 0) {
    cVar2 = CUtlBuffer::CheckPut(in_stack_00000004,4);
    if (cVar2 != '\0') {
      if (((byte)in_stack_00000004[0x34] & 1) == 0) {
        *(undefined4 *)
         (*(int *)in_stack_00000004 +
         (*(int *)(in_stack_00000004 + 0x10) - *(int *)(in_stack_00000004 + 0x20))) = uVar1;
        iVar3 = *(int *)(in_stack_00000004 + 0x10);
      }
      else {
        iVar3 = *(int *)(in_stack_00000004 + 0x10);
        pvVar4 = (void *)((iVar3 - *(int *)(in_stack_00000004 + 0x20)) + *(int *)in_stack_00000004);
        if (pvVar4 != (void *)0x0) {
          uStack_11 = (undefined1)((uint)uVar1 >> 0x18);
          local_10 = uStack_11;
          uStack_12 = (undefined1)((uint)uVar1 >> 0x10);
          local_f = uStack_12;
          uStack_13 = (undefined1)((uint)uVar1 >> 8);
          local_e = uStack_13;
          local_14 = (undefined1)uVar1;
          local_d = local_14;
          _V_memcpy(pvVar4,&local_10,4);
          iVar3 = *(int *)(in_stack_00000004 + 0x10);
        }
      }
      *(int *)(in_stack_00000004 + 0x10) = iVar3 + 4;
      CUtlBuffer::AddNullTermination(in_stack_00000004);
    }
    return in_stack_00000004[0x14] == (CUtlBuffer)0x0;
  }
  SerializeFloat(in_stack_00000004,(float)param_2);
  return in_stack_00000004[0x14] == (CUtlBuffer)0x0;
}

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)