L L4D2node

CMapReslistGenerator::LogToEngineReslist

0x0018cf20 · 420 bytes · __thiscall

_ZN20CMapReslistGenerator18LogToEngineReslistEPKc

Decompiled

undefined (2 params)

/* CMapReslistGenerator::LogToEngineReslist(char const*) */

void __thiscall CMapReslistGenerator::LogToEngineReslist(CMapReslistGenerator *this,char *param_1)

{
  code *pcVar1;
  int iVar2;
  undefined4 uVar3;
  int in_GS_OFFSET;
  CUtlString local_13c [16];
  CFmtStrN<256> local_12c [5];
  undefined1 local_127 [263];
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  CUtlString::CUtlString(local_13c,param_1);
                    /* try { // try from 0018cf64 to 0018cf68 has its CatchHandler @ 0018d0d9 */
  iVar2 = CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
          ::Find((CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
                  *)(this + 0x198),local_13c);
  CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_13c);
  if (iVar2 == -1) {
    CUtlString::CUtlString(local_13c,param_1);
                    /* try { // try from 0018cfb3 to 0018cfb7 has its CatchHandler @ 0018d0c7 */
    CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
    ::Insert((CUtlRBTree<CUtlString,int,bool(*)(CUtlString_const&,CUtlString_const&),CUtlMemory<UtlRBTreeNode_t<CUtlString,int>,int>>
              *)(this + 0x198),local_13c);
    CUtlMemory<unsigned_char,int>::Purge((CUtlMemory<unsigned_char,int> *)local_13c);
    pcVar1 = *(code **)(*(int *)(g_pFileSystem + 4) + 8);
    uVar3 = CUtlString::Get((CUtlString *)(this + 0x1bc));
    CFmtStrN<256>::CFmtStrN(local_12c,"%s\\%s",uVar3,"engine.lst");
    iVar2 = (*pcVar1)(g_pFileSystem + 4,local_127,"at","DEFAULT_WRITE_PATH");
    if (iVar2 != 0) {
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))(g_pFileSystem + 4,&DAT_002cc2b5,1,iVar2);
      pcVar1 = *(code **)(*(int *)(g_pFileSystem + 4) + 4);
      uVar3 = _V_strlen(param_1);
      (*pcVar1)(g_pFileSystem + 4,param_1,uVar3,iVar2);
      (**(code **)(*(int *)(g_pFileSystem + 4) + 4))(g_pFileSystem + 4,&DAT_002af868,2,iVar2);
      (**(code **)(*(int *)(g_pFileSystem + 4) + 0xc))(g_pFileSystem + 4,iVar2);
    }
  }
  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)