L L4D2node

CDownloadListGenerator::CacheCriticalFiles

0x0013f120 · 411 bytes · __thiscall

_ZN22CDownloadListGenerator18CacheCriticalFilesEv

Decompiled

undefined (1 param)

/* CDownloadListGenerator::CacheCriticalFiles() */

void __thiscall CDownloadListGenerator::CacheCriticalFiles(CDownloadListGenerator *this)

{
  char *pcVar1;
  int iVar2;
  int iVar3;
  int in_GS_OFFSET;
  undefined4 local_146;
  undefined4 local_142;
  undefined4 local_13e;
  undefined4 local_13a;
  undefined1 local_136;
  WhiteListFileData local_135 [260];
  undefined4 local_31;
  undefined4 local_2d;
  undefined4 local_29;
  undefined4 local_25;
  undefined1 local_21;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (*(int *)(this + 0x1a0) == 0) {
    iVar3 = 0;
    EnsureCRCFilePath();
    do {
      pcVar1 = (&g_CriticalFileList)[iVar3];
      local_21 = 0;
      local_31 = 0;
      local_2d = 0;
      local_29 = 0;
      local_25 = 0;
      if (pcVar1 == (char *)0x0) {
        local_135[0] = (WhiteListFileData)0x0;
      }
      else {
        V_strncpy((char *)local_135,pcVar1,0x104);
      }
      iVar2 = CUtlVector<CDownloadListGenerator::WhiteListFileData,CUtlMemory<CDownloadListGenerator::WhiteListFileData,int>>
              ::Find((CUtlVector<CDownloadListGenerator::WhiteListFileData,CUtlMemory<CDownloadListGenerator::WhiteListFileData,int>>
                      *)(this + 0x194),local_135);
      if (iVar2 == -1) {
        local_146 = 0;
        local_142 = 0;
        local_13e = 0;
        local_13a = 0;
        local_136 = 2;
        CalculateWhiteListCRC(this,(uchar *)&local_146,pcVar1);
        local_21 = local_136;
        local_31 = local_146;
        local_2d = local_142;
        local_29 = local_13e;
        local_25 = local_13a;
        if (pcVar1 == (char *)0x0) {
          local_135[0] = (WhiteListFileData)0x0;
        }
        else {
          V_strncpy((char *)local_135,pcVar1,0x104);
        }
        CUtlVector<CDownloadListGenerator::WhiteListFileData,CUtlMemory<CDownloadListGenerator::WhiteListFileData,int>>
        ::InsertBefore((CUtlVector<CDownloadListGenerator::WhiteListFileData,CUtlMemory<CDownloadListGenerator::WhiteListFileData,int>>
                        *)(this + 0x194),*(int *)(this + 0x1a0),local_135);
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 != 6);
  }
  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)