L L4D2node

CDmxElement::UnpackBitfield<unsigned_char>

0x00be6c70 · 136 bytes · __regparm3

_ZNK11CDmxElement14UnpackBitfieldIhEEvPT_PK27DmxElementUnpackStructure_tPK13CDmxAttribute.isra.13

Decompiled

void (3 params)

/* void CDmxElement::UnpackBitfield<unsigned char>(unsigned char*, DmxElementUnpackStructure_t
   const*, CDmxAttribute const*) const [clone .isra.13] */

void __regparm3
CDmxElement::UnpackBitfield<unsigned_char>
          (uchar *param_1,DmxElementUnpackStructure_t *param_2,CDmxAttribute *param_3)

{
  byte bVar1;
  uint uVar2;
  uint uVar3;
  byte local_1d;
  
  if (*(int *)(param_2 + 0x10) == 8) {
    uVar3 = 0;
    local_1d = 0;
    uVar2 = 0xffffffff;
  }
  else {
    uVar2 = (1 << ((byte)*(int *)(param_2 + 0x10) & 0x1f)) - 1;
    uVar3 = ~(uVar2 & 0xff);
    local_1d = ~(byte)((uVar2 & 0xff) << ((byte)*(undefined4 *)(param_2 + 0x14) & 0x1f));
  }
  if ((uVar3 & (byte)*param_3) == 0) {
    uVar2 = uVar2 & (byte)*param_3;
  }
  else {
    Warning("Value %s exeeds size of datatype. \n",*(undefined4 *)param_2);
    uVar2 = 0;
  }
  bVar1 = *param_1;
  *param_1 = local_1d & bVar1;
  *param_1 = local_1d & bVar1 | (byte)(uVar2 << ((byte)*(undefined4 *)(param_2 + 0x14) & 0x1f));
  return;
}

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)