//
// asn1_enc_free from 0xfee77c to 0xfee7e8 (108 bytes)
//
// 9 xrefs:
// > asn1_template_free @ 0xfecdcc
// > asn1_template_free @ 0xfecf9c
// > asn1_template_free @ 0xfed1cc
// > asn1_template_free @ 0xfed2cc
// > ASN1_item_free @ 0xfed4bc
// > ASN1_item_free @ 0xfed5fc
// > ASN1_item_ex_free @ 0xfed7e4
// > ASN1_item_ex_free @ 0xfed8fc
// > ??> @ 0x9c5f8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:15:44 +0000
//
__int64 __fastcall asn1_enc_free(__int64 result, __int64 a2)
{
__int64 v2; // x19
__int64 v3; // x20
__int64 v4; // x21
if ( result )
{
v2 = *(_QWORD *)result;
if ( *(_QWORD *)result )
{
result = *(_QWORD *)(a2 + 32);
if ( result )
{
if ( (*(_DWORD *)(result + 8) & 2) != 0 )
{
v3 = *(int *)(result + 32);
v4 = v2 + v3;
if ( v2 + v3 )
{
CRYPTO_free(*(_QWORD *)(v2 + v3), "crypto/asn1/tasn_utl.c", 119);
*(_QWORD *)(v2 + v3) = 0;
*(_QWORD *)(v4 + 8) = 0;
*(_DWORD *)(v4 + 16) = 1;
return 1;
}
}
}
}
}
return result;
}