L L4D2node

CFmtStrN<1024>::AppendFormat

0x00091790 · 147 bytes · __thiscall

_ZN8CFmtStrNILi1024EE12AppendFormatEPKcz

Decompiled

undefined (2 params)

/* CFmtStrN<1024>::AppendFormat(char const*, ...) */

void __thiscall CFmtStrN<1024>::AppendFormat(CFmtStrN<1024> *this,char *param_1,...)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  bool local_1d [13];
  
  local_1d[0] = false;
  iVar1 = *(int *)(this + 0x408);
  iVar2 = V_vsnprintfRet((char *)(this + iVar1 + 5),0x3ff - *(int *)(this + 0x408),param_1,
                         &stack0x0000000c,local_1d);
  this[(0x404 - *(int *)(this + 0x408)) + iVar1] = (CFmtStrN<1024>)0x0;
  if (((local_1d[0] != false) && (this[4] == (CFmtStrN<1024>)0x0)) &&
     (AppendFormat(char_const*,...)::scAsserted < 5)) {
    AppendFormat(char_const*,...)::scAsserted = AppendFormat(char_const*,...)::scAsserted + 1;
  }
  *(int *)(this + 0x408) = *(int *)(this + 0x408) + iVar2;
  uVar3 = _V_strlen((char *)(this + 5));
  *(undefined4 *)(this + 0x408) = uVar3;
  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)