L L4D2node

CDeltaBitsReader::CDeltaBitsReader

0x00141560 · 145 bytes · __thiscall

_ZN16CDeltaBitsReaderC2EP7bf_read

Decompiled

undefined (2 params)

/* CDeltaBitsReader::CDeltaBitsReader(bf_read*) */

void __thiscall CDeltaBitsReader::CDeltaBitsReader(CDeltaBitsReader *this,bf_read *param_1)

{
  int iVar1;
  uint uVar2;
  undefined4 *puVar3;
  
  *(bf_read **)this = param_1;
  this[4] = (CDeltaBitsReader)0x0;
  *(undefined4 *)(this + 8) = 0xffffffff;
  if ((param_1 != (bf_read *)0x0) && (*(int *)(param_1 + 0x20) != 0)) {
    iVar1 = *(int *)(param_1 + 0x14);
    uVar2 = *(uint *)(param_1 + 0x10);
    *(int *)(param_1 + 0x14) = iVar1 + -1;
    if (iVar1 + -1 == 0) {
      puVar3 = *(undefined4 **)(param_1 + 0x18);
      *(undefined4 *)(param_1 + 0x14) = 0x20;
      if (puVar3 == *(undefined4 **)(param_1 + 0x1c)) {
        *(undefined4 *)(param_1 + 0x14) = 1;
        *(undefined4 *)(param_1 + 0x10) = 0;
        *(undefined4 **)(param_1 + 0x18) = puVar3 + 1;
      }
      else if (*(undefined4 **)(param_1 + 0x1c) < puVar3) {
        param_1[4] = (bf_read)0x1;
        *(undefined4 *)(param_1 + 0x10) = 0;
      }
      else {
        *(undefined4 **)(param_1 + 0x18) = puVar3 + 1;
        *(undefined4 *)(param_1 + 0x10) = *puVar3;
      }
    }
    else {
      *(uint *)(param_1 + 0x10) = uVar2 >> 1;
    }
    this[0xc] = (CDeltaBitsReader)((byte)uVar2 & 1);
    this[0xc] = (CDeltaBitsReader)((byte)this[0xc] & 1);
    return;
  }
  this[0xc] = (CDeltaBitsReader)0x0;
  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)