L L4D2node

CVProfRecorder::Record_MatchTree_R

0x002357b0 · 914 bytes · __thiscall

_ZN14CVProfRecorder18Record_MatchTree_REP10CVProfNodePKS0_P9CVProfile

Decompiled

undefined (4 params)

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

void __thiscall
CVProfRecorder::Record_MatchTree_R
          (CVProfRecorder *this,CVProfNode *param_1,CVProfNode *param_2,CVProfile *param_3)

{
  CVProfNode *pCVar1;
  char *__s;
  size_t sVar2;
  int iVar3;
  CVProfNode *pCVar4;
  CVProfNode *pCVar5;
  CVProfNode *pCVar6;
  undefined1 local_31;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined1 local_24 [4];
  undefined1 local_20;
  undefined1 local_1f;
  undefined1 local_1e;
  undefined1 local_1d;
  
  pCVar6 = *(CVProfNode **)(param_2 + 0x68);
  if (pCVar6 == (CVProfNode *)0x0) {
    return;
  }
  pCVar4 = *(CVProfNode **)(param_1 + 0x68);
  if (pCVar4 != (CVProfNode *)0x0) goto LAB_0023598a;
LAB_002357e0:
  if (pCVar6 == (CVProfNode *)0x0) {
    pCVar5 = (CVProfNode *)0x0;
    goto LAB_00235807;
  }
  do {
    pCVar5 = (CVProfNode *)0x0;
    do {
      if ((pCVar4 != (CVProfNode *)0x0) && (*(int *)(pCVar6 + 0x78) == *(int *)(pCVar4 + 0x78)))
      break;
      pCVar1 = pCVar6 + 0x6c;
      pCVar5 = pCVar6;
      pCVar6 = *(CVProfNode **)pCVar1;
    } while (*(CVProfNode **)pCVar1 != (CVProfNode *)0x0);
LAB_00235807:
    local_30 = *(int *)(pCVar5 + 0x70);
    local_31 = 1;
    local_2c = *(undefined4 *)(param_2 + 0x78);
    local_28 = *(int *)(pCVar5 + 0x78);
    if (((byte)this[0x1a0c] & 1) == 0) {
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,&local_31,1,*(undefined4 *)(this + 0x19e4));
      if (((byte)this[0x1a0c] & 1) == 0) goto LAB_00235864;
LAB_00235a22:
      local_20 = local_2c._3_1_;
      local_1f = local_2c._2_1_;
      local_1e = local_2c._1_1_;
      local_1d = (undefined1)local_2c;
      _V_memcpy(local_24,&local_20,4);
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,local_24,4,*(undefined4 *)(this + 0x19e4));
    }
    else {
      local_20 = 1;
      _V_memcpy(local_24,&local_20,1);
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,local_24,1,*(undefined4 *)(this + 0x19e4));
      if (((byte)this[0x1a0c] & 1) != 0) goto LAB_00235a22;
LAB_00235864:
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,&local_2c,4,*(undefined4 *)(this + 0x19e4));
    }
    iVar3 = g_pFileSystem;
    __s = *(char **)pCVar5;
    sVar2 = strlen(__s);
    (**(code **)(*(int *)(iVar3 + 4) + 4))(iVar3 + 4,__s,sVar2 + 1,*(undefined4 *)(this + 0x19e4));
    if (((byte)this[0x1a0c] & 1) == 0) {
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,&local_30,4,*(undefined4 *)(this + 0x19e4));
    }
    else {
      local_20 = local_30._3_1_;
      local_1f = local_30._2_1_;
      local_1e = local_30._1_1_;
      local_1d = (undefined1)local_30;
      _V_memcpy(local_24,&local_20,4);
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))
                (g_pFileSystem + 4,local_24,4,*(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));
    }
    iVar3 = CVProfNode::GetSubNode
                      ((char *)param_1,*(int *)pCVar5,(char *)0x0,
                       *(int *)(_DAT_0040b0bc + *(int *)(pCVar5 + 0x70) * 8));
    *(int *)(iVar3 + 0x70) = *(int *)(pCVar5 + 0x70);
    *(int *)(iVar3 + 0x78) = *(int *)(pCVar5 + 0x78);
    pCVar6 = *(CVProfNode **)(param_2 + 0x68);
    pCVar4 = *(CVProfNode **)(param_1 + 0x68);
    if (pCVar4 == (CVProfNode *)0x0) goto LAB_002357e0;
LAB_0023598a:
    if (*(int *)(pCVar6 + 0x78) == *(int *)(pCVar4 + 0x78)) {
      do {
        Record_MatchTree_R(this,pCVar4,pCVar6,param_3);
        pCVar6 = *(CVProfNode **)(pCVar6 + 0x6c);
        pCVar4 = *(CVProfNode **)(pCVar4 + 0x6c);
        if (pCVar6 == (CVProfNode *)0x0) {
          return;
        }
      } while (pCVar4 != (CVProfNode *)0x0);
      return;
    }
  } 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)