//
// sub_FF6980 from 0xff6980 to 0xff6a14 (148 bytes)
//
// 1 xrefs:
// > ??> @ 0x13ff998
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:15:48 +0000
//
__int64 __fastcall sub_FF6980(__int64 result)
{
__int64 v1; // x19
int v2; // w1
_DWORD *v3; // x20
int v4; // w0
v1 = result;
if ( result )
{
v2 = *(_DWORD *)(result + 28);
result = 1;
v3 = *(_DWORD **)(v1 + 48);
if ( v2 )
{
v4 = *(_DWORD *)(v1 + 40);
if ( v4 != -1 )
{
if ( *v3 == 5 )
{
shutdown(v4, 2);
v4 = *(_DWORD *)(v1 + 40);
}
BIO_closesocket(v4);
*(_DWORD *)(v1 + 40) = -1;
}
BIO_CONNECT_free((__int64)v3);
*(_QWORD *)(v1 + 48) = 0;
*(_DWORD *)(v1 + 32) = 0;
*(_DWORD *)(v1 + 24) = 0;
return 1;
}
}
return result;
}