L L4D2node

old_bf_read::ReadWString

0x00b67a00 · 138 bytes · __thiscall

_ZN11old_bf_read11ReadWStringEPwibPi

Decompiled

undefined (5 params)

/* old_bf_read::ReadWString(wchar_t*, int, bool, int*) */

uint __thiscall
old_bf_read::ReadWString(old_bf_read *this,wchar_t *param_1,int param_2,bool param_3,int *param_4)

{
  wchar_t wVar1;
  uint uVar2;
  int iVar3;
  uint uVar4;
  
  uVar4 = 0;
  iVar3 = 0;
  while (wVar1 = ReadSBitLong(this,0x10), wVar1 != L'\0') {
    if (wVar1 == L'\n') {
      if (param_3) break;
      if (param_2 + -1 <= iVar3) goto LAB_00b67a32;
LAB_00b67a88:
      param_1[iVar3] = wVar1;
      iVar3 = iVar3 + 1;
    }
    else {
      if (iVar3 < param_2 + -1) goto LAB_00b67a88;
LAB_00b67a32:
      uVar4 = 1;
    }
  }
  param_1[iVar3] = L'\0';
  if (param_4 != (int *)0x0) {
    *param_4 = iVar3;
  }
  uVar2 = 0;
  if (this[0x10] == (old_bf_read)0x0) {
    uVar2 = uVar4 ^ 1;
  }
  return uVar2;
}

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)