L L4D2node

CDmxSerializer::UnserializeElementIndex

0x00be9040 · 289 bytes · __thiscall

_ZN14CDmxSerializer23UnserializeElementIndexER10CUtlBufferR10CUtlVectorIP11CDmxElement10CUtlMemoryIS4_iEE

Decompiled

undefined (3 params)

/* CDmxSerializer::UnserializeElementIndex(CUtlBuffer&, CUtlVector<CDmxElement*,
   CUtlMemory<CDmxElement*, int> >&) */

undefined4 __thiscall
CDmxSerializer::UnserializeElementIndex
          (CDmxSerializer *this,CUtlBuffer *param_1,CUtlVector *param_2)

{
  char cVar1;
  undefined4 uVar2;
  int iVar3;
  int *piVar4;
  int iVar5;
  int in_GS_OFFSET;
  int local_40;
  undefined4 local_3c;
  char local_38 [40];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (((byte)param_1[0x15] & 1) == 0) {
    cVar1 = CUtlBuffer::CheckGet(param_1,4);
    if (cVar1 != '\0') {
      if (((byte)param_1[0x34] & 1) == 0) {
        iVar3 = *(int *)(param_1 + 0xc);
        iVar5 = *(int *)(*(int *)param_1 + (iVar3 - *(int *)(param_1 + 0x20)));
      }
      else {
        piVar4 = (int *)((*(int *)(param_1 + 0xc) - *(int *)(param_1 + 0x20)) + *(int *)param_1);
        if (piVar4 == (int *)0x0) {
          piVar4 = &local_40;
        }
        local_3c = local_40;
        local_3c = CONCAT31((int3)((uint)local_40 >> 8),*(undefined1 *)((int)piVar4 + 3));
        local_3c._2_2_ = (undefined2)((uint)local_40 >> 0x10);
        local_3c._0_2_ = CONCAT11(*(undefined1 *)((int)piVar4 + 2),*(undefined1 *)((int)piVar4 + 3))
        ;
        local_3c._3_1_ = (undefined1)((uint)local_40 >> 0x18);
        local_3c._0_3_ = CONCAT12(*(undefined1 *)((int)piVar4 + 1),(undefined2)local_3c);
        local_3c = CONCAT13((char)*piVar4,(undefined3)local_3c);
        _V_memcpy(&local_40,&local_3c,4);
        iVar3 = *(int *)(param_1 + 0xc);
        iVar5 = local_40;
      }
      *(int *)(param_1 + 0xc) = iVar3 + 4;
      goto LAB_00be9080;
    }
    iVar5 = 0;
  }
  else {
    local_40 = 0;
    CUtlBuffer::Scanf(param_1,"%d",&local_40);
    iVar5 = local_40;
LAB_00be9080:
    if (iVar5 == -2) {
      Warning("Reading externally referenced elements is not supported!\n");
      CUtlBuffer::GetString(param_1,local_38,0x28);
      uVar2 = 0;
      goto LAB_00be9097;
    }
    uVar2 = 0;
    if (iVar5 < 0) goto LAB_00be9097;
    iVar5 = iVar5 << 2;
  }
  uVar2 = *(undefined4 *)(*(int *)param_2 + iVar5);
LAB_00be9097:
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)