L L4D2node

CTextStatsMgr::WriteFile

0x00af4a70 · 194 bytes · __thiscall

_ZN13CTextStatsMgr9WriteFileEP11IFileSystemPKc

Decompiled

undefined (3 params)

/* CTextStatsMgr::WriteFile(IFileSystem*, char const*) */

undefined4 __thiscall
CTextStatsMgr::WriteFile(CTextStatsMgr *this,IFileSystem *param_1,char *param_2)

{
  int iVar1;
  undefined4 *puVar2;
  int iVar3;
  undefined4 uVar4;
  int iVar5;
  
  if (param_2 == (char *)0x0) {
    param_2 = (char *)this;
  }
  iVar3 = (**(code **)(*(int *)(param_1 + 4) + 8))(param_1 + 4,param_2,&DAT_00bf9593,"LOGDIR");
  uVar4 = 0;
  if (iVar3 != 0) {
    iVar5 = CTextStat::GetTextStatsList();
    for (iVar1 = *(int *)(iVar5 + 4); iVar5 != iVar1; iVar1 = *(int *)(iVar1 + 4)) {
      if (*(CTextStatsMgr **)(iVar1 + 8) == this) {
        (**(code **)(iVar1 + 0xc))(param_1,iVar3,*(undefined4 *)(iVar1 + 0x10));
      }
    }
    (**(code **)(*(int *)(param_1 + 4) + 0xc))(param_1 + 4,iVar3);
    for (puVar2 = CTextStatFile::s_pHead; puVar2 != (undefined4 *)0x0;
        puVar2 = (undefined4 *)*puVar2) {
      (*(code *)puVar2[1])();
    }
    uVar4 = 1;
  }
  return uVar4;
}

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)