//
// ENGINE_get_first from 0xd9d7cc to 0xd9d870 (164 bytes)
//
// 12 xrefs:
// > sub_BB8F34 @ 0xbb8f44
// > ENGINE_register_all_complete @ 0xd9d050
// > ENGINE_register_all_pkey_asn1_meths @ 0xd9e5e8
// > ENGINE_register_all_ciphers @ 0xd9ea70
// > ENGINE_register_all_DH @ 0xd9ec24
// > ENGINE_register_all_digests @ 0xd9ed58
// > ENGINE_register_all_DSA @ 0xd9ef0c
// > ENGINE_register_all_EC @ 0xd9eff8
// > ENGINE_register_all_pkey_meths @ 0xd9f12c
// > ENGINE_register_all_RAND @ 0xd9f378
// > ENGINE_register_all_RSA @ 0xd9f464
// > ??> @ 0xc2a30
//
// 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
//
__int64 ENGINE_get_first()
{
__int64 v0; // x19
if ( (unsigned int)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);
v0 = qword_125D600;
if ( qword_125D600 )
++*(_DWORD *)(qword_125D600 + 156);
CRYPTO_THREAD_unlock(global_engine_lock);
return v0;
}
else
{
ERR_put_error(38, 195, 65, "crypto/engine/eng_list.c", 140);
return 0;
}
}