//
// ssl3_free from 0xfb5c88 to 0xfb5d80 (248 bytes)
//
// 4 xrefs:
// > tls1_free @ 0xfd3a38
// > dtls1_new @ 0xfdb1cc
// > dtls1_free @ 0xfdb278
// > ??> @ 0x87d18
//
// 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:15:14 +0000
//
__int64 __fastcall ssl3_free(__int64 result)
{
__int64 v1; // x19
__int64 v2; // x1
__int64 v3; // x0
__int64 v4; // x0
v1 = result;
if ( result )
{
if ( *(_QWORD *)(result + 144) )
{
ssl3_cleanup_key_block();
EVP_PKEY_free(*(_QWORD *)(*(_QWORD *)(v1 + 144) + 1016LL));
v2 = *(_QWORD *)(v1 + 144);
v3 = *(_QWORD *)(v2 + 560);
*(_QWORD *)(v2 + 1016) = 0;
EVP_PKEY_free(v3);
v4 = *(_QWORD *)(v1 + 144);
*(_QWORD *)(v4 + 560) = 0;
OPENSSL_sk_pop_free(*(_QWORD *)(v4 + 592), X509_NAME_free);
CRYPTO_free(*(_QWORD *)(*(_QWORD *)(v1 + 144) + 656LL), "ssl/s3_lib.c", 2828);
CRYPTO_clear_free(
*(_QWORD *)(*(_QWORD *)(v1 + 144) + 672LL),
*(_QWORD *)(*(_QWORD *)(v1 + 144) + 680LL),
"ssl/s3_lib.c",
2829);
CRYPTO_free(*(_QWORD *)(*(_QWORD *)(v1 + 144) + 704LL), "ssl/s3_lib.c", 2830);
ssl3_free_digest_list(v1);
CRYPTO_free(*(_QWORD *)(*(_QWORD *)(v1 + 144) + 976LL), "ssl/s3_lib.c", 2832);
CRYPTO_free(*(_QWORD *)(*(_QWORD *)(v1 + 144) + 992LL), "ssl/s3_lib.c", 2833);
SSL_SRP_CTX_free(v1);
result = CRYPTO_clear_free(*(_QWORD *)(v1 + 144), 1024, "ssl/s3_lib.c", 2838);
*(_QWORD *)(v1 + 144) = 0;
}
}
return result;
}