//
// OPENSSL_init_ssl from 0xd60264 to 0xd60360 (252 bytes)
//
// 2 xrefs:
// > SSL_CTX_new @ 0xd41458
// > ??> @ 0x8a738
//
// 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(__int64 a1)
{
int v1; // w21
v1 = a1;
if ( !dword_125D4E4 )
{
if ( (unsigned int)OPENSSL_init_crypto(a1 | 0xC)
&& (unsigned int)CRYPTO_THREAD_run_once(&unk_125D4EC, sub_D60094)
&& dword_125D4E0
&& ((v1 & 0x100000) == 0 || (unsigned int)CRYPTO_THREAD_run_once(&unk_125D4F0, sub_D6005C) && dword_125D4D0) )
{
if ( (v1 & 0x200000) == 0 )
return 1;
if ( (unsigned int)CRYPTO_THREAD_run_once(&unk_125D4F0, sub_D6006C) )
return dword_125D4D8 != 0;
}
return 0;
}
if ( dword_125D4E8 )
return 0;
dword_125D4E8 = 1;
ERR_put_error(20, 342, 70, "ssl/ssl_init.c", 189);
return 0;
}