//
// engine_table_cleanup from 0xe5e464 to 0xe5e4b8 (84 bytes)
//
// 10 xrefs:
// > sub_D9E480 @ 0xd9e488
// > sub_D9E9C8 @ 0xd9e9d0
// > sub_D9EBC4 @ 0xd9ebcc
// > sub_D9ECB0 @ 0xd9ecb8
// > sub_D9EEAC @ 0xd9eeb4
// > sub_D9EF98 @ 0xd9efa0
// > sub_D9F084 @ 0xd9f08c
// > sub_D9F318 @ 0xd9f320
// > sub_D9F404 @ 0xd9f40c
// > ??> @ 0x9f768
//
// 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
//
bool __fastcall engine_table_cleanup(__int64 *a1)
{
CRYPTO_THREAD_write_lock((pthread_rwlock_t *)global_engine_lock);
if ( *a1 )
{
OPENSSL_LH_doall(*a1, (__int64 (__fastcall *)(_QWORD))sub_E5E1B4);
OPENSSL_LH_free(*a1);
*a1 = 0;
}
return CRYPTO_THREAD_unlock((pthread_rwlock_t *)global_engine_lock);
}