//
// lws_hdr_fragment_length from 0x6482b8 to 0x6482f8 (64 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall lws_hdr_fragment_length(int *a1, int a2, int a3)
{
int v3; // r4
int v4; // r1
int result; // r0
int v6; // r2
int v7; // r3
v3 = *a1;
v4 = a2 + *a1;
result = *(unsigned __int8 *)(v4 + 988);
if ( *(_BYTE *)(v4 + 988) )
{
if ( a3 )
{
v6 = a3 - 1;
result = *(unsigned __int8 *)(v3 + 6 * result + 8);
if ( !result )
return result;
while ( v6 )
{
v7 = v3 + 6 * result;
--v6;
result = *(unsigned __int8 *)(v7 + 8);
if ( !*(_BYTE *)(v7 + 8) )
return result;
}
}
return *(unsigned __int16 *)(v3 + 6 * result + 6);
}
return result;
}