//
// sub_E027C8 from 0xe027c8 to 0xe02890 (200 bytes)
//
// 1 xrefs:
// > ??> @ 0x1131b48
//
// 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 sub_E027C8(__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_1131AB0 + 2 * v10 + 1), &v12);
goto LABEL_6;
}
return v12;
}