L L4D2node

CDemoFile::ReadSequenceInfo

0x001303d0 · 487 bytes · __thiscall

_ZN9CDemoFile16ReadSequenceInfoERiS0_

Decompiled

undefined (3 params)

/* CDemoFile::ReadSequenceInfo(int&, int&) */

void __thiscall CDemoFile::ReadSequenceInfo(CDemoFile *this,int *param_1,int *param_2)

{
  CUtlBuffer *this_00;
  CDemoFile CVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  int *piVar5;
  int local_14;
  undefined4 local_10;
  
  this_00 = (CUtlBuffer *)(this + 0x534);
  if (((byte)this[0x549] & 1) == 0) {
    cVar2 = CUtlBuffer::CheckGet(this_00,4);
    iVar4 = 0;
    if (cVar2 != '\0') {
      if (((byte)this[0x568] & 1) == 0) {
        iVar4 = *(int *)(this + 0x540);
        iVar3 = *(int *)(*(int *)(this + 0x534) + (iVar4 - *(int *)(this + 0x554)));
      }
      else {
        piVar5 = (int *)((*(int *)(this + 0x540) - *(int *)(this + 0x554)) + *(int *)(this + 0x534))
        ;
        if (piVar5 == (int *)0x0) {
          piVar5 = &local_14;
        }
        local_10 = local_14;
        local_10._1_3_ = (undefined3)((uint)local_14 >> 8);
        local_10 = CONCAT31(local_10._1_3_,*(undefined1 *)((int)piVar5 + 3));
        local_10._2_2_ = (undefined2)((uint)local_14 >> 0x10);
        local_10._0_2_ = CONCAT11(*(undefined1 *)((int)piVar5 + 2),*(undefined1 *)((int)piVar5 + 3))
        ;
        local_10._3_1_ = (undefined1)((uint)local_14 >> 0x18);
        local_10._0_3_ = CONCAT12(*(undefined1 *)((int)piVar5 + 1),(undefined2)local_10);
        local_10 = CONCAT13((char)*piVar5,(undefined3)local_10);
        _V_memcpy(&local_14,&local_10,4);
        iVar4 = *(int *)(this + 0x540);
        iVar3 = local_14;
      }
      *(int *)(this + 0x540) = iVar4 + 4;
      *param_1 = iVar3;
      CVar1 = this[0x549];
      goto joined_r0x0013049f;
    }
  }
  else {
    local_14 = 0;
    CUtlBuffer::Scanf(this_00,"%d",&local_14);
    iVar4 = local_14;
  }
  *param_1 = iVar4;
  CVar1 = this[0x549];
joined_r0x0013049f:
  if (((byte)CVar1 & 1) == 0) {
    cVar2 = CUtlBuffer::CheckGet(this_00,4);
    iVar4 = 0;
    if (cVar2 != '\0') {
      if (((byte)this[0x568] & 1) == 0) {
        iVar4 = *(int *)(this + 0x540);
        local_14 = *(int *)(*(int *)(this + 0x534) + (iVar4 - *(int *)(this + 0x554)));
      }
      else {
        piVar5 = (int *)((*(int *)(this + 0x540) - *(int *)(this + 0x554)) + *(int *)(this + 0x534))
        ;
        if (piVar5 == (int *)0x0) {
          piVar5 = &local_14;
        }
        local_10 = local_14;
        local_10._1_3_ = (undefined3)((uint)local_14 >> 8);
        local_10 = CONCAT31(local_10._1_3_,*(undefined1 *)((int)piVar5 + 3));
        local_10._2_2_ = (undefined2)((uint)local_14 >> 0x10);
        local_10._0_2_ = CONCAT11(*(undefined1 *)((int)piVar5 + 2),*(undefined1 *)((int)piVar5 + 3))
        ;
        local_10._3_1_ = (undefined1)((uint)local_14 >> 0x18);
        local_10._0_3_ = CONCAT12(*(undefined1 *)((int)piVar5 + 1),(undefined2)local_10);
        local_10 = CONCAT13((char)*piVar5,(undefined3)local_10);
        _V_memcpy(&local_14,&local_10,4);
        iVar4 = *(int *)(this + 0x540);
      }
      *(int *)(this + 0x540) = iVar4 + 4;
      *param_2 = local_14;
      return;
    }
  }
  else {
    local_14 = 0;
    CUtlBuffer::Scanf(this_00,"%d",&local_14);
    iVar4 = local_14;
  }
  *param_2 = iVar4;
  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)