//
// sub_E39224 from 0xe39224 to 0xe392b4 (144 bytes)
//
// 2 xrefs:
// > sub_E31DE0 @ 0xe31e28
// > lws_service_fd @ 0xe32f20
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:09:59 +0000
//
__int64 __fastcall sub_E39224(__int64 a1)
{
char v1; // w3
v1 = *(_BYTE *)(a1 + 112);
if ( (v1 & 2) == 0 )
return 0;
if ( *(_QWORD *)(a1 + 96) )
{
lws_callback_on_writable(a1);
return 0;
}
*(_BYTE *)(a1 + 112) = v1 & 0xFD;
if ( (v1 & 1) != 0 )
{
if ( (unsigned int)sub_E331C0(a1, 0, 1) )
return (unsigned int)-1;
else
return 0;
}
else if ( (unsigned int)sub_E331C0(a1, 1, 0) )
{
return (unsigned int)-1;
}
else
{
return 0;
}
}