L L4D2node

WriteRemoteVProfData

0x0022fcf0 · 563 bytes · unknown

_Z20WriteRemoteVProfDatav

Decompiled

undefined (0 params)

/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* WriteRemoteVProfData() */

void WriteRemoteVProfData(void)

{
  float *pfVar1;
  char *pcVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  int iVar5;
  uint uVar6;
  VProfListenInfo_t *pVVar7;
  int iVar8;
  int iVar9;
  int iVar10;
  int iVar11;
  undefined **ppuVar12;
  int *piVar13;
  int in_GS_OFFSET;
  longdouble lVar14;
  undefined4 uVar15;
  undefined4 uStack_70;
  undefined *local_6c [7];
  VProfListenInfo_t *local_50;
  int local_4c;
  int local_48;
  float local_44;
  int local_40;
  int local_3c;
  float local_38;
  undefined8 local_34;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_38 = *(float *)(rpt_vprof_time._28_4_ + 0x2c);
  uStack_70 = 0x22fd18;
  lVar14 = (longdouble)Plat_FloatTime();
  local_34 = (double)lVar14;
  local_44 = (float)lVar14;
  local_48 = DAT_003f0074;
  ppuVar12 = local_6c;
  if (0 < DAT_003f0074) {
    if (local_44 - *(float *)(s_VProfListeners + 4) < local_38) {
      iVar5 = 0;
      iVar9 = s_VProfListeners;
      do {
        iVar5 = iVar5 + 1;
        ppuVar12 = local_6c;
        if (iVar5 == DAT_003f0074) goto LAB_0022fd78;
        pfVar1 = (float *)(iVar9 + 0x20);
        iVar9 = iVar9 + 0x1c;
      } while (local_44 - *pfVar1 < local_38);
    }
    local_6c[0] = g_pVProfileForDisplay;
    uStack_70 = 0x22fd9d;
    local_3c = CVProfile::GetNumBudgetGroups();
    iVar9 = -((local_3c * 4 + 0xfU & 0xfffffff0) + 0x10);
    *(undefined **)((int)local_6c + iVar9) = g_pVProfileForDisplay;
    *(undefined4 *)((int)local_6c + iVar9 + -4) = 0x22fdc3;
    iVar5 = CVProfile::GetNumBudgetGroups();
    uVar4 = g_VProfExport._28_4_;
    uVar3 = g_VProfExport._4_4_;
    if (0 < iVar5) {
      iVar11 = *(int *)(g_pVProfileForDisplay + 0x10a0);
      iVar10 = 0;
      do {
        uVar15 = 0;
        if ((*(uint *)(iVar11 + 4 + iVar10 * 8) & uVar4) != 0) {
          uVar15 = *(undefined4 *)(uVar3 + iVar10 * 4);
        }
        *(undefined4 *)((int)&local_50 + iVar10 * 4 + iVar9) = uVar15;
        iVar10 = iVar10 + 1;
      } while (iVar10 != iVar5);
    }
    local_40 = 0;
    piVar13 = (int *)((int)local_6c + iVar9);
    do {
      iVar5 = local_40 * 0x1c;
      ppuVar12 = (undefined **)piVar13;
      if (local_38 <= local_44 - *(float *)(s_VProfListeners + iVar5 + 4)) {
        *piVar13 = s_VProfListeners + iVar5;
        piVar13[-1] = 0x22fe53;
        WriteRemoteVProfGroupData((VProfListenInfo_t *)*piVar13);
        local_50 = (VProfListenInfo_t *)(s_VProfListeners + iVar5);
        *(float *)(local_50 + 4) = local_44;
        local_4c = *(int *)(local_50 + 0x14) * 4;
        uVar6 = ((local_4c + 0xfU & 0xfffffff0) + 0x1e) / 0x10;
        ppuVar12 = (undefined **)(piVar13 + uVar6 * -4);
        piVar13[uVar6 * -4 + 2] = local_4c;
        local_34 = (double)(CONCAT44(local_34._4_4_,(int)piVar13 + uVar6 * -0x10 + 0x23) &
                           0xfffffffffffffff0);
        piVar13[uVar6 * -4 + 1] = 0;
        piVar13[uVar6 * -4] = (int)local_34;
        piVar13[uVar6 * -4 + -1] = 0x22fea7;
        memset((void *)piVar13[uVar6 * -4],piVar13[uVar6 * -4 + 1],piVar13[uVar6 * -4 + 2]);
        pVVar7 = local_50;
        if (0 < local_3c) {
          iVar11 = 0;
          while( true ) {
            pcVar2 = *(char **)(*(int *)(g_pVProfileForDisplay + 0x10a0) + iVar11 * 8);
            piVar13[uVar6 * -4 + -1] = 0x22fedb;
            iVar8 = FindSentGroupIndex(pVVar7,pcVar2);
            iVar10 = iVar11 * 4;
            iVar11 = iVar11 + 1;
            *(undefined4 *)((int)local_34 + iVar8 * 4) =
                 *(undefined4 *)((int)&local_50 + iVar10 + iVar9);
            if (iVar11 == local_3c) break;
            pVVar7 = (VProfListenInfo_t *)(s_VProfListeners + iVar5);
          }
          pVVar7 = (VProfListenInfo_t *)(iVar5 + s_VProfListeners);
        }
        iVar5 = local_4c;
        piVar13[uVar6 * -4 + 2] = 0;
        piVar13[uVar6 * -4 + 4] = iVar5;
        piVar13[uVar6 * -4 + 3] = (int)local_34;
        iVar5 = *(int *)pVVar7;
        piVar13[uVar6 * -4] = (int)g_ServerRemoteAccess;
        piVar13[uVar6 * -4 + 1] = iVar5;
        piVar13[uVar6 * -4 + -1] = 0x22ff24;
        CServerRemoteAccess::SendVProfData
                  (piVar13[uVar6 * -4],SUB41(piVar13[uVar6 * -4 + 1],0),
                   (void *)piVar13[uVar6 * -4 + 2],piVar13[uVar6 * -4 + 3]);
      }
      local_40 = local_40 + 1;
      piVar13 = (int *)ppuVar12;
    } while (local_40 != local_48);
  }
LAB_0022fd78:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    *(undefined **)((int)ppuVar12 + -4) = &UNK_0022ff35;
    __stack_chk_fail();
  }
  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)