//
// lws_ssl_capable_read_no_ssl from 0x857afc to 0x857b42 (70 bytes)
//
// 2 xrefs:
// > lws_service_fd @ 0x85755e
// > sub_85A570 @ 0x85a65c
//
// 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:37 +0000
//
ssize_t __fastcall lws_ssl_capable_read_no_ssl(int a1, void *a2, size_t a3)
{
ssize_t result; // r0
result = recv(*(_DWORD *)(a1 + 228), a2, a3, 0);
if ( result < 0 )
{
if ( *(_DWORD *)_errno() == 11 || *(_DWORD *)_errno() == 11 || *(_DWORD *)_errno() == 4 )
{
return -2;
}
else
{
lws_log(2, "error on reading from skt\n");
return -1;
}
}
return result;
}