//
// lws_close_reason from 0x856f2c to 0x856f70 (68 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:02:36 +0000
//
_BYTE *__fastcall lws_close_reason(_BYTE *result, __int16 a2, char *a3, int a4)
{
_BYTE *v4; // r1
int v5; // r6
int v6; // r3
char v7; // t1
bool v8; // zf
result[45] = a2;
result[44] = HIBYTE(a2);
v4 = result + 46;
if ( a3 )
{
v5 = a4 - 1;
if ( a4 )
{
if ( v4 < result + 169 )
{
v6 = 0;
do
{
v7 = *a3++;
v8 = v6++ == v5;
*v4++ = v7;
}
while ( !v8 && v4 != result + 169 );
}
}
}
result[174] = (_BYTE)v4 - ((_BYTE)result + 44);
return result;
}