//
// engine_table_cleanup from 0x8b4624 to 0x8b4670 (76 bytes)
//
// 10 xrefs:
// > sub_7F85B8 @ 0x7f85c0
// > sub_7F8A94 @ 0x7f8a9c
// > sub_7F8C78 @ 0x7f8c80
// > sub_7F8DA8 @ 0x7f8db0
// > sub_7F8F8C @ 0x7f8f94
// > sub_7F90BC @ 0x7f90c4
// > sub_7F91EC @ 0x7f91f4
// > sub_7F9454 @ 0x7f945c
// > sub_7F9584 @ 0x7f958c
// > ??> @ 0x625ac
//
// 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(int *a1)
{
CRYPTO_THREAD_write_lock((pthread_rwlock_t *)global_engine_lock);
if ( *a1 )
{
OPENSSL_LH_doall(*a1, (int (__fastcall *)(_DWORD))sub_8B4388);
OPENSSL_LH_free((int *)*a1);
*a1 = 0;
}
return CRYPTO_THREAD_unlock((pthread_rwlock_t *)global_engine_lock);
}