L L4D2node

CopySceneFileIntoMemory

0x00811380 · 113 bytes · __cdecl

_Z23CopySceneFileIntoMemoryPKcPPhPi

Decompiled

undefined (3 params)

/* CopySceneFileIntoMemory(char const*, unsigned char**, int*) */

undefined4 CopySceneFileIntoMemory(char *param_1,uchar **param_2,int *param_3)

{
  uint uVar1;
  uchar *puVar2;
  undefined4 uVar3;
  
  uVar1 = (**(code **)(*scenefilecache + 0x14))(scenefilecache,param_1);
  if (uVar1 == 0) {
    *param_2 = (uchar *)0x0;
    *param_3 = 0;
    return 0;
  }
  puVar2 = operator_new__(uVar1);
  *param_2 = puVar2;
  *param_3 = uVar1;
  uVar3 = (**(code **)(*scenefilecache + 0x18))(scenefilecache,param_1,*param_2,uVar1);
  return uVar3;
}

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)