L L4D2node

CUtlStreamBuffer::StreamGetOverflow

0x0028d400 · 207 bytes · __thiscall

_ZN16CUtlStreamBuffer17StreamGetOverflowEi

Decompiled

undefined (2 params)

/* CUtlStreamBuffer::StreamGetOverflow(int) */

undefined4 __thiscall CUtlStreamBuffer::StreamGetOverflow(CUtlStreamBuffer *this,int param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  size_t __n;
  
  iVar3 = g_pFullFileSystem;
  if ((this[0x14] == (CUtlStreamBuffer)0x0) && (((byte)this[0x15] & 8) != 0)) {
    iVar1 = *(int *)(this + 0xc);
    if ((param_1 < 0) ||
       ((iVar2 = *(int *)(this + 0x20), iVar1 < iVar2 || (iVar2 + *(int *)(this + 4) < iVar1)))) {
      *(int *)(this + 0x20) = iVar1;
      __n = 0;
      (**(code **)(*(int *)(iVar3 + 4) + 0x10))(iVar3 + 4,*(undefined4 *)(this + 0x38),iVar1,0);
    }
    else {
      __n = (iVar2 - iVar1) + *(int *)(this + 4);
      if ((iVar1 != iVar2) && (0 < (int)__n)) {
        memmove(*(void **)this,(void *)((iVar1 - iVar2) + (int)*(void **)this),__n);
      }
    }
    if (0 < param_1) {
      GrowAllocatedSize(this,param_1);
    }
    iVar3 = ReadBytesFromFile(this,*(int *)(this + 4) - __n,__n);
    if (iVar3 != 0) {
      *(undefined4 *)(this + 0x20) = *(undefined4 *)(this + 0xc);
      return CONCAT31((int3)((uint)*(undefined4 *)(this + 0xc) >> 8),param_1 <= (int)(__n + iVar3));
    }
  }
  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)