//
// sub_1050584 from 0x1050584 to 0x1050658 (212 bytes)
//
// 1 xrefs:
// > ??> @ 0x140dca0
//
// 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:16:38 +0000
//
__int64 __fastcall sub_1050584(_QWORD *a1, __int64 a2)
{
int v3; // w0
char **v4; // x0
int v6; // [xsp+28h] [xbp+28h]
v3 = i2d_RSAPrivateKey(*(_QWORD *)(a2 + 32));
if ( v3 <= 0 )
{
ERR_put_error(4, 138, 65, (__int64)"crypto/rsa/rsa_ameth.c", 91);
return 0;
}
else
{
v6 = v3;
v4 = OBJ_nid2obj(6u);
if ( (unsigned int)PKCS8_pkey_set0(a1, (__int64)v4, 0, 5u, 0, 0, v6) )
{
return 1;
}
else
{
ERR_put_error(4, 138, 65, (__int64)"crypto/rsa/rsa_ameth.c", 97);
return 0;
}
}
}