//
// i2d_PUBKEY from 0x1070510 to 0x1070570 (96 bytes)
//
// 10 xrefs:
// > CTLOG_new @ 0x1001268
// > i2d_RSA_PUBKEY @ 0x1070638
// > i2d_DSA_PUBKEY @ 0x1070748
// > i2d_EC_PUBKEY @ 0x1070858
// > ??> @ 0xabee0
// > PEM_write_bio_PUBKEY @ 0x10450bc
// > PEM_write_PUBKEY @ 0x1045108
// > i2d_PUBKEY_fp @ 0x106e85c
// > i2d_PUBKEY_bio @ 0x106e940
// > ??> @ 0x1544dd8
//
// 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 i2d_PUBKEY(__int64 a1, __int64 *a2)
{
unsigned int v4; // w19
__int64 v5; // [xsp+28h] [xbp+28h] BYREF
v5 = 0;
if ( !a1 || !(unsigned int)X509_PUBKEY_set((__int64)&v5, a1) )
return 0;
v4 = i2d_X509_PUBKEY(v5, a2);
X509_PUBKEY_free(v5);
return v4;
}