L L4D2node

COM_ExtendedExplainDisconnection

0x00126030 · 217 bytes · __cdecl

_Z32COM_ExtendedExplainDisconnectionbPcz

Decompiled

undefined (2 params)

/* COM_ExtendedExplainDisconnection(bool, char*, ...) */

void COM_ExtendedExplainDisconnection(bool param_1,char *param_2,...)

{
  code *pcVar1;
  int *piVar2;
  KeyValues *this;
  int in_GS_OFFSET;
  undefined1 *puVar3;
  char local_420 [1024];
  int local_20;
  
  puVar3 = local_420;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  V_vsnprintf(puVar3,0x400,param_2,&stack0x0000000c);
  V_strncpy(gszExtendedDisconnectReason,puVar3,0x100);
  if (param_1) {
    puVar3 = gszExtendedDisconnectReason;
    ConMsg("%s\n");
  }
  piVar2 = (int *)(**(code **)(*g_pMatchFramework + 0x1c))(g_pMatchFramework);
  pcVar1 = *(code **)(*piVar2 + 8);
  this = KeyValues::operator_new((KeyValues *)0x2c,(uint)puVar3);
                    /* try { // try from 001260c9 to 001260cd has its CatchHandler @ 0012610b */
  KeyValues::KeyValues(this,"OnEngineDisconnectReason","reason","");
  (*pcVar1)(piVar2,this);
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)