//
// asn1_enc_free from 0x9df080 to 0x9df0e8 (104 bytes)
//
// 9 xrefs:
// > asn1_template_free @ 0x9dd52c
// > asn1_template_free @ 0x9dd698
// > asn1_template_free @ 0x9dd88c
// > asn1_template_free @ 0x9dd9a4
// > ASN1_item_free @ 0x9ddb8c
// > ASN1_item_free @ 0x9ddce0
// > ASN1_item_ex_free @ 0x9dded0
// > ASN1_item_ex_free @ 0x9ddffc
// > ??> @ 0x7859c
//
// 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:07:19 +0000
//
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;
}