//
// ssl_cert_clear_certs from 0xd39f00 to 0xd39f84 (132 bytes)
//
// 3 xrefs:
// > ssl_cert_free @ 0xd39fd8
// > SSL_certs_clear @ 0xd3f660
// > ??> @ 0xa7220
//
// 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 ssl_cert_clear_certs(__int64 result)
{
__int64 *v1; // x19
__int64 *v2; // x20
__int64 v3; // x0
if ( result )
{
v1 = (__int64 *)(result + 32);
v2 = (__int64 *)(result + 312);
do
{
v3 = *v1;
v1 += 5;
X509_free(v3);
*(v1 - 5) = 0;
EVP_PKEY_free(*(v1 - 4));
*(v1 - 4) = 0;
OPENSSL_sk_pop_free(*(v1 - 3), X509_free);
*(v1 - 3) = 0;
result = CRYPTO_free(*(v1 - 2), "ssl/ssl_cert.c", 225);
*(v1 - 2) = 0;
*(v1 - 1) = 0;
}
while ( v1 != v2 );
}
return result;
}