//
// asn1_enc_free from 0xd7041c to 0xd70488 (108 bytes)
//
// 9 xrefs:
// > asn1_template_free @ 0xd6ea6c
// > asn1_template_free @ 0xd6ec3c
// > asn1_template_free @ 0xd6ee6c
// > asn1_template_free @ 0xd6ef6c
// > ASN1_item_free @ 0xd6f15c
// > ASN1_item_free @ 0xd6f29c
// > ASN1_item_ex_free @ 0xd6f484
// > ASN1_item_ex_free @ 0xd6f59c
// > ??> @ 0x748f8
//
// 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 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;
}