//
// ENGINE_finish from 0x7f72b0 to 0x7f7334 (132 bytes)
//
// 42 xrefs:
// > sub_6449AC @ 0x6449c6
// > sub_644CAC @ 0x644cba
// > ssl_load_ciphers @ 0x7939c4
// > ssl_load_ciphers @ 0x793a44
// > ssl_load_ciphers @ 0x793ac0
// > ssl_load_ciphers @ 0x793b34
// > ssl_load_ciphers @ 0x793ba8
// > SSL_CTX_free @ 0x798824
// > SSL_CTX_set_client_cert_engine @ 0x79ebbc
// > d2i_PrivateKey @ 0x7c3b10
// > DH_set_method @ 0x7e04b8
// > DH_free @ 0x7e053c
// > DSA_set_method @ 0x7e1e34
// > DSA_free @ 0x7e1ec0
// > EC_KEY_free @ 0x7e89b4
// > EC_KEY_copy @ 0x7e8b1c
// > EC_KEY_set_method @ 0x7e9b60
// > sub_7F5DDC @ 0x7f5dec
// > sub_7F5E14 @ 0x7f61d8
// > sub_7F5E14 @ 0x7f6234
// > EVP_MD_CTX_reset @ 0x7fb7b4
// > EVP_DigestInit_ex @ 0x7fb890
// > EVP_DigestInit_ex @ 0x7fbaa8
// > EVP_CIPHER_CTX_reset @ 0x8023e0
// > EVP_PKEY_set_type @ 0x805190
// > EVP_PKEY_set_type @ 0x8051ac
// > EVP_PKEY_set_type @ 0x80520c
// > EVP_PKEY_set_type_str @ 0x8053cc
// > EVP_PKEY_set_type_str @ 0x8053e8
// > EVP_PKEY_set_type_str @ 0x805468
// > EVP_PKEY_type @ 0x8057d0
// > EVP_PKEY_free @ 0x805858
// > EVP_PKEY_CTX_free @ 0x80704c
// > EVP_PKEY_CTX_new @ 0x8071c4
// > EVP_PKEY_CTX_new_id @ 0x80743c
// > PEM_bytes_read_bio @ 0x823178
// > RAND_set_rand_method @ 0x829ed4
// > RAND_get_rand_method @ 0x829f2c
// > RAND_set_rand_engine @ 0x829fa0
// > RSA_set_method @ 0x82d7c4
// > RSA_free @ 0x82d848
// > ??> @ 0x554dc
//
// 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 __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;
}