//
// sub_101974C from 0x101974c to 0x1019890 (324 bytes)
//
// 1 xrefs:
// > ??> @ 0x14008f8
//
// 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:06 +0000
//
__int64 __fastcall sub_101974C(_QWORD *a1, __int64 a2)
{
__int64 v3; // x1
int v4; // w20
__int64 v5; // x0
__int64 v7; // [xsp+30h] [xbp+30h] BYREF
int v8; // [xsp+38h] [xbp+38h] BYREF
__int64 v9; // [xsp+40h] [xbp+40h]
__int64 v10; // [xsp+48h] [xbp+48h]
v7 = 0;
v3 = *(_QWORD *)(a2 + 32);
if ( v3 && *(_QWORD *)(v3 + 32) )
{
v9 = *(_QWORD *)(v3 + 32);
v10 = 0;
v8 = 32;
v4 = i2d_ASN1_OCTET_STRING((__int64)&v8, &v7);
if ( v4 < 0 )
{
ERR_put_error(16, 267, 65, "crypto/ec/ecx_meth.c", 181);
return 0;
}
else
{
v5 = OBJ_nid2obj(1034);
if ( (unsigned int)PKCS8_pkey_set0(a1, v5, 0, 0xFFFFFFFF, 0, v7, v4) )
{
return 1;
}
else
{
CRYPTO_clear_free(v7, v4, "crypto/ec/ecx_meth.c", 187);
ERR_put_error(16, 267, 65, "crypto/ec/ecx_meth.c", 188);
return 0;
}
}
}
else
{
ERR_put_error(16, 267, 123, "crypto/ec/ecx_meth.c", 171);
return 0;
}
}