//
// ENGINE_init from 0x7f71c4 to 0x7f7294 (208 bytes)
//
// 19 xrefs:
// > sub_6449AC @ 0x6449d6
// > SSL_CTX_set_client_cert_engine @ 0x79eb3c
// > EVP_PKEY_asn1_find_str @ 0x7c21f0
// > DH_new_method @ 0x7e0628
// > DSA_new_method @ 0x7e1f8c
// > EC_KEY_copy @ 0x7e8c48
// > EC_KEY_new_method @ 0x7e9bec
// > sub_7F5E14 @ 0x7f61a4
// > sub_7F5E14 @ 0x7f6200
// > EVP_DigestInit_ex @ 0x7fb8a0
// > EVP_MD_CTX_copy_ex @ 0x7fbbcc
// > EVP_CipherInit_ex @ 0x802f90
// > EVP_CIPHER_CTX_copy @ 0x80351c
// > EVP_PKEY_CTX_new @ 0x8070a4
// > EVP_PKEY_CTX_dup @ 0x807228
// > EVP_PKEY_CTX_new_id @ 0x807340
// > RAND_set_rand_engine @ 0x829f5c
// > RSA_new_method @ 0x82d950
// > ??> @ 0x554fc
//
// 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 ENGINE_init(_DWORD *a1)
{
int v3; // r4
if ( a1 )
{
if ( CRYPTO_THREAD_run_once(&engine_lock_init, do_engine_lock_init_ossl_) && do_engine_lock_init_ossl_ret_ )
{
CRYPTO_THREAD_write_lock(global_engine_lock);
v3 = engine_unlocked_init(a1);
CRYPTO_THREAD_unlock(global_engine_lock);
return v3;
}
else
{
ERR_put_error(38, 119, 65, "crypto/engine/eng_init.c", 84);
return 0;
}
}
else
{
ERR_put_error(38, 119, 67, "crypto/engine/eng_init.c", 80);
return 0;
}
}