//
// ENGINE_get_first from 0x7f782c to 0x7f78d4 (168 bytes)
//
// 12 xrefs:
// > sub_644A78 @ 0x644a7a
// > ENGINE_register_all_complete @ 0x7f7064
// > ENGINE_register_all_pkey_asn1_meths @ 0x7f8700
// > ENGINE_register_all_ciphers @ 0x7f8b38
// > ENGINE_register_all_DH @ 0x7f8cfc
// > ENGINE_register_all_digests @ 0x7f8e4c
// > ENGINE_register_all_DSA @ 0x7f9010
// > ENGINE_register_all_EC @ 0x7f9140
// > ENGINE_register_all_pkey_meths @ 0x7f9290
// > ENGINE_register_all_RAND @ 0x7f94d8
// > ENGINE_register_all_RSA @ 0x7f9608
// > ??> @ 0x5552c
//
// 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 ENGINE_get_first()
{
int v0; // r0
int v1; // r4
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);
v0 = global_engine_lock;
v1 = dword_AD2E84;
if ( dword_AD2E84 )
++*(_DWORD *)(dword_AD2E84 + 80);
CRYPTO_THREAD_unlock(v0);
return v1;
}
else
{
ERR_put_error(38, 195, 65, "crypto/engine/eng_list.c", 140);
return 0;
}
}