//
// OBJ_NAME_cleanup from 0xdc1684 to 0xdc171c (152 bytes)
//
// 4 xrefs:
// > evp_cleanup_int @ 0xdabcb0
// > evp_cleanup_int @ 0xdabcb8
// > evp_cleanup_int @ 0xdabcc0
// > ??> @ 0xb4078
//
// 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 OBJ_NAME_cleanup(int a1)
{
__int64 result; // x0
__int64 down_load; // x22
result = qword_125F188;
if ( qword_125F188 )
{
dword_125F190 = a1;
down_load = OPENSSL_LH_get_down_load(qword_125F188);
OPENSSL_LH_set_down_load(qword_125F188, 0);
OPENSSL_LH_doall(qword_125F188, sub_DC154C);
if ( a1 < 0 )
{
OPENSSL_LH_free(qword_125F188);
result = OPENSSL_sk_pop_free(qword_125F180, sub_DC0F94);
qword_125F188 = 0;
qword_125F180 = 0;
}
else
{
return OPENSSL_LH_set_down_load(qword_125F188, down_load);
}
}
return result;
}