CUtlBuffer::PeekLineLength
0x0004cbd0 · 162 bytes · __thiscall
_ZN10CUtlBuffer14PeekLineLengthEv.part.21
Decompiled
undefined (1 param)
/* CUtlBuffer::PeekLineLength() [clone .part.21] */
int __thiscall CUtlBuffer::PeekLineLength(CUtlBuffer *this)
{
char cVar1;
CUtlBuffer *in_EAX;
char *pcVar2;
int iVar3;
int iVar4;
int local_20 [4];
iVar4 = 0;
do {
local_20[0] = 0x80;
cVar1 = CheckArbitraryPeekGet(in_EAX,iVar4,local_20);
if (cVar1 == '\0') {
iVar3 = 0;
if (iVar4 != 0) {
iVar3 = iVar4 + 1;
}
return iVar3;
}
pcVar2 = (char *)(((*(int *)(in_EAX + 0xc) + iVar4) - *(int *)(in_EAX + 0x20)) + *(int *)in_EAX)
;
if (0 < local_20[0]) {
cVar1 = *pcVar2;
if ((cVar1 == '\r') || (cVar1 == '\n')) {
iVar3 = 0;
LAB_0004cc48:
return iVar4 + 2 + iVar3;
}
if (cVar1 == '\0') {
iVar3 = 0;
LAB_0004cc60:
return iVar4 + 1 + iVar3;
}
iVar3 = 0;
while (iVar3 = iVar3 + 1, iVar3 != local_20[0]) {
cVar1 = pcVar2[iVar3];
if ((cVar1 == '\r') || (cVar1 == '\n')) goto LAB_0004cc48;
if (cVar1 == '\0') goto LAB_0004cc60;
}
}
iVar4 = iVar4 + local_20[0];
} while( true );
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.