//
// sub_9E84E0 from 0x9e84e0 to 0x9e85bc (220 bytes)
//
// 1 xrefs:
// > ??> @ 0xc77ae8
//
// 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:07:25 +0000
//
int __fastcall sub_9E84E0(_DWORD *a1, int a2, int a3, _DWORD *a4)
{
if ( a2 > 12 )
{
if ( a2 == 104 )
{
if ( a1 && a1[4] )
{
if ( a1[3] )
BIO_closesocket(a1[7]);
a1[3] = 0;
a1[5] = 0;
}
a1[7] = *a4;
a1[4] = a3;
a1[3] = 1;
return 1;
}
else
{
if ( a2 != 105 )
return 0;
if ( a1[3] )
{
if ( a4 )
*a4 = a1[7];
return a1[7];
}
else
{
return -1;
}
}
}
else
{
if ( a2 >= 11 )
return 1;
if ( a2 != 8 )
{
if ( a2 == 9 )
{
a1[4] = a3;
return 1;
}
return 0;
}
return a1[4];
}
}