L L4D2node

Script_GetInfectedStats

0x00b46c90 · 525 bytes · __cdecl

_ZL23Script_GetInfectedStatsP9HSCRIPT__

Decompiled

undefined (1 param)

/* Script_GetInfectedStats(HSCRIPT__*) */

void Script_GetInfectedStats(HSCRIPT__ *param_1)

{
  code *pcVar1;
  undefined4 local_34;
  undefined1 local_30;
  void *local_2c;
  void *local_28 [2];
  undefined2 local_20;
  ushort local_1e;
  
  local_34 = 3;
  local_30 = 1;
  local_2c = (void *)0x0;
  ForEachPlayer<LivePlayerCounter>((LivePlayerCounter *)&local_34);
  local_28[0] = *(void **)(TheDirector + 0x1bc);
  local_20 = 5;
  local_1e = 0;
                    /* try { // try from 00b46cf7 to 00b46cf8 has its CatchHandler @ 00b46ec2 */
  (**(code **)(*g_pScriptVM + 0x78))(g_pScriptVM,param_1,"Witches",local_28);
  if ((local_1e & 1) != 0) {
    free(local_28[0]);
  }
  local_28[0] = *(void **)(TheDirector + 0x1c0);
  local_20 = 5;
  local_1e = 0;
                    /* try { // try from 00b46d45 to 00b46d46 has its CatchHandler @ 00b46eb5 */
  (**(code **)(*g_pScriptVM + 0x78))(g_pScriptVM,param_1,"Tanks",local_28);
  if ((local_1e & 1) != 0) {
    free(local_28[0]);
  }
  local_1e = 0;
  local_20 = 5;
  local_28[0] = local_2c;
                    /* try { // try from 00b46d8a to 00b46d8b has its CatchHandler @ 00b46eb3 */
  (**(code **)(*g_pScriptVM + 0x78))(g_pScriptVM,param_1,"Specials",local_28);
  if ((local_1e & 1) != 0) {
    free(local_28[0]);
  }
  pcVar1 = *(code **)(*g_pScriptVM + 0x78);
  local_28[0] = (void *)CDirectorTacticalServices::GetCommonInfectedCount
                                  (*(CDirectorTacticalServices **)(TheDirector + 0x628),0);
  local_20 = 5;
  local_1e = 0;
                    /* try { // try from 00b46dec to 00b46ded has its CatchHandler @ 00b46eb1 */
  (*pcVar1)(g_pScriptVM,param_1,"Commons",local_28);
  if ((local_1e & 1) != 0) {
    free(local_28[0]);
  }
  local_28[0] = *(void **)(TheZombieManager + 0x4c);
  local_20 = 5;
  local_1e = 0;
                    /* try { // try from 00b46e37 to 00b46e38 has its CatchHandler @ 00b46eaf */
  (**(code **)(*g_pScriptVM + 0x78))(g_pScriptVM,param_1,"SpecialsSpawned",local_28);
  if ((local_1e & 1) != 0) {
    free(local_28[0]);
  }
  local_28[0] = *(void **)(TheZombieManager + 0x68);
  local_20 = 5;
  local_1e = 0;
                    /* try { // try from 00b46e82 to 00b46e83 has its CatchHandler @ 00b46e9d */
  (**(code **)(*g_pScriptVM + 0x78))(g_pScriptVM,param_1,"PanicWaveSpecials",local_28);
  if ((local_1e & 1) != 0) {
    free(local_28[0]);
  }
  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)