L L4D2node

Array_Decode

0x00149250 · 612 bytes · __cdecl

_Z12Array_DecodeP10DecodeInfo

Decompiled

undefined (1 param)

/* Array_Decode(DecodeInfo*) */

void Array_Decode(DecodeInfo *param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  uint *puVar4;
  undefined4 *puVar5;
  uint uVar6;
  int iVar7;
  uint uVar8;
  int in_GS_OFFSET;
  int local_254;
  code *local_250;
  int local_24c [4];
  undefined4 local_23c;
  int local_238;
  undefined4 local_234;
  undefined4 local_230;
  int local_22c;
  int local_228;
  undefined4 local_224;
  int local_20;
  
  local_23c = 1;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_224 = *(undefined4 *)(param_1 + 0x28);
  local_230 = *(undefined4 *)(param_1 + 0x1c);
  local_22c = *(int *)(param_1 + 0x20);
  iVar1 = *(int *)(*(SendProp **)(param_1 + 0x24) + 0x18);
  local_234 = *(undefined4 *)(param_1 + 0x18);
  iVar2 = *(int *)param_1;
  local_238 = *(int *)(param_1 + 0x14);
  if (iVar2 == 0) {
    local_250 = (code *)0x0;
    local_254 = 0;
    local_24c[0] = 0;
  }
  else {
    local_24c[0] = *(int *)(iVar2 + 0x18);
    local_22c = local_22c + *(int *)(local_24c[0] + 0x2c);
    local_254 = *(int *)(iVar2 + 0x30);
    local_250 = *(code **)(iVar2 + 0x1c);
  }
  local_228 = iVar1;
  iVar7 = SendProp::GetNumArrayLengthBits(*(SendProp **)(param_1 + 0x24));
  iVar2 = *(int *)(param_1 + 0x28);
  iVar3 = *(int *)(iVar2 + 0x14);
  if (iVar3 < iVar7) {
    puVar4 = *(uint **)(iVar2 + 0x18);
    uVar8 = *(uint *)(iVar2 + 0x10);
    if (puVar4 == *(uint **)(iVar2 + 0x1c)) {
      *(undefined4 *)(iVar2 + 0x14) = 1;
      uVar8 = 0;
      *(undefined4 *)(iVar2 + 0x10) = 0;
      *(uint **)(iVar2 + 0x18) = puVar4 + 1;
      *(undefined1 *)(iVar2 + 4) = 1;
    }
    else {
      if (*(uint **)(iVar2 + 0x1c) < puVar4) {
        *(undefined1 *)(iVar2 + 4) = 1;
        *(undefined4 *)(iVar2 + 0x10) = 0;
      }
      else {
        *(uint **)(iVar2 + 0x18) = puVar4 + 1;
        uVar6 = *puVar4;
        *(uint *)(iVar2 + 0x10) = uVar6;
        if (*(char *)(iVar2 + 4) == '\0') {
          iVar7 = iVar7 - iVar3;
          uVar8 = ((&CBitBuffer::s_nMaskTable)[iVar7] & uVar6) << ((byte)iVar3 & 0x1f) | uVar8;
          *(int *)(iVar2 + 0x14) = 0x20 - iVar7;
          *(uint *)(iVar2 + 0x10) = uVar6 >> ((byte)iVar7 & 0x1f);
          goto LAB_0014931f;
        }
      }
      uVar8 = 0;
    }
  }
  else {
    uVar8 = (&CBitBuffer::s_nMaskTable)[iVar7];
    *(int *)(iVar2 + 0x14) = iVar3 - iVar7;
    uVar8 = uVar8 & *(uint *)(iVar2 + 0x10);
    if (iVar3 - iVar7 == 0) {
      puVar5 = *(undefined4 **)(iVar2 + 0x18);
      *(undefined4 *)(iVar2 + 0x14) = 0x20;
      if (puVar5 == *(undefined4 **)(iVar2 + 0x1c)) {
        *(undefined4 *)(iVar2 + 0x14) = 1;
        *(undefined4 *)(iVar2 + 0x10) = 0;
        *(undefined4 **)(iVar2 + 0x18) = puVar5 + 1;
      }
      else if (*(undefined4 **)(iVar2 + 0x1c) < puVar5) {
        *(undefined1 *)(iVar2 + 4) = 1;
        *(undefined4 *)(iVar2 + 0x10) = 0;
      }
      else {
        *(undefined4 **)(iVar2 + 0x18) = puVar5 + 1;
        *(undefined4 *)(iVar2 + 0x10) = *puVar5;
      }
    }
    else {
      *(uint *)(iVar2 + 0x10) = *(uint *)(iVar2 + 0x10) >> ((byte)iVar7 & 0x1f);
    }
  }
LAB_0014931f:
  if (local_250 != (code *)0x0) {
    (*local_250)(*(undefined4 *)(param_1 + 0x1c),*(undefined4 *)(param_1 + 0x18),uVar8);
  }
  if ((-1 < (int)uVar8) &&
     (((*(int *)param_1 == 0 || ((int)uVar8 <= *(int *)(*(int *)param_1 + 0x34))) &&
      (local_238 = 0, uVar8 != 0)))) {
    do {
      (**(code **)(g_PropTypeFns + *(int *)(iVar1 + 8) * 0x24 + 4))(local_24c);
      local_22c = local_22c + local_254;
      local_238 = local_238 + 1;
    } while (local_238 < (int)uVar8);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* 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)