//
// sub_785A5C from 0x785a5c to 0x785aec (144 bytes)
//
// 1 xrefs:
// > ??> @ 0xa2ee90
//
// 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
//
int __fastcall sub_785A5C(int a1)
{
_DWORD *data; // r5
if ( !a1 )
return 0;
data = (_DWORD *)BIO_get_data();
if ( *data )
SSL_shutdown(*data);
if ( BIO_get_shutdown(a1) )
{
if ( BIO_get_init(a1) )
SSL_free(*data);
BIO_clear_flags(a1, -1);
BIO_set_init(a1, 0);
}
CRYPTO_free(data, "ssl/bio_ssl.c", 85);
return 1;
}