L L4D2node

CDirectorJournal::WriteToJournal

0x00891570 · 519 bytes · __thiscall

_ZN16CDirectorJournal14WriteToJournalEPKc

Decompiled

undefined (2 params)

/* CDirectorJournal::WriteToJournal(char const*) */

void __thiscall CDirectorJournal::WriteToJournal(CDirectorJournal *this,char *param_1)

{
  undefined4 *puVar1;
  int iVar2;
  int in_GS_OFFSET;
  undefined4 *local_348;
  undefined4 local_344;
  undefined4 local_340;
  int local_33c;
  undefined4 *local_338;
  undefined **local_334;
  undefined1 local_330;
  char local_32f [259];
  undefined4 local_22c;
  undefined **local_228;
  undefined1 local_224;
  char local_223 [259];
  undefined4 local_120;
  undefined **local_11c;
  undefined1 local_118;
  char local_117 [259];
  undefined4 local_14;
  int local_10;
  
  local_348 = (undefined4 *)0x0;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  local_344 = 0;
  local_340 = 0;
  local_33c = 0;
  local_338 = (undefined4 *)0x0;
                    /* try { // try from 008915d3 to 0089169d has its CatchHandler @ 00891776 */
  V_SplitString(param_1,":",(CUtlVector *)&local_348);
  local_330 = 1;
  local_334 = &PTR_InitQuietTruncation_00c08ee8;
  local_32f[0] = '\0';
  local_22c = 0;
  local_228 = &PTR_InitQuietTruncation_00c08ee8;
  local_224 = 1;
  local_223[0] = '\0';
  local_120 = 0;
  local_11c = &PTR_InitQuietTruncation_00c08ee8;
  local_118 = 1;
  local_117[0] = '\0';
  local_14 = 0;
  _V_strcpy(local_32f,(char *)(this + 0x19));
  _V_strcpy(local_223,(char *)*local_348);
  _V_strcpy(local_117,(char *)local_348[1]);
  CUtlVector<CDirectorJournalTask,CUtlMemory<CDirectorJournalTask,int>>::InsertBefore
            ((CUtlVector<CDirectorJournalTask,CUtlMemory<CDirectorJournalTask,int>> *)this,
             *(int *)(this + 0xc),(CDirectorJournalTask *)&local_334);
  iVar2 = 0;
  if (0 < local_33c) {
    do {
      if ((void *)local_348[iVar2] != (void *)0x0) {
        operator_delete__((void *)local_348[iVar2]);
      }
      iVar2 = iVar2 + 1;
    } while (iVar2 < local_33c);
  }
  iVar2 = 0;
  local_33c = 0;
  CUtlMemory<char*,int>::Purge((CUtlMemory<char*,int> *)&local_348);
  local_338 = local_348;
  if (0 < local_33c) {
    do {
      puVar1 = local_348 + iVar2;
      iVar2 = iVar2 + 1;
      operator_delete((void *)*puVar1);
    } while (iVar2 < local_33c);
  }
  local_33c = 0;
  CUtlMemory<char*,int>::Purge((CUtlMemory<char*,int> *)&local_348);
  local_33c = 0;
  local_338 = local_348;
  CUtlMemory<char*,int>::Purge((CUtlMemory<char*,int> *)&local_348);
  local_338 = local_348;
  CUtlMemory<char*,int>::Purge((CUtlMemory<char*,int> *)&local_348);
  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __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)