//
// sub_1050A8C from 0x1050a8c to 0x1050b68 (220 bytes)
//
// 2 xrefs:
// > sub_1050B68 @ 0x1050c60
// > sub_1051350 @ 0x1051800
//
// 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:39 +0000
//
bool __fastcall sub_1050A8C(__int64 *a1, unsigned int *a2)
{
bool v4; // zf
_BOOL8 result; // x0
__int64 *v6; // x0
__int64 v7; // x21
__int64 v8; // x0
__int64 *v9; // x19
char **v10; // x0
__int64 v11; // x0
__int64 v12; // [xsp+38h] [xbp+38h] BYREF
v12 = 0;
*a1 = 0;
v4 = (unsigned int)EVP_MD_type(a2) == 64;
result = 1;
if ( !v4 )
{
if ( (unsigned int)EVP_MD_type(a2) == 64 )
{
v7 = 0;
}
else
{
v6 = (__int64 *)X509_ALGOR_new();
v7 = (__int64)v6;
if ( !v6 )
goto LABEL_8;
X509_ALGOR_set_md(v6, (__int64)a2);
}
if ( ASN1_item_pack(v7, X509_ALGOR_it, &v12) )
{
v8 = X509_ALGOR_new();
*a1 = v8;
v9 = (__int64 *)v8;
if ( v8 )
{
v10 = OBJ_nid2obj(0x38Fu);
X509_ALGOR_set0(v9, (__int64)v10, 0x10u, v12);
v12 = 0;
v11 = 0;
LABEL_9:
ASN1_STRING_free(v11);
X509_ALGOR_free(v7);
return *a1 != 0;
}
}
LABEL_8:
v11 = v12;
goto LABEL_9;
}
return result;
}