//
// sub_DFEB18 from 0xdfeb18 to 0xdfec78 (352 bytes)
//
// 4 xrefs:
// > NAME_CONSTRAINTS_check @ 0xdfeed4
// > NAME_CONSTRAINTS_check @ 0xdfef10
// > NAME_CONSTRAINTS_check @ 0xdfef50
// > NAME_CONSTRAINTS_check_CN @ 0xdff058
//
// 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_DFEB18(_DWORD *a1, unsigned int **a2)
{
int v4; // w22
int v5; // w19
int v6; // w0
int v7; // w1
__int64 *v8; // x0
int v9; // w0
int v10; // w19
__int64 result; // x0
bool v12; // cc
int v13; // w1
__int64 *v14; // x0
v4 = 0;
v5 = 0;
v6 = OPENSSL_sk_num(*a2);
v7 = 0;
if ( v6 > 0 )
{
do
{
v8 = (__int64 *)OPENSSL_sk_value((__int64)*a2, v7);
if ( *a1 == *(_DWORD *)*v8 )
{
if ( v8[1] || v8[2] )
return 49;
if ( v4 == 2 )
goto LABEL_22;
if ( !v4 )
v4 = 1;
result = sub_DFE77C((__int64)a1, *v8);
if ( !(_DWORD)result )
{
LABEL_22:
v4 = 2;
++v5;
}
else
{
if ( (_DWORD)result != 47 )
return result;
++v5;
}
}
else
{
++v5;
}
v9 = OPENSSL_sk_num(*a2);
v7 = v5;
}
while ( v5 < v9 );
}
v10 = 0;
result = 47;
if ( v4 != 1 )
{
while ( 1 )
{
do
{
v12 = v10 < (int)OPENSSL_sk_num(a2[1]);
v13 = v10++;
if ( !v12 )
return 0;
v14 = (__int64 *)OPENSSL_sk_value((__int64)a2[1], v13);
}
while ( *a1 != *(_DWORD *)*v14 );
if ( v14[1] || v14[2] )
return 49;
result = sub_DFE77C((__int64)a1, *v14);
if ( !(_DWORD)result )
break;
if ( (_DWORD)result != 47 )
return result;
}
return 48;
}
return result;
}