L L4D2node

CDownloadListGenerator::IsAddOnVPKGame

0x00140330 · 167 bytes · __thiscall

_ZN22CDownloadListGenerator14IsAddOnVPKGameEv

Decompiled

undefined (1 param)

/* CDownloadListGenerator::IsAddOnVPKGame() */

bool __thiscall CDownloadListGenerator::IsAddOnVPKGame(CDownloadListGenerator *this)

{
  int *piVar1;
  KeyValues *this_00;
  int iVar2;
  char *pcVar3;
  int in_GS_OFFSET;
  bool bVar4;
  byte bVar5;
  char local_114 [260];
  int local_10;
  
  bVar5 = 0;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  piVar1 = (int *)(**(code **)(*g_pMatchFramework + 0x24))(g_pMatchFramework);
  if (piVar1 == (int *)0x0) {
    pcVar3 = local_114;
    for (iVar2 = 0x41; iVar2 != 0; iVar2 = iVar2 + -1) {
      pcVar3[0] = '\0';
      pcVar3[1] = '\0';
      pcVar3[2] = '\0';
      pcVar3[3] = '\0';
      pcVar3 = pcVar3 + ((uint)bVar5 * -2 + 1) * 4;
    }
    GetAddonVPKName(this,local_114,0x104,(char *)(this + 0x100));
    bVar4 = local_114[0] != '\0';
  }
  else {
    this_00 = (KeyValues *)(**(code **)(*piVar1 + 4))(piVar1);
    iVar2 = KeyValues::GetInt(this_00,"Game/MissionInfo/builtin",0);
    bVar4 = iVar2 == 0;
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return bVar4;
  }
                    /* 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)