//
// OPENSSL_cleanup from 0x80ac28 to 0x80ad94 (364 bytes)
//
// 3 xrefs:
// > ??> @ 0x640ac
// > sub_80AB64 @ 0x80ab84
// > ??> @ 0xab8628
//
// 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
//
void OPENSSL_cleanup()
{
_DWORD *local; // r5
int v1; // r0
int v2; // r4
int v3; // r5
int v4; // r0
int v5; // r0
if ( dword_AD4484 && !dword_AD448C )
{
dword_AD448C = 1;
local = (_DWORD *)CRYPTO_THREAD_get_local(&unk_AD447C);
v1 = CRYPTO_THREAD_set_local(&unk_AD447C, 0);
if ( local )
{
if ( *local )
ASYNC_cleanup_thread();
if ( local[1] )
err_delete_thread_state();
v1 = CRYPTO_free(local, "crypto/init.c", 339);
}
v2 = dword_AD4490;
if ( dword_AD4490 )
{
do
{
(*(void (__fastcall **)(int))v2)(v1);
v3 = *(_DWORD *)(v2 + 4);
v1 = CRYPTO_free(v2, "crypto/init.c", 398);
v2 = v3;
}
while ( v3 );
}
dword_AD4490 = 0;
CRYPTO_THREAD_lock_free(dword_AD4480);
if ( dword_AD443C )
comp_zlib_cleanup_int();
if ( dword_AD4454 )
async_deinit();
if ( dword_AD4474 )
err_free_strings_int();
v4 = CRYPTO_THREAD_cleanup_local(&unk_AD447C);
rand_cleanup_int(v4);
conf_modules_free_int();
engine_cleanup_int();
crypto_cleanup_all_ex_data_int();
bio_cleanup();
v5 = evp_cleanup_int();
obj_cleanup_int(v5);
err_cleanup();
dword_AD4484 = 0;
}
}