L L4D2node

CBitRead::ReadBitVec3Coord

0x00259720 · 467 bytes · __thiscall

_ZN8CBitRead16ReadBitVec3CoordER6Vector

Decompiled

undefined (2 params)

/* CBitRead::ReadBitVec3Coord(Vector&) */

void __thiscall CBitRead::ReadBitVec3Coord(CBitRead *this,Vector *param_1)

{
  int iVar1;
  uint uVar2;
  uint *puVar3;
  int iVar4;
  uint *puVar5;
  uint uVar6;
  uint uVar7;
  uint uVar8;
  longdouble lVar9;
  
  *(undefined4 *)param_1 = 0;
  *(undefined4 *)(param_1 + 4) = 0;
  *(undefined4 *)(param_1 + 8) = 0;
  uVar2 = *(uint *)(this + 0x10);
  iVar4 = *(int *)(this + 0x14);
  iVar1 = iVar4 + -1;
  *(int *)(this + 0x14) = iVar1;
  if (iVar1 == 0) {
    puVar3 = *(uint **)(this + 0x18);
    *(undefined4 *)(this + 0x14) = 0x20;
    puVar5 = *(uint **)(this + 0x1c);
    if (puVar3 == puVar5) {
      *(undefined4 *)(this + 0x10) = 0;
      *(uint **)(this + 0x18) = puVar5 + 1;
      uVar8 = 0;
      goto LAB_00259833;
    }
    if (puVar5 < puVar3) {
      this[4] = (CBitRead)0x1;
      uVar6 = 0;
      uVar8 = 0;
    }
    else {
      *(uint **)(this + 0x18) = puVar3 + 1;
      uVar6 = *puVar3;
      uVar8 = uVar6 & 1;
    }
    iVar4 = 0x1f;
LAB_00259785:
    uVar6 = uVar6 >> 1;
    *(uint *)(this + 0x10) = uVar6;
    uVar7 = uVar6 & 1;
    *(int *)(this + 0x14) = iVar4 + -1;
    if (iVar4 + -1 != 0) goto LAB_00259856;
    puVar5 = *(uint **)(this + 0x1c);
  }
  else {
    uVar6 = uVar2 >> 1;
    iVar4 = iVar4 + -2;
    *(uint *)(this + 0x10) = uVar6;
    uVar8 = uVar6 & 1;
    *(int *)(this + 0x14) = iVar4;
    if (iVar4 != 0) goto LAB_00259785;
    puVar5 = *(uint **)(this + 0x1c);
LAB_00259833:
    puVar3 = *(uint **)(this + 0x18);
    *(undefined4 *)(this + 0x14) = 0x20;
    if (puVar3 != puVar5) {
      if (puVar5 < puVar3) {
        this[4] = (CBitRead)0x1;
        uVar7 = 0;
        uVar6 = 0;
      }
      else {
        *(uint **)(this + 0x18) = puVar3 + 1;
        uVar6 = *puVar3;
        uVar7 = uVar6 & 1;
      }
      *(undefined4 *)(this + 0x14) = 0x1f;
LAB_00259856:
      *(uint *)(this + 0x10) = uVar6 >> 1;
      goto joined_r0x00259860;
    }
    *(undefined4 *)(this + 0x10) = 0;
    *(uint **)(this + 0x18) = puVar5 + 1;
    uVar7 = 0;
  }
  puVar3 = *(uint **)(this + 0x18);
  *(undefined4 *)(this + 0x14) = 0x20;
  if (puVar3 == puVar5) {
    *(undefined4 *)(this + 0x14) = 1;
    *(undefined4 *)(this + 0x10) = 0;
    *(uint **)(this + 0x18) = puVar5 + 1;
  }
  else if (puVar5 < puVar3) {
    this[4] = (CBitRead)0x1;
    *(undefined4 *)(this + 0x10) = 0;
  }
  else {
    *(uint **)(this + 0x18) = puVar3 + 1;
    *(uint *)(this + 0x10) = *puVar3;
  }
joined_r0x00259860:
  if ((uVar2 & 1) != 0) {
    lVar9 = (longdouble)ReadBitCoord(this);
    *(float *)param_1 = (float)lVar9;
  }
  if (uVar8 != 0) {
    lVar9 = (longdouble)ReadBitCoord(this);
    *(float *)(param_1 + 4) = (float)lVar9;
  }
  if (uVar7 == 0) {
    return;
  }
  lVar9 = (longdouble)ReadBitCoord(this);
  *(float *)(param_1 + 8) = (float)lVar9;
  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)