L L4D2node

__wrap_fopen64

0x0025a630 · 214 bytes · unknown

Decompiled

undefined (0 params)

FILE * __wrap_fopen64(char *param_1,char *param_2)

{
  char *pcVar1;
  FILE *pFVar2;
  int in_GS_OFFSET;
  char *local_228;
  char local_224 [512];
  undefined4 local_24;
  int local_20;
  
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pcVar1 = strpbrk(param_2,"wa+");
  local_228 = (char *)0x0;
  local_24 = pathmatch(param_1,&local_228,pcVar1 != (char *)0x0,local_224,0x200);
  if (local_228 == (char *)0x0) {
    local_228 = param_1;
  }
                    /* try { // try from 0025a6b1 to 0025a6b5 has its CatchHandler @ 0025a70b */
  pFVar2 = fopen64(local_228,param_2);
  if ((local_228 != param_1) && (local_228 != local_224)) {
    free(local_228);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return pFVar2;
  }
                    /* 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.



        
        

⚠ This function has no mangled symbol — it may be internal/static. The Linux gamedata field uses @-prefix symbol resolution which requires an exported mangled name. You'll need a Linux byte signature for this one (extract via extract_signature.java).


          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)