//
// d2i_DSA_PUBKEY from 0x1070680 to 0x1070710 (144 bytes)
//
// 6 xrefs:
// > ??> @ 0x9fce8
// > PEM_read_bio_DSA_PUBKEY @ 0x1044940
// > PEM_read_DSA_PUBKEY @ 0x104496c
// > d2i_DSA_PUBKEY_fp @ 0x106e520
// > d2i_DSA_PUBKEY_bio @ 0x106e580
// > ??> @ 0x15446f0
//
// 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:00 +0000
//
__int64 __fastcall d2i_DSA_PUBKEY(__int64 *a1, char **a2, __int64 a3)
{
__int64 v5; // x0
__int64 v6; // x21
__int64 v7; // x19
char *v9; // [xsp+38h] [xbp+38h] BYREF
v9 = *a2;
v5 = d2i_PUBKEY(nullptr, &v9, a3);
v6 = v5;
if ( !v5 )
return 0;
v7 = EVP_PKEY_get1_DSA(v5);
EVP_PKEY_free(v6);
if ( !v7 )
return 0;
*a2 = v9;
if ( !a1 )
return v7;
DSA_free(*a1);
*a1 = v7;
return v7;
}