//
// sub_1080B08 from 0x1080b08 to 0x1080bd0 (200 bytes)
//
// 1 xrefs:
// > ??> @ 0x140f0d8
//
// 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:17:10 +0000
//
__int64 __fastcall sub_1080B08(__int64 a1, unsigned int *a2, __int64 a3)
{
int v4; // w19
bool v5; // cc
int v6; // w1
__int64 v7; // x0
__int64 v8; // x3
__int64 v10; // x1
__int64 v11; // [xsp+30h] [xbp+30h]
__int64 v12; // [xsp+38h] [xbp+38h] BYREF
v4 = 0;
v12 = a3;
v5 = (int)OPENSSL_sk_num(a2) > 0;
v6 = 0;
v7 = (__int64)a2;
if ( v5 )
{
while ( 1 )
{
v11 = OPENSSL_sk_value(v7, v6);
v8 = ASN1_INTEGER_get(v11);
if ( v8 == 5 )
break;
if ( v8 == 17 )
{
v10 = 1;
goto LABEL_9;
}
++v4;
X509V3_add_value_int(0, v11, &v12);
LABEL_6:
v5 = v4 < (int)OPENSSL_sk_num(a2);
v6 = v4;
v7 = (__int64)a2;
if ( !v5 )
return v12;
}
v10 = 0;
LABEL_9:
++v4;
X509V3_add_value(0, *((_QWORD *)&unk_140F040 + 2 * v10 + 1), &v12);
goto LABEL_6;
}
return v12;
}