//
// OPENSSL_init_ssl from 0x7b9804 to 0x7b9924 (288 bytes)
//
// 2 xrefs:
// > SSL_CTX_new @ 0x7988b0
// > ??> @ 0x5bf1c
//
// 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
//
bool __fastcall OPENSSL_init_ssl(int a1)
{
if ( !dword_AD2DC4 )
{
if ( OPENSSL_init_crypto(a1 | 0xC)
&& CRYPTO_THREAD_run_once(&unk_AD2DCC, sub_7B9620)
&& dword_AD2DC0
&& ((a1 & 0x100000) == 0 || CRYPTO_THREAD_run_once(&unk_AD2DD0, sub_7B95E4) && dword_AD2DB0) )
{
if ( (a1 & 0x200000) == 0 )
return 1;
if ( CRYPTO_THREAD_run_once(&unk_AD2DD0, sub_7B95FC) )
return dword_AD2DB8 != 0;
}
return 0;
}
if ( dword_AD2DC8 )
return 0;
dword_AD2DC8 = 1;
ERR_put_error(20, 342, 70, "ssl/ssl_init.c", 189);
return 0;
}