L L4D2node

CUtlBuffer::AddNullTermination

0x00b7fd20 · 87 bytes · __thiscall

_ZN10CUtlBuffer18AddNullTerminationEv.part.23

Decompiled

undefined (1 param)

/* CUtlBuffer::AddNullTermination() [clone .part.23] */

void __thiscall CUtlBuffer::AddNullTermination(CUtlBuffer *this)

{
  char cVar1;
  CUtlBuffer *in_EAX;
  int iVar2;
  
  if ((((byte)in_EAX[0x15] & 8) == 0) && (((byte)in_EAX[0x14] & 1) == 0)) {
    cVar1 = CheckPut(in_EAX,1);
    if (cVar1 != '\0') {
      iVar2 = *(int *)(in_EAX + 0x10);
      if (-1 < iVar2 - *(int *)(in_EAX + 0x20)) {
        *(undefined1 *)(*(int *)in_EAX + (iVar2 - *(int *)(in_EAX + 0x20))) = 0;
        *(undefined4 *)(in_EAX + 0x1c) = *(undefined4 *)(in_EAX + 0x10);
        return;
      }
      goto LAB_00b7fd38;
    }
    in_EAX[0x14] = (CUtlBuffer)((byte)in_EAX[0x14] & 0xfe);
  }
  iVar2 = *(int *)(in_EAX + 0x10);
LAB_00b7fd38:
  *(int *)(in_EAX + 0x1c) = iVar2;
  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)