L L4D2node

CVProfRecorder::Record_WriteTimings_R

0x00235b60 · 1016 bytes · __thiscall

_ZN14CVProfRecorder21Record_WriteTimings_REPK10CVProfNode

Decompiled

undefined (2 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CVProfRecorder::Record_WriteTimings_R(CVProfNode const*) */

void __thiscall CVProfRecorder::Record_WriteTimings_R(CVProfRecorder *this,CVProfNode *param_1)

{
  CVProfRecorder CVar1;
  CVProfNode *pCVar2;
  ushort uVar3;
  uint uVar4;
  undefined2 local_2c;
  undefined2 local_2a;
  undefined4 local_28;
  undefined1 local_24 [4];
  undefined1 local_20;
  undefined1 local_1f;
  undefined1 local_1e;
  undefined1 local_1d;
  
  local_2c = 0xffff;
  if (*(uint *)(param_1 + 0x38) < 0x10000) {
    local_2c = (ushort)*(undefined4 *)(param_1 + 0x38);
  }
  if (local_2c < 0xff) {
    local_28 = CONCAT31(local_28._1_3_,(char)local_2c);
    if (((byte)this[0x1a0c] & 1) == 0) {
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,&local_28,1,*(undefined4 *)(this + 0x19e4));
    }
    else {
      local_20 = (char)local_2c;
      _V_memcpy(local_24,&local_20,1);
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,local_24,1,*(undefined4 *)(this + 0x19e4));
    }
  }
  else {
    local_28 = CONCAT31(local_28._1_3_,0xff);
    if (((byte)this[0x1a0c] & 1) == 0) {
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,&local_28,1,*(undefined4 *)(this + 0x19e4));
      CVar1 = this[0x1a0c];
      uVar3 = local_2c;
    }
    else {
      local_20 = 0xff;
      _V_memcpy(local_24,&local_20,1);
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,local_24,1,*(undefined4 *)(this + 0x19e4));
      CVar1 = this[0x1a0c];
      uVar3 = local_2c;
    }
    local_2c = uVar3;
    if (((byte)CVar1 & 1) == 0) {
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,&local_2c,2,*(undefined4 *)(this + 0x19e4));
    }
    else {
      local_2c._1_1_ = (undefined1)(uVar3 >> 8);
      local_20 = local_2c._1_1_;
      local_2c._0_1_ = (undefined1)uVar3;
      local_1f = (undefined1)local_2c;
      _V_memcpy(local_24,&local_20,2);
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,local_24,2,*(undefined4 *)(this + 0x19e4));
    }
  }
  uVar4 = __udivdi3((int)((ulonglong)*(uint *)(param_1 + 0x3c) * 1000000),
                    (int)((ulonglong)*(uint *)(param_1 + 0x3c) * 1000000 >> 0x20) +
                    *(int *)(param_1 + 0x40) * 1000000,_g_ClockSpeed,_vswprintf);
  local_28 = uVar4 >> 2;
  if (local_28 < 0xffff) {
    local_2a = (short)local_28;
    if (((byte)this[0x1a0c] & 1) == 0) {
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,&local_2a,2,*(undefined4 *)(this + 0x19e4));
    }
    else {
      local_2a._1_1_ = (undefined1)(local_28 >> 8);
      local_20 = local_2a._1_1_;
      local_2a._0_1_ = (undefined1)local_28;
      local_1f = (undefined1)local_2a;
      _V_memcpy(local_24,&local_20,2);
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,local_24,2,*(undefined4 *)(this + 0x19e4));
    }
  }
  else {
    local_2a = 0xffff;
    if (((byte)this[0x1a0c] & 1) == 0) {
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,&local_2a,2,*(undefined4 *)(this + 0x19e4));
    }
    else {
      local_20 = 0xff;
      local_1f = 0xff;
      _V_memcpy(local_24,&local_20,2);
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,local_24,2,*(undefined4 *)(this + 0x19e4));
    }
    if (((byte)this[0x1a0c] & 1) == 0) {
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,&local_28,4,*(undefined4 *)(this + 0x19e4));
    }
    else {
      local_20 = local_28._3_1_;
      local_1f = local_28._2_1_;
      local_1e = local_28._1_1_;
      local_1d = (undefined1)local_28;
      _V_memcpy(local_24,&local_20,4);
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,local_24,4,*(undefined4 *)(this + 0x19e4));
    }
  }
  for (pCVar2 = *(CVProfNode **)(param_1 + 0x68); pCVar2 != (CVProfNode *)0x0;
      pCVar2 = *(CVProfNode **)(pCVar2 + 0x6c)) {
    Record_WriteTimings_R(this,pCVar2);
  }
  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)