//
// ENGINE_new from 0xa0bfac to 0xa0c070 (196 bytes)
//
// 4 xrefs:
// > ENGINE_by_id @ 0xa0cc64
// > engine_load_dynamic_int @ 0xac893c
// > engine_load_openssl_int @ 0xac91b8
// > ??> @ 0x7bddc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:07:43 +0000
//
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;
}