L L4D2node

CResponseSystem::DebugPrint

0x005b50b0 · 153 bytes · __thiscall

_ZN15CResponseSystem10DebugPrintEiPKcz

Decompiled

undefined (3 params)

/* CResponseSystem::DebugPrint(int, char const*, ...) */

void __thiscall CResponseSystem::DebugPrint(CResponseSystem *this,int param_1,char *param_2,...)

{
  undefined1 *puVar1;
  int iVar2;
  int iVar3;
  int in_GS_OFFSET;
  int aiStack_430 [8];
  undefined1 local_410 [1024];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar3 = param_1 * 3;
  iVar2 = -((iVar3 + 0x10U & 0xfffffff0) + 0x10);
  puVar1 = local_410 + iVar2;
  puVar1[iVar3] = 0;
  iVar3 = iVar3 + -1;
  if (-1 < iVar3) {
    do {
      puVar1[iVar3] = 0x20;
      iVar3 = iVar3 + -1;
    } while (iVar3 != -1);
  }
  *(char **)((int)aiStack_430 + iVar2 + 0xc) = param_2;
  *(undefined1 **)((int)aiStack_430 + iVar2 + 0x10) = &stack0x00000010;
  *(undefined4 *)((int)aiStack_430 + iVar2 + 8) = 0x400;
  *(undefined1 **)((int)aiStack_430 + iVar2 + 4) = local_410;
  *(undefined4 *)((int)aiStack_430 + iVar2) = 0x5b511d;
  V_vsnprintf(*(char **)((int)aiStack_430 + iVar2 + 4),*(int *)((int)aiStack_430 + iVar2 + 8),
              *(char **)((int)aiStack_430 + iVar2 + 0xc),*(char **)((int)aiStack_430 + iVar2 + 0x10)
             );
  *(undefined1 **)((int)aiStack_430 + iVar2 + 0xc) = local_410;
  *(undefined1 **)((int)aiStack_430 + iVar2 + 8) = puVar1;
  *(char **)((int)aiStack_430 + iVar2 + 4) = "%s%s";
  *(undefined4 *)((int)aiStack_430 + iVar2) = 0x5b5131;
  DevMsg(*(char **)((int)aiStack_430 + iVar2 + 4));
  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    *(undefined **)((int)aiStack_430 + iVar2) = &UNK_005b5149;
    __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)