L L4D2node

CDedicatedServerAPI::PreMinidumpCallbackImpl

0x002172b0 · 483 bytes · __cdecl

_ZN19CDedicatedServerAPI23PreMinidumpCallbackImplEv

Decompiled

undefined (0 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CDedicatedServerAPI::PreMinidumpCallbackImpl() */

void CDedicatedServerAPI::PreMinidumpCallbackImpl(void)

{
  undefined4 uVar1;
  undefined4 uVar2;
  undefined4 uVar3;
  undefined4 uVar4;
  undefined4 uVar5;
  char cVar6;
  char *pcVar7;
  uint uVar8;
  bool bVar9;
  longdouble lVar10;
  
  fwrite("PreMinidumpCallback: updating dump comment\n",1,0x2b,_stderr);
  bVar9 = *(int *)(sys_minidumpexpandedspew._28_4_ + 0x30) == 0;
  uVar8 = errorText;
  if ((bVar9) && (0xdab < (int)errorText)) {
    uVar8 = 0xdac;
  }
                    /* try { // try from 00217316 to 00217484 has its CatchHandler @ 0021749a */
  _V_memset(DAT_003edba8,0,uVar8);
  lVar10 = (longdouble)Plat_FloatTime();
  V_snprintf(DAT_003edba8,uVar8,"Crash\nUptime( %f )\n",(double)lVar10);
  V_strncat(DAT_003edba8,g_minidumpinfo,uVar8,-1);
  SteamAPI_SetMiniDumpComment(DAT_003edba8);
  Plat_GetPagedPoolInfo(&g_final);
  uVar5 = g_nMapLoadCount;
  uVar4 = gHostSpawnCount;
  uVar3 = g_HostServerAbortCount;
  uVar2 = g_HostErrorCount;
  uVar1 = g_HostEndDemo;
  if (game == (undefined *)0x0) {
    pcVar7 = "inactive";
  }
  else {
    cVar6 = (**(code **)(*(int *)game + 0x40))(game);
    pcVar7 = "active";
    if (cVar6 == '\0') {
      pcVar7 = "inactive";
    }
  }
  V_snprintf(g_ppi,0x200,
             "\nPaged Pool\nprev PP PAGES: used: %lu, free %lu\nfinal PP PAGES: used: %lu, free %lu\nmemallocfail? = %u\nActive: %s SpawnCount %d MapLoad Count %d\nError count %d, end demo %d, abort count %d\n"
             ,g_pagedpoolinfo,DAT_003edb24,g_final,DAT_003edc0c,1,pcVar7,uVar4,uVar5,uVar2,uVar1,
             uVar3);
  V_strncat(DAT_003edba8,g_ppi,uVar8,-1);
  SteamAPI_SetMiniDumpComment(DAT_003edba8);
  if (bVar9) {
    return;
  }
  CErrorText::BuildCommentExtended((CErrorText *)&errorText,uVar8);
  SteamAPI_SetMiniDumpComment(DAT_003edba8);
  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)