L L4D2node

CRestore::ReadString

0x004a9910 · 97 bytes · __thiscall

_ZN8CRestore10ReadStringEPcii

Decompiled

undefined (4 params)

/* CRestore::ReadString(char*, int, int) */

void __thiscall CRestore::ReadString(CRestore *this,char *param_1,int param_2,int param_3)

{
  size_t sVar1;
  char *__s;
  
  if (*(int *)(this + 0x18) == 0) {
    __s = (char *)0x0;
  }
  else {
    __s = *(char **)(*(int *)(this + 0x18) + 4);
  }
  if (param_3 == 0) {
    sVar1 = strlen(__s);
    param_3 = sVar1 + 1;
  }
  BufferReadBytes(this,(char *)0x0,param_3);
  V_strncpy(param_1,__s,param_2);
  return;
}

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)