//
// lws_ssl_capable_read_no_ssl from 0x647a7c to 0x647ac2 (70 bytes)
//
// 2 xrefs:
// > lws_service_fd @ 0x6474de
// > sub_64A4F0 @ 0x64a5dc
//
// 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
//
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;
}