//
// ENGINE_finish from 0x101b5f8 to 0x101b688 (144 bytes)
//
// 44 xrefs:
// > sub_E2EF6C @ 0xe2efb4
// > sub_E2F454 @ 0xe2f46c
// > ssl_load_ciphers @ 0xfbacd0
// > ssl_load_ciphers @ 0xfbad44
// > ssl_load_ciphers @ 0xfbadac
// > ssl_load_ciphers @ 0xfbae18
// > ssl_load_ciphers @ 0xfbae80
// > ssl_load_ciphers @ 0xfbaee4
// > SSL_CTX_free @ 0xfbf738
// > SSL_CTX_set_client_cert_engine @ 0xfc5808
// > d2i_PrivateKey @ 0xfe869c
// > DH_set_method @ 0x100605c
// > DH_free @ 0x10060e8
// > DSA_set_method @ 0x1007a28
// > DSA_free @ 0x1007ab4
// > EC_KEY_free @ 0x100dd58
// > EC_KEY_copy @ 0x100dea8
// > EC_KEY_set_method @ 0x100ee10
// > sub_101A288 @ 0x101a2a0
// > sub_101A2D4 @ 0x101a67c
// > sub_101A2D4 @ 0x101a6c8
// > EVP_MD_CTX_reset @ 0x101fac4
// > EVP_DigestInit_ex @ 0x101fba4
// > EVP_DigestInit_ex @ 0x101fdbc
// > EVP_CIPHER_CTX_reset @ 0x10272f0
// > EVP_PKEY_set_type @ 0x102a460
// > EVP_PKEY_set_type @ 0x102a478
// > EVP_PKEY_set_type @ 0x102a4e4
// > EVP_PKEY_set_type_str @ 0x102a68c
// > EVP_PKEY_set_type_str @ 0x102a6b0
// > EVP_PKEY_set_type_str @ 0x102a728
// > EVP_PKEY_type @ 0x102aae8
// > EVP_PKEY_type @ 0x102ab04
// > EVP_PKEY_free @ 0x102ab88
// > EVP_PKEY_CTX_free @ 0x102c2c8
// > EVP_PKEY_CTX_new @ 0x102c438
// > EVP_PKEY_CTX_new_id @ 0x102c66c
// > PEM_bytes_read_bio @ 0x1046ecc
// > RAND_set_rand_method @ 0x104d95c
// > RAND_get_rand_method @ 0x104d9d0
// > RAND_set_rand_engine @ 0x104da4c
// > RSA_set_method @ 0x1052094
// > RSA_free @ 0x1052120
// > ??> @ 0xc04c0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:16:07 +0000
//
__int64 __fastcall ENGINE_finish(__int64 a1)
{
unsigned int v2; // w19
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;
}