L L4D2node

CBitRead::ReadAndAllocateString

0x0009e090 · 157 bytes · __thiscall

_ZN8CBitRead21ReadAndAllocateStringEPb

Decompiled

undefined (2 params)

/* CBitRead::ReadAndAllocateString(bool*) */

void __thiscall CBitRead::ReadAndAllocateString(CBitRead *this,bool *param_1)

{
  byte bVar1;
  void *pvVar2;
  int iVar3;
  int in_GS_OFFSET;
  int local_814;
  char local_810 [2048];
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  bVar1 = ReadString(this,local_810,0x800,false,&local_814);
  if (param_1 != (bool *)0x0) {
    *param_1 = (bool)(bVar1 ^ 1);
  }
  pvVar2 = operator_new__(local_814 + 1);
  if (-1 < local_814) {
    iVar3 = 0;
    do {
      *(char *)((int)pvVar2 + iVar3) = local_810[iVar3];
      iVar3 = iVar3 + 1;
    } while (iVar3 <= local_814);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)