//
// ENGINE_new from 0xd9d394 to 0xd9d468 (212 bytes)
//
// 4 xrefs:
// > ENGINE_by_id @ 0xd9df6c
// > engine_load_dynamic_int @ 0xe5d81c
// > engine_load_openssl_int @ 0xe5dfe0
// > ??> @ 0x4b9d8
//
// 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_new()
{
__int64 v0; // x19
__int64 v2; // x0
if ( (unsigned int)CRYPTO_THREAD_run_once(&engine_lock_init, do_engine_lock_init_ossl_)
&& do_engine_lock_init_ossl_ret_
&& (v0 = CRYPTO_zalloc(192, "crypto/engine/eng_lib.c", 31)) != 0 )
{
*(_DWORD *)(v0 + 156) = 1;
if ( !(unsigned int)CRYPTO_new_ex_data(10, v0, v0 + 168) )
{
v2 = v0;
v0 = 0;
CRYPTO_free(v2, "crypto/engine/eng_lib.c", 38);
}
return v0;
}
else
{
ERR_put_error(38, 122, 65, "crypto/engine/eng_lib.c", 32);
return 0;
}
}