//
// ENGINE_new from 0x7f73ac to 0x7f7470 (196 bytes)
//
// 4 xrefs:
// > ENGINE_by_id @ 0x7f8064
// > engine_load_dynamic_int @ 0x8b393c
// > engine_load_openssl_int @ 0x8b41b8
// > ??> @ 0x6235c
//
// 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_new()
{
int v0; // r0
int v1; // r4
int v2; // r6
int result; // r0
if ( CRYPTO_THREAD_run_once(&engine_lock_init, do_engine_lock_init_ossl_)
&& do_engine_lock_init_ossl_ret_
&& (v0 = CRYPTO_zalloc(100, "crypto/engine/eng_lib.c", 31), (v1 = v0) != 0) )
{
*(_DWORD *)(v0 + 80) = 1;
v2 = CRYPTO_new_ex_data(10, v0, v0 + 88);
result = v1;
if ( !v2 )
{
CRYPTO_free(v1, "crypto/engine/eng_lib.c", 38);
return 0;
}
}
else
{
ERR_put_error(38, 122, 65, "crypto/engine/eng_lib.c", 32);
return 0;
}
return result;
}