//
// ENGINE_get_next from 0xd9d914 to 0xd9d99c (136 bytes)
//
// 13 xrefs:
// > sub_BB8F34 @ 0xbb8f58
// > ENGINE_register_all_complete @ 0xd9d064
// > ENGINE_register_all_complete @ 0xd9d084
// > ENGINE_register_all_pkey_asn1_meths @ 0xd9e600
// > ENGINE_register_all_ciphers @ 0xd9ea88
// > ENGINE_register_all_DH @ 0xd9ec3c
// > ENGINE_register_all_digests @ 0xd9ed70
// > ENGINE_register_all_DSA @ 0xd9ef24
// > ENGINE_register_all_EC @ 0xd9f010
// > ENGINE_register_all_pkey_meths @ 0xd9f144
// > ENGINE_register_all_RAND @ 0xd9f390
// > ENGINE_register_all_RSA @ 0xd9f47c
// > ??> @ 0x886b0
//
// 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 __fastcall ENGINE_get_next(__int64 a1)
{
__int64 v2; // x19
if ( a1 )
{
CRYPTO_THREAD_write_lock(global_engine_lock);
v2 = *(_QWORD *)(a1 + 184);
if ( v2 )
++*(_DWORD *)(v2 + 156);
CRYPTO_THREAD_unlock(global_engine_lock);
ENGINE_free(a1);
return v2;
}
else
{
ERR_put_error(38, 115, 67, "crypto/engine/eng_list.c", 178);
return 0;
}
}