L L4D2node

CL_ShouldRedownloadFile

0x0013d200 · 176 bytes · __cdecl

_Z23CL_ShouldRedownloadFilePKc

Decompiled

undefined (1 param)

/* CL_ShouldRedownloadFile(char const*) */

undefined4 CL_ShouldRedownloadFile(char *param_1)

{
  int iVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  char local_2c [12];
  int local_20;
  
  uVar2 = 0;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  V_FileBase(com_gamedir,CL_ShouldRedownloadFile(char_const*)::gamedir,0x104);
  iVar1 = _V_stricmp(CL_ShouldRedownloadFile(char_const*)::gamedir,"infested");
  if (iVar1 == 0) {
    V_ExtractFileExtension(param_1,local_2c,0xc);
    iVar1 = _V_stricmp(local_2c,"layout");
    if ((iVar1 == 0) || (iVar1 = _V_stricmp(local_2c,"bsp"), iVar1 == 0)) {
      uVar2 = 1;
    }
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return uVar2;
}

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)