//
// PKCS8_pkey_set0 from 0xd6a63c to 0xd6a6dc (160 bytes)
//
// 6 xrefs:
// > sub_D85A44 @ 0xd85afc
// > sub_D888D0 @ 0xd8897c
// > sub_D8C51C @ 0xd8c62c
// > sub_D9B3EC @ 0xd9b45c
// > sub_DD2224 @ 0xdd227c
// > ??> @ 0xc8fa0
//
// 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 PKCS8_pkey_set0(_QWORD *a1, __int64 a2, int a3, unsigned int a4, __int64 a5, __int64 a6, int a7)
{
int v11; // w0
__int64 v13; // [xsp+30h] [xbp+30h]
unsigned int v14; // [xsp+38h] [xbp+38h]
if ( (a3 & 0x80000000) == 0 )
{
v13 = a5;
v14 = a4;
v11 = ASN1_INTEGER_set(*a1, a3);
a4 = v14;
a5 = v13;
if ( !v11 )
return 0;
}
if ( !(unsigned int)X509_ALGOR_set0(a1[1], a2, a4, a5) )
return 0;
if ( a6 )
ASN1_STRING_set0(a1[2], a6, a7);
return 1;
}