//
// lws_hdr_total_length from 0x6482f8 to 0x648320 (40 bytes)
//
// 6 xrefs:
// > lws_hdr_copy @ 0x64839a
// > sub_6484C8 @ 0x648744
// > sub_6484C8 @ 0x648a66
// > sub_649A5C @ 0x649aa0
// > sub_649A5C @ 0x649c58
// > sub_649A5C @ 0x649c6e
//
// 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_total_length(int *a1, int a2)
{
int v2; // r4
int v3; // r1
int v4; // r3
int result; // r0
int v6; // r2
v2 = *a1;
v3 = a2 + *a1;
v4 = *(unsigned __int8 *)(v3 + 988);
result = v4;
if ( *(_BYTE *)(v3 + 988) )
{
result = 0;
do
{
v6 = v2 + 6 * v4;
v4 = *(unsigned __int8 *)(v6 + 8);
result += *(unsigned __int16 *)(v6 + 6);
}
while ( *(_BYTE *)(v6 + 8) );
}
return result;
}