//
// asn1_enc_free from 0x7ca480 to 0x7ca4e8 (104 bytes)
//
// 9 xrefs:
// > asn1_template_free @ 0x7c892c
// > asn1_template_free @ 0x7c8a98
// > asn1_template_free @ 0x7c8c8c
// > asn1_template_free @ 0x7c8da4
// > ASN1_item_free @ 0x7c8f8c
// > ASN1_item_free @ 0x7c90e0
// > ASN1_item_ex_free @ 0x7c92d0
// > ASN1_item_ex_free @ 0x7c93fc
// > ??> @ 0x5eb1c
//
// 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
//
int *__fastcall asn1_enc_free(int *result, int a2)
{
int v2; // r4
int v3; // r3
int v4; // r5
int v5; // r6
if ( result )
{
v2 = *result;
if ( *result )
{
v3 = *(_DWORD *)(a2 + 16);
if ( v3 )
{
if ( (*(_DWORD *)(v3 + 4) & 2) != 0 )
{
v4 = *(_DWORD *)(v3 + 20);
v5 = v2 + v4;
if ( v2 + v4 )
{
result = (int *)CRYPTO_free(*(_DWORD *)(v2 + v4), "crypto/asn1/tasn_utl.c", 119);
*(_DWORD *)(v2 + v4) = 0;
*(_DWORD *)(v5 + 4) = 0;
*(_DWORD *)(v5 + 8) = 1;
}
}
}
}
}
return result;
}