//
// X509_policy_tree_free from 0xdf3530 to 0xdf35fc (204 bytes)
//
// 7 xrefs:
// > X509_STORE_CTX_cleanup @ 0xded8c0
// > X509_policy_check @ 0xdf3688
// > X509_policy_check @ 0xdf388c
// > X509_policy_check @ 0xdf3af0
// > X509_policy_check @ 0xdf3b58
// > X509_policy_check @ 0xdf3dc0
// > ??> @ 0xacf50
//
// 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
//
void __fastcall X509_policy_tree_free(__int64 a1)
{
int v2; // w20
__int64 *v3; // x19
__int64 v4; // x0
if ( a1 )
{
v2 = 0;
OPENSSL_sk_free(*(void ***)(a1 + 24));
OPENSSL_sk_pop_free(*(int **)(a1 + 32), (void (__fastcall *)(__int64))sub_DF350C);
v3 = *(__int64 **)a1;
if ( *(int *)(a1 + 8) > 0 )
{
do
{
v4 = *v3;
v3 += 4;
++v2;
X509_free(v4);
OPENSSL_sk_pop_free((int *)*(v3 - 3), (void (__fastcall *)(__int64))policy_node_free);
policy_node_free(*(v3 - 2));
}
while ( *(_DWORD *)(a1 + 8) > v2 );
}
OPENSSL_sk_pop_free(*(int **)(a1 + 16), (void (__fastcall *)(__int64))policy_data_free);
CRYPTO_free(*(void **)a1, (__int64)"crypto/x509v3/pcy_tree.c", 622);
CRYPTO_free((void *)a1, (__int64)"crypto/x509v3/pcy_tree.c", 623);
}
}