//
// ENGINE_get_next from 0x7f79b8 to 0x7f7a30 (120 bytes)
//
// 13 xrefs:
// > sub_644A78 @ 0x644a8a
// > ENGINE_register_all_complete @ 0x7f7078
// > ENGINE_register_all_complete @ 0x7f709c
// > ENGINE_register_all_pkey_asn1_meths @ 0x7f8718
// > ENGINE_register_all_ciphers @ 0x7f8b50
// > ENGINE_register_all_DH @ 0x7f8d14
// > ENGINE_register_all_digests @ 0x7f8e64
// > ENGINE_register_all_DSA @ 0x7f9028
// > ENGINE_register_all_EC @ 0x7f9158
// > ENGINE_register_all_pkey_meths @ 0x7f92a8
// > ENGINE_register_all_RAND @ 0x7f94f0
// > ENGINE_register_all_RSA @ 0x7f9620
// > ??> @ 0x5553c
//
// 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_get_next(int a1)
{
int v2; // r4
int v3; // r0
if ( a1 )
{
CRYPTO_THREAD_write_lock(global_engine_lock);
v2 = *(_DWORD *)(a1 + 96);
v3 = global_engine_lock;
if ( v2 )
++*(_DWORD *)(v2 + 80);
CRYPTO_THREAD_unlock(v3);
ENGINE_free(a1);
return v2;
}
else
{
ERR_put_error(38, 115, 67, "crypto/engine/eng_list.c", 178);
return 0;
}
}