//
// ASN1_dup from 0x1086d7c to 0x1086e48 (204 bytes)
//
// 2 xrefs:
// > GENERAL_NAME_dup @ 0x107bba8
// > ??> @ 0x9f970
//
// 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:17:13 +0000
//
__int64 __fastcall ASN1_dup(
__int64 (__fastcall *a1)(__int64, void **),
__int64 (__fastcall *a2)(_QWORD, void **, _QWORD),
__int64 a3)
{
int v6; // w0
void *v7; // x22
int v8; // w0
__int64 v9; // x19
void *v11; // [xsp+40h] [xbp+40h] BYREF
void *v12; // [xsp+48h] [xbp+48h] BYREF
if ( !a3 )
return 0;
v6 = a1(a3, nullptr);
v7 = CRYPTO_malloc((void *)(v6 + 10), (__int64)"crypto/asn1/a_dup.c", 27);
if ( v7 )
{
v11 = v7;
v8 = a1(a3, &v11);
v12 = v7;
v9 = a2(0, &v12, v8);
CRYPTO_free(v7, (__int64)"crypto/asn1/a_dup.c", 36);
return v9;
}
else
{
ERR_put_error(13, 111, 65, (__int64)"crypto/asn1/a_dup.c", 29);
return 0;
}
}