//
// lws_ssl_capable_read_no_ssl from 0xbbd39c to 0xbbd41c (128 bytes)
//
// 4 xrefs:
// > lws_service_fd @ 0xbbccb0
// > sub_BC09A4 @ 0xbc0b68
// > lws_server_socket_service @ 0xbc3b68
// > ??> @ 0x8ba10
//
// 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
//
__int64 __fastcall lws_ssl_capable_read_no_ssl(__int64 a1, void *a2, int a3)
{
unsigned int v3; // w1
_DWORD *v5; // x0
v3 = recv(*(_DWORD *)(a1 + 88), a2, a3, 0);
if ( (v3 & 0x80000000) == 0 )
return v3;
v5 = (_DWORD *)__errno();
if ( *v5 == 11 )
return (unsigned int)-2;
v3 = -2;
if ( *v5 == 4 )
return v3;
lws_log(2, "error on reading from skt\n");
return 0xFFFFFFFFLL;
}