L L4D2node

old_bf_read::ReadLongLong

0x00b67810 · 234 bytes · __thiscall

_ZN11old_bf_read12ReadLongLongEv

Decompiled

undefined (1 param)

/* old_bf_read::ReadLongLong() */

undefined8 __thiscall old_bf_read::ReadLongLong(old_bf_read *this)

{
  uint uVar1;
  uint uVar2;
  sbyte sVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  
  uVar2 = *(uint *)(this + 0xc);
  uVar1 = *(uint *)(this + 8);
  uVar6 = uVar2 + 0x20;
  if ((int)uVar1 < (int)uVar6) {
    *(uint *)(this + 0xc) = uVar1;
    uVar5 = 0;
    this[0x10] = (old_bf_read)0x1;
    uVar6 = uVar1;
  }
  else {
    iVar4 = (int)uVar2 >> 5;
    uVar5 = *(uint *)(*(int *)this + iVar4 * 4);
    *(uint *)(this + 0xc) = uVar6;
    sVar3 = (sbyte)(uVar2 & 0x1f);
    uVar5 = uVar5 >> sVar3;
    if (iVar4 != (int)(uVar2 + 0x1f) >> 5) {
      uVar5 = uVar5 | (*(uint *)(*(int *)this + 4 + iVar4 * 4) & (&g_ExtraMasks)[uVar2 & 0x1f]) <<
                      (0x20U - sVar3 & 0x1f);
    }
  }
  if ((int)uVar1 < (int)(uVar6 + 0x20)) {
    this[0x10] = (old_bf_read)0x1;
    *(uint *)(this + 0xc) = uVar1;
    uVar2 = 0;
  }
  else {
    iVar4 = (int)uVar6 >> 5;
    uVar2 = *(uint *)(*(int *)this + iVar4 * 4);
    *(uint *)(this + 0xc) = uVar6 + 0x20;
    sVar3 = (sbyte)(uVar6 & 0x1f);
    uVar2 = uVar2 >> sVar3;
    if (iVar4 != (int)(uVar6 + 0x1f) >> 5) {
      uVar2 = uVar2 | (*(uint *)(*(int *)this + 4 + iVar4 * 4) & (&g_ExtraMasks)[uVar6 & 0x1f]) <<
                      (0x20U - sVar3 & 0x1f);
    }
  }
  return CONCAT44(uVar2,uVar5);
}

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)