//
// ASN1_dup from 0x860aa0 to 0x860b58 (184 bytes)
//
// 2 xrefs:
// > GENERAL_NAME_dup @ 0x856d68
// > ??> @ 0x6909c
//
// 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
//
int __fastcall ASN1_dup(int (__fastcall *a1)(int, void **), int (__fastcall *a2)(_DWORD, void **, int), int a3)
{
int v6; // r0
void *v7; // r7
int v8; // r0
int v9; // r4
void *v11; // [sp+8h] [bp-20h] BYREF
void *v12; // [sp+Ch] [bp-1Ch] BYREF
if ( !a3 )
return 0;
v6 = a1(a3, nullptr);
v7 = CRYPTO_malloc((void *)(v6 + 10), (int)"crypto/asn1/a_dup.c", 27);
if ( v7 )
{
v11 = v7;
v8 = a1(a3, &v11);
v12 = v7;
v9 = a2(0, &v12, v8);
CRYPTO_free(v7, (int)"crypto/asn1/a_dup.c", 36);
return v9;
}
else
{
ERR_put_error(13, 111, 65, (int)"crypto/asn1/a_dup.c", 29);
return 0;
}
}