L L4D2node

CVProfile::EnterScope

0x007cd6c0 · 151 bytes · __thiscall

_ZN9CVProfile10EnterScopeEPKciS1_bi

Decompiled

undefined (6 params)

/* CVProfile::EnterScope(char const*, int, char const*, bool, int) */

void __thiscall
CVProfile::EnterScope
          (CVProfile *this,char *param_1,int param_2,char *param_3,bool param_4,int param_5)

{
  uint *puVar1;
  int iVar2;
  int iVar3;
  int *piVar4;
  
  if ((*(int *)(this + 0x100c) != 0) || (this[0x1010] == (CVProfile)0x0)) {
    iVar2 = *(int *)(this + 0x19b8);
    iVar3 = ThreadGetCurrentId();
    if (iVar2 == iVar3) {
      piVar4 = *(int **)(this + 0x1014);
      if ((char *)*piVar4 != param_1) {
        piVar4 = (int *)CVProfNode::GetSubNode
                                  ((char *)piVar4,(int)param_1,(char *)param_2,(int)param_3);
        *(int **)(this + 0x1014) = piVar4;
      }
      puVar1 = (uint *)(*(int *)(this + 0x10a0) + 4 + piVar4[0x1c] * 8);
      *puVar1 = *puVar1 | param_5;
      CVProfNode::EnterScope();
      this[0x1010] = (CVProfile)0x0;
      return;
    }
  }
  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)