//
// lws_plat_set_socket_options from 0x85c0f0 to 0x85c1a2 (178 bytes)
//
// 1 xrefs:
// > sub_85A74C @ 0x85aa02
//
// 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:40 +0000
//
unsigned int __fastcall lws_plat_set_socket_options(_DWORD *a1, int a2)
{
int v2; // r3
int v6; // [sp+Ch] [bp-4h] BYREF
v2 = a1[1153];
v6 = 1;
if ( v2 )
{
if ( setsockopt(a2, 1, 9, &v6, 4) < 0 )
return 1;
v6 = a1[1153];
if ( setsockopt(a2, 6, 4, &v6, 4) < 0 )
return 1;
v6 = a1[1155];
if ( setsockopt(a2, 6, 5, &v6, 4) < 0 )
return 1;
v6 = a1[1154];
if ( setsockopt(a2, 6, 6, &v6, 4) < 0 )
return 1;
}
v6 = 1;
if ( setsockopt(a2, 6, 1, &v6, 4) < 0 )
return 1;
else
return (unsigned int)fcntl(a2, 4, 2048) >> 31;
}