L L4D2node

CVProfRecorder::Playback_ReadAddBudgetGroup

0x00235f80 · 546 bytes · __thiscall

_ZN14CVProfRecorder27Playback_ReadAddBudgetGroupEv

Decompiled

undefined (1 param)

/* CVProfRecorder::Playback_ReadAddBudgetGroup() */

undefined4 __thiscall CVProfRecorder::Playback_ReadAddBudgetGroup(CVProfRecorder *this)

{
  CVProfRecorder CVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  int in_GS_OFFSET;
  char *pcVar5;
  char *pcVar6;
  undefined4 uVar7;
  undefined4 local_22c;
  undefined1 local_228;
  undefined1 local_227;
  undefined1 local_226;
  char local_225;
  char local_224;
  undefined1 local_223;
  undefined1 local_222;
  undefined1 local_221;
  char local_220 [512];
  int local_20;
  
  iVar4 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  do {
    iVar2 = (*(code *)**(undefined4 **)(g_pFileSystem + 4))
                      (g_pFileSystem + 4,&local_224,1,*(undefined4 *)(this + 0x19e4));
    if (iVar2 == 0) {
      if ((*(int *)(this + 0x19e0) - 1U < 2) && (*(int *)(this + 0x19e4) != 0)) {
        if (*(int *)(this + 0x19e0) == 1) {
          *(int *)(this + 0x1a04) = *(int *)(this + 0x1a04) + 1;
        }
        (**(code **)(*(int *)(g_pFileSystem + 4) + 0xc))(g_pFileSystem + 4,*(int *)(this + 0x19e4));
      }
      *(undefined4 *)(this + 0x19e0) = 0;
      *(undefined4 *)(this + 0x19e4) = 0;
      *(undefined4 *)(this + 0x19ec) = 0xffffffff;
      this[0x19fc] = (CVProfRecorder)0x1;
      g_pVProfileForDisplay = &g_VProfCurrentProfile;
      CVProfile::Term();
      uVar7 = 0x193;
      pcVar6 = "/data/src/engine/./vprof_record.cpp";
      pcVar5 = "VPROF PLAYBACK ASSERT (%s, line %d) - stopping playback.\n";
      Warning("VPROF PLAYBACK ASSERT (%s, line %d) - stopping playback.\n",
              "/data/src/engine/./vprof_record.cpp",0x193);
      uVar3 = 0;
      this = (CVProfRecorder *)pcVar5;
LAB_0023605f:
      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
        return uVar3;
      }
                    /* WARNING: Subroutine does not return */
      __stack_chk_fail(this,pcVar6,uVar7);
    }
    if (local_224 == '\0') {
      CVar1 = this[0x1a0c];
      local_220[iVar4] = '\0';
      local_22c = 0;
      if (((byte)CVar1 & 1) == 0) {
        (*(code *)**(undefined4 **)(g_pFileSystem + 4))
                  (g_pFileSystem + 4,&local_22c,4,*(undefined4 *)(this + 0x19e4));
      }
      else {
        (*(code *)**(undefined4 **)(g_pFileSystem + 4))
                  (g_pFileSystem + 4,&local_228,4,*(undefined4 *)(this + 0x19e4));
        local_224 = local_225;
        local_223 = local_226;
        local_222 = local_227;
        local_221 = local_228;
        _V_memcpy(&local_22c,&local_224,4);
      }
      pcVar6 = local_220;
      uVar7 = local_22c;
      CVProfile::AddBudgetGroupName((char *)this,(int)pcVar6);
      uVar3 = 1;
      goto LAB_0023605f;
    }
    if (iVar4 < 0x1ff) {
      local_220[iVar4] = local_224;
      iVar4 = iVar4 + 1;
    }
  } while( true );
}

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)