//
// sub_E2F16C from 0xe2f16c to 0xe2f20c (160 bytes)
//
// 1 xrefs:
// > sub_E309D4 @ 0xe309d4
//
// 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:09:54 +0000
//
__int64 __fastcall sub_E2F16C(__int64 a1, int a2)
{
__int64 v2; // x20
__int64 v4; // x21
__int64 v5; // x19
__int64 result; // x0
v2 = a2;
v4 = a1 + 40LL * a2 + 664;
if ( *(_QWORD *)(a1 + 40LL * a2 + 688) )
{
SSL_shutdown();
SSL_set_connect_state(*(_QWORD *)(v4 + 24));
SSL_free(*(_QWORD *)(v4 + 24));
*(_QWORD *)(v4 + 24) = 0;
}
if ( *(_QWORD *)(v4 + 16) )
{
SSL_CTX_free();
*(_QWORD *)(v4 + 16) = 0;
}
v5 = a1 + 40 * v2 + 744;
if ( *(_QWORD *)(v5 + 24) )
{
SSL_shutdown();
SSL_set_connect_state(*(_QWORD *)(v5 + 24));
SSL_free(*(_QWORD *)(v5 + 24));
*(_QWORD *)(v5 + 24) = 0;
}
result = *(_QWORD *)(v5 + 16);
if ( result )
{
result = SSL_CTX_free();
*(_QWORD *)(v5 + 16) = 0;
}
return result;
}