L L4D2node

SendTable_PrintStats

0x00156210 · 550 bytes · unknown

_Z20SendTable_PrintStatsv

Decompiled

undefined (0 params)

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

void SendTable_PrintStats(void)

{
  int *piVar1;
  int iVar2;
  uint *puVar3;
  uint *puVar4;
  int iVar5;
  int *piVar6;
  int iVar7;
  int local_44;
  int local_40;
  int local_3c;
  int local_38;
  int local_34;
  int local_30;
  int local_2c;
  int local_28;
  int local_20;
  
  local_44 = DAT_0039f6e8;
  if (DAT_0039f6e8 < 1) {
    iVar5 = 0;
    iVar7 = 0;
    local_20 = 0;
    local_40 = 0;
    local_3c = 0;
    local_38 = 0;
    local_34 = 0;
    local_30 = 0;
    local_2c = 0;
    local_28 = 0;
    local_44 = 0;
  }
  else {
    iVar5 = 0;
    iVar7 = 0;
    local_20 = 0;
    local_40 = 0;
    local_3c = 0;
    local_38 = 0;
    local_34 = 0;
    local_30 = 0;
    local_2c = 0;
    local_28 = 0;
    piVar6 = g_SendTables;
    do {
      piVar1 = (int *)*piVar6;
      iVar2 = piVar1[1];
      local_20 = local_20 + iVar2;
      iVar7 = iVar7 + *(int *)(piVar1[3] + 0x38);
      if (0 < iVar2) {
        puVar3 = (uint *)(*piVar1 + 0x3c);
        puVar4 = puVar3 + iVar2 * 0x15;
LAB_001562aa:
        do {
          if ((*puVar3 & 0x40) != 0) {
            iVar5 = iVar5 + 1;
            goto switchD_001562bf_default;
          }
          if ((*puVar3 & 0x100) != 0) goto switchD_001562bf_default;
          switch(puVar3[-0xd]) {
          case 0:
            local_34 = local_34 + 1;
            break;
          case 1:
            local_28 = local_28 + 1;
            break;
          case 2:
            local_38 = local_38 + 1;
            break;
          case 3:
            local_3c = local_3c + 1;
            break;
          case 4:
            local_2c = local_2c + 1;
            break;
          case 5:
            goto switchD_001562bf_caseD_5;
          case 6:
            local_40 = local_40 + 1;
          }
switchD_001562bf_default:
          puVar3 = puVar3 + 0x15;
        } while (puVar3 != puVar4);
      }
LAB_001562e0:
      piVar6 = piVar6 + 1;
    } while (piVar6 != g_SendTables + DAT_0039f6e8);
  }
  Msg("Total Send Table stats\n");
  Msg("Send Tables   : %i\n",local_44);
  Msg("Send Props    : %i\n",local_20);
  Msg("Flat Props    : %i\n",iVar7);
  Msg("Int Props     : %i\n",local_34);
  Msg("Float Props   : %i\n",local_28);
  Msg("Vector Props  : %i\n",local_38);
  Msg("VectorXY Props: %i\n",local_3c);
  Msg("String Props  : %i\n",local_2c);
  Msg("Array Props   : %i\n",local_30);
  Msg("Table Props   : %i\n",local_40);
  Msg("Exclu Props   : %i\n",iVar5);
  return;
switchD_001562bf_caseD_5:
  local_30 = local_30 + 1;
  puVar3 = puVar3 + 0x15;
  if (puVar3 == puVar4) goto LAB_001562e0;
  goto LAB_001562aa;
}

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)