//
// OBJ_NAME_cleanup from 0x103f9e4 to 0x103fa7c (152 bytes)
//
// 4 xrefs:
// > evp_cleanup_int @ 0x102a010
// > evp_cleanup_int @ 0x102a018
// > evp_cleanup_int @ 0x102a020
// > ??> @ 0xeb498
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:16:29 +0000
//
__int64 __fastcall OBJ_NAME_cleanup(int a1)
{
__int64 result; // x0
__int64 down_load; // x22
result = qword_1567F88;
if ( qword_1567F88 )
{
dword_1567F90 = a1;
down_load = OPENSSL_LH_get_down_load(qword_1567F88);
OPENSSL_LH_set_down_load(qword_1567F88, 0);
OPENSSL_LH_doall(qword_1567F88, sub_103F8AC);
if ( a1 < 0 )
{
OPENSSL_LH_free(qword_1567F88);
result = OPENSSL_sk_pop_free(qword_1567F80, sub_103F2F4);
qword_1567F88 = 0;
qword_1567F80 = 0;
}
else
{
return OPENSSL_LH_set_down_load(qword_1567F88, down_load);
}
}
return result;
}