//
// ssl3_free from 0x9a2d38 to 0x9a2e28 (240 bytes)
//
// 5 xrefs:
// > tls1_free @ 0x9c2c78
// > dtls1_new @ 0x9cac20
// > dtls1_new @ 0x9cac30
// > dtls1_free @ 0x9cacc0
// > ??> @ 0x7470c
//
// 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:06:49 +0000
//
int __fastcall ssl3_free(int result)
{
int v1; // r4
int v2; // r3
int v3; // r0
int v4; // r3
int v5; // r0
v1 = result;
if ( result )
{
if ( *(_DWORD *)(result + 104) )
{
ssl3_cleanup_key_block();
EVP_PKEY_free(*(_DWORD *)(*(_DWORD *)(v1 + 104) + 864));
v2 = *(_DWORD *)(v1 + 104);
v3 = *(_DWORD *)(v2 + 532);
*(_DWORD *)(v2 + 864) = 0;
EVP_PKEY_free(v3);
v4 = *(_DWORD *)(v1 + 104);
v5 = *(_DWORD *)(v4 + 556);
*(_DWORD *)(v4 + 532) = 0;
OPENSSL_sk_pop_free(v5, X509_NAME_free);
CRYPTO_free(*(_DWORD *)(*(_DWORD *)(v1 + 104) + 592), "ssl/s3_lib.c", 2828);
CRYPTO_clear_free(
*(_DWORD *)(*(_DWORD *)(v1 + 104) + 600),
*(_DWORD *)(*(_DWORD *)(v1 + 104) + 604),
"ssl/s3_lib.c",
2829);
CRYPTO_free(*(_DWORD *)(*(_DWORD *)(v1 + 104) + 616), "ssl/s3_lib.c", 2830);
ssl3_free_digest_list(v1);
CRYPTO_free(*(_DWORD *)(*(_DWORD *)(v1 + 104) + 840), "ssl/s3_lib.c", 2832);
CRYPTO_free(*(_DWORD *)(*(_DWORD *)(v1 + 104) + 848), "ssl/s3_lib.c", 2833);
SSL_SRP_CTX_free(v1);
result = CRYPTO_clear_free(*(_DWORD *)(v1 + 104), 868, "ssl/s3_lib.c", 2838);
*(_DWORD *)(v1 + 104) = 0;
}
}
return result;
}