//
// OBJ_NAME_cleanup from 0xa30a28 to 0xa30aa8 (128 bytes)
//
// 4 xrefs:
// > evp_cleanup_int @ 0xa19970
// > evp_cleanup_int @ 0xa19978
// > evp_cleanup_int @ 0xa19980
// > ??> @ 0x7d48c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:08:04 +0000
//
int __fastcall OBJ_NAME_cleanup(int a1)
{
int result; // r0
int down_load; // r6
result = dword_D35794;
if ( dword_D35794 )
{
dword_D35798 = a1;
down_load = OPENSSL_LH_get_down_load(dword_D35794);
OPENSSL_LH_set_down_load(dword_D35794, 0);
OPENSSL_LH_doall(dword_D35794, (int (__fastcall *)(_DWORD))sub_A308E0);
if ( a1 < 0 )
{
OPENSSL_LH_free((int *)dword_D35794);
result = OPENSSL_sk_pop_free(dword_D35790, sub_A3033C);
dword_D35794 = 0;
dword_D35790 = 0;
}
else
{
return OPENSSL_LH_set_down_load(dword_D35794, down_load);
}
}
return result;
}