//
// ASN1_dup from 0xe08a7c to 0xe08b48 (204 bytes)
//
// 2 xrefs:
// > GENERAL_NAME_dup @ 0xdfd868
// > ??> @ 0x772f8
//
// 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_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;
}
}