L L4D2node

SVC_FixAngle::ReadFromBuffer

0x000b1550 · 620 bytes · __thiscall

_ZN12SVC_FixAngle14ReadFromBufferER7bf_read

Decompiled

undefined (2 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* SVC_FixAngle::ReadFromBuffer(bf_read&) */

byte __thiscall SVC_FixAngle::ReadFromBuffer(SVC_FixAngle *this,bf_read *param_1)

{
  bf_read *pbVar1;
  bf_read bVar2;
  uint uVar3;
  undefined4 *puVar4;
  int iVar5;
  char cVar6;
  int iVar7;
  longdouble lVar8;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  local_34 = 0;
  local_30 = 0;
  if (_exit == 0) {
    local_20 = 0;
  }
  else {
    (**(code **)(_exit + 0x50))
              (_exit,&local_34,0,0,0,0,"/data/src/engine/../common/netmessages.cpp",0x37d,
               &ReadFromBuffer(bf_read&)::tm_fmt,"(%s)%s","Unaccounted",
               "SVC_FixAngle::ReadFromBuffer");
    local_20 = _exit;
  }
  iVar5 = _DAT_0040b9d4;
  local_28 = local_34;
  local_24 = local_30;
  if ((_DAT_0040b028 != 0) || (DAT_0040b02c == '\0')) {
                    /* try { // try from 000b1605 to 000b1609 has its CatchHandler @ 000b17fa */
    iVar7 = ThreadGetCurrentId();
    if (iVar5 == iVar7) {
      if ((char *)*_DAT_0040b030 != "SVC_FixAngle::ReadFromBuffer") {
                    /* try { // try from 000b17a0 to 000b17b1 has its CatchHandler @ 000b17fa */
        _DAT_0040b030 =
             (int *)CVProfNode::GetSubNode((char *)_DAT_0040b030,0x2a0659,&DAT_00000001,0x2a054b);
      }
      CVProfNode::EnterScope();
      DAT_0040b02c = '\0';
    }
  }
  uVar3 = *(uint *)(param_1 + 0x10);
  pbVar1 = param_1 + 0x14;
  *(int *)pbVar1 = *(int *)pbVar1 + -1;
  if (*(int *)pbVar1 == 0) {
    puVar4 = *(undefined4 **)(param_1 + 0x18);
    *(undefined4 *)(param_1 + 0x14) = 0x20;
    if (puVar4 == *(undefined4 **)(param_1 + 0x1c)) {
      *(undefined4 *)(param_1 + 0x14) = 1;
      *(undefined4 *)(param_1 + 0x10) = 0;
      *(undefined4 **)(param_1 + 0x18) = puVar4 + 1;
    }
    else if (*(undefined4 **)(param_1 + 0x1c) < puVar4) {
      param_1[4] = (bf_read)0x1;
      *(undefined4 *)(param_1 + 0x10) = 0;
    }
    else {
      *(undefined4 **)(param_1 + 0x18) = puVar4 + 1;
      *(undefined4 *)(param_1 + 0x10) = *puVar4;
    }
  }
  else {
    *(uint *)(param_1 + 0x10) = uVar3 >> 1;
  }
  this[0x4c] = (SVC_FixAngle)((byte)uVar3 & 1);
  this[0x4c] = (SVC_FixAngle)((byte)this[0x4c] & 1);
                    /* try { // try from 000b1667 to 000b16a5 has its CatchHandler @ 000b17d9 */
  lVar8 = (longdouble)CBitRead::ReadBitAngle((CBitRead *)param_1,0x10);
  *(float *)(this + 0x50) = (float)lVar8;
  lVar8 = (longdouble)CBitRead::ReadBitAngle((CBitRead *)param_1,0x10);
  *(float *)(this + 0x54) = (float)lVar8;
  lVar8 = (longdouble)CBitRead::ReadBitAngle((CBitRead *)param_1,0x10);
  *(float *)(this + 0x58) = (float)lVar8;
  iVar5 = _DAT_0040b9d4;
  bVar2 = param_1[4];
  if ((DAT_0040b02c == '\0') || (_DAT_0040b028 != 0)) {
    iVar7 = ThreadGetCurrentId();
    if (iVar5 == iVar7) {
      cVar6 = CVProfNode::ExitScope();
      if (cVar6 != '\0') {
        _DAT_0040b030 = (int *)_DAT_0040b030[0x19];
      }
      DAT_0040b02c = _DAT_0040b030 == (int *)0x40b034;
    }
  }
  if (local_20 != 0) {
    (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,0);
  }
  return (byte)bVar2 ^ 1;
}

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)