//
// BIO_new_ssl from 0x99b1c0 to 0x99b234 (116 bytes)
//
// 2 xrefs:
// > BIO_new_ssl_connect @ 0x99b254
// > ??> @ 0x739bc
//
// 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:06:44 +0000
//
int __fastcall BIO_new_ssl(int a1, int a2)
{
void *v4; // r0
int v5; // r4
int v6; // r0
int v7; // r5
v4 = BIO_f_ssl();
v5 = BIO_new(v4);
if ( !v5 )
return 0;
v6 = SSL_new(a1);
v7 = v6;
if ( v6 )
{
if ( a2 )
SSL_set_connect_state(v6);
else
SSL_set_accept_state(v6);
BIO_ctrl(v5, 109, 1, v7);
return v5;
}
else
{
BIO_free(v5);
return 0;
}
}