//
// OPENSSL_thread_stop from 0x80adbc to 0x80ae34 (120 bytes)
//
// 1 xrefs:
// > ??> @ 0x640dc
//
// 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 OPENSSL_thread_stop()
{
_DWORD *local; // r5
int result; // r0
local = (_DWORD *)CRYPTO_THREAD_get_local(&unk_AD447C);
result = CRYPTO_THREAD_set_local(&unk_AD447C, 0);
if ( local )
{
if ( *local )
{
ASYNC_cleanup_thread();
if ( !local[1] )
return CRYPTO_free(local, "crypto/init.c", 339);
}
else if ( !local[1] )
{
return CRYPTO_free(local, "crypto/init.c", 339);
}
err_delete_thread_state();
return CRYPTO_free(local, "crypto/init.c", 339);
}
return result;
}