L L4D2node

COM_Log

0x00455100 · 191 bytes · __cdecl

_Z7COM_LogPcS_z

Decompiled

undefined (2 params)

/* COM_Log(char*, char*, ...) */

void COM_Log(char *param_1,char *param_2,...)

{
  int iVar1;
  int in_GS_OFFSET;
  char local_410 [1024];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 == (char *)0x0) {
    param_1 = "hllog.txt";
  }
  V_vsnprintf(local_410,0x400,param_2,&stack0x0000000c);
  iVar1 = (**(code **)(filesystem[1] + 8))(filesystem + 1,param_1,&DAT_00c1388b,0);
  if (iVar1 != 0) {
    (**(code **)(*filesystem + 100))(filesystem,iVar1,"%s",local_410);
    (**(code **)(filesystem[1] + 0xc))(filesystem + 1,iVar1);
  }
  if (local_10 == *(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)