L L4D2node

CUtlStreamBuffer::OpenFile

0x0028d190 · 135 bytes · __thiscall

_ZN16CUtlStreamBuffer8OpenFileEPKcS1_i

Decompiled

undefined (4 params)

/* CUtlStreamBuffer::OpenFile(char const*, char const*, int) */

undefined4 __thiscall
CUtlStreamBuffer::OpenFile(CUtlStreamBuffer *this,char *param_1,char *param_2,int param_3)

{
  CUtlStreamBuffer CVar1;
  char cVar2;
  undefined4 uVar3;
  char local_f;
  char cStack_e;
  undefined1 local_d;
  
  if (((byte)this[0x14] & 4) == 0) {
    local_d = 0;
    CVar1 = this[0x15];
    cVar2 = 'b';
    if (((byte)CVar1 & 1) != 0) {
      cVar2 = (-(((byte)CVar1 & 4) == 0) & 0x12U) + 0x62;
    }
    _local_f = CONCAT11(cVar2,(-(((byte)CVar1 & 8) == 0) & 5U) + 0x72);
    uVar3 = (**(code **)(*g_pFullFileSystem + 0x114))
                      (g_pFullFileSystem,param_1,&local_f,param_3,param_2,0);
    return uVar3;
  }
  return 0;
}

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)