//
// sub_E5E148 from 0xe5e148 to 0xe5e1b4 (108 bytes)
//
// 2 xrefs:
// > engine_table_unregister @ 0xe5e43c
// > engine_table_unregister @ 0xe5e444
//
// 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 sub_E5E148(__int64 a1, __int64 a2)
{
int v4; // w1
__int64 result; // x0
while ( 1 )
{
v4 = OPENSSL_sk_find(*(_QWORD *)(a1 + 8), a2);
if ( v4 < 0 )
break;
OPENSSL_sk_delete(*(int **)(a1 + 8), v4);
*(_DWORD *)(a1 + 24) = 0;
}
result = *(_QWORD *)(a1 + 16);
if ( result == a2 )
{
result = engine_unlocked_finish(a2, 0);
*(_QWORD *)(a1 + 16) = 0;
}
return result;
}