//
// sub_85BF14 from 0x85bf14 to 0x85bfb4 (160 bytes)
//
// 1 xrefs:
// > ??> @ 0xa39790
//
// 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
//
int __fastcall sub_85BF14(int a1, _DWORD *a2, int a3)
{
signed int i; // r4
int v5; // r6
int v6; // r3
int v8; // r3
int v9; // [sp+4h] [bp-4h] BYREF
v9 = a3;
for ( i = 0; i < OPENSSL_sk_num((int)a2); ++i )
{
v5 = OPENSSL_sk_value(a2, i);
v6 = ASN1_INTEGER_get(v5);
if ( v6 == 5 )
{
v8 = 0;
}
else
{
if ( v6 != 17 )
{
X509V3_add_value_int(0, v5, &v9);
continue;
}
v8 = 1;
}
X509V3_add_value(0, *((_DWORD *)&unk_A39740 + 2 * v8 + 1), &v9);
}
return v9;
}