L L4D2node

old_bf_read::ReadWord

0x00244610 · 120 bytes · __thiscall

_ZN11old_bf_read8ReadWordEv

Decompiled

undefined (1 param)

/* old_bf_read::ReadWord() */

uint __thiscall old_bf_read::ReadWord(old_bf_read *this)

{
  uint uVar1;
  int iVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  
  iVar2 = *(int *)(this + 0xc);
  uVar1 = iVar2 + 0x10;
  if ((int)uVar1 <= *(int *)(this + 8)) {
    iVar4 = iVar2 >> 5;
    uVar5 = *(uint *)(*(int *)this + iVar4 * 4);
    *(uint *)(this + 0xc) = uVar1;
    uVar5 = uVar5 >> ((byte)iVar2 & 0x1f);
    uVar3 = DAT_003f2d60 & uVar5;
    if (iVar4 != iVar2 + 0xf >> 5) {
      uVar3 = (*(uint *)(*(int *)this + 4 + iVar4 * 4) & (&g_ExtraMasks)[uVar1 & 0x1f]) <<
              (0x10U - (char)(uVar1 & 0x1f) & 0x1f) | uVar5;
    }
    return uVar3;
  }
  *(int *)(this + 0xc) = *(int *)(this + 8);
  this[0x10] = (old_bf_read)0x1;
  return 0;
}

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)