//
// ENGINE_finish from 0xa0beb0 to 0xa0bf34 (132 bytes)
//
// 42 xrefs:
// > sub_854A2C @ 0x854a46
// > sub_854D2C @ 0x854d3a
// > ssl_load_ciphers @ 0x9a85c8
// > ssl_load_ciphers @ 0x9a8648
// > ssl_load_ciphers @ 0x9a86c4
// > ssl_load_ciphers @ 0x9a8738
// > ssl_load_ciphers @ 0x9a87ac
// > SSL_CTX_free @ 0x9ad428
// > SSL_CTX_set_client_cert_engine @ 0x9b37c0
// > d2i_PrivateKey @ 0x9d8710
// > DH_set_method @ 0x9f50b8
// > DH_free @ 0x9f513c
// > DSA_set_method @ 0x9f6a34
// > DSA_free @ 0x9f6ac0
// > EC_KEY_free @ 0x9fd5b4
// > EC_KEY_copy @ 0x9fd71c
// > EC_KEY_set_method @ 0x9fe760
// > sub_A0A9DC @ 0xa0a9ec
// > sub_A0AA14 @ 0xa0add8
// > sub_A0AA14 @ 0xa0ae34
// > EVP_MD_CTX_reset @ 0xa103b4
// > EVP_DigestInit_ex @ 0xa10490
// > EVP_DigestInit_ex @ 0xa106a8
// > EVP_CIPHER_CTX_reset @ 0xa16fe0
// > EVP_PKEY_set_type @ 0xa19d90
// > EVP_PKEY_set_type @ 0xa19dac
// > EVP_PKEY_set_type @ 0xa19e0c
// > EVP_PKEY_set_type_str @ 0xa19fcc
// > EVP_PKEY_set_type_str @ 0xa19fe8
// > EVP_PKEY_set_type_str @ 0xa1a068
// > EVP_PKEY_type @ 0xa1a3d0
// > EVP_PKEY_free @ 0xa1a458
// > EVP_PKEY_CTX_free @ 0xa1bc4c
// > EVP_PKEY_CTX_new @ 0xa1bdc4
// > EVP_PKEY_CTX_new_id @ 0xa1c03c
// > PEM_bytes_read_bio @ 0xa37d78
// > RAND_set_rand_method @ 0xa3ead4
// > RAND_get_rand_method @ 0xa3eb2c
// > RAND_set_rand_engine @ 0xa3eba0
// > RSA_set_method @ 0xa423c4
// > RSA_free @ 0xa42448
// > ??> @ 0x6840c
//
// 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 __fastcall ENGINE_finish(int a1)
{
int v2; // r4
if ( !a1 )
return 1;
CRYPTO_THREAD_write_lock(global_engine_lock);
v2 = engine_unlocked_finish(a1, 1);
CRYPTO_THREAD_unlock(global_engine_lock);
if ( v2 )
return v2;
ERR_put_error(38, 107, 106, "crypto/engine/eng_init.c", 104);
return 0;
}