FilterEvalStrict
NTSTATUS __fastcall FilterEvalStrict(
INT64 a1,
INT64 *GetPropertyCallback,
VOID *a3,
const _DEVPROPCOMPKEY *a4,
UINT64 *a5,
UINT64 *a6,
UINT8 **a7,
VOID *GetPropertyCallbackContext,
UINT64 FilterLength,
const _DEVPROP_FILTER_EXPRESSION *Filter,
INT64 *Result){
int v12;
unsigned int v14;
UINT64 *v15;
NTSTATUS result;
__int64 v17;
NTSTATUS v18;
char *p_LocaleName;
NTSTATUS v20;
int v21;
unsigned int v22;
UINT64 v23;
UINT8 *v24;
UINT64 v25;
__int64 v26;
int v27;
int v28;
bool v29;
unsigned int v30;
unsigned int v31;
UINT64 PropertyTypeB;
UINT64 PropertyTypeBa;
UINT64 *PropertyBufferB;
UINT8 **BufferSizeB;
INT64 *v36;
UINT64 PropertyTypeA;
__int64 v38;
INT64 *v39;
UINT8 *PropertyBufferA;
char *v41;
UINT64 Index;
LODWORD(Index) = 0;
v38 = 0x100000000i64;
v12 = (int)a3;
PropertyTypeA = 0i64;
PropertyBufferA = 0i64;
if( (unsigned int)a3 < 3 )
return -1073741811;
v14 = a4->Key.fmtid.Data1 & 0xFF00000;
if( !v14 )
return -1073741811;
v15 = a5;
*(_DWORD *)a5 = 0;
result = FindFilterOperatorClose((unsigned int)a3, (const _DEVPROP_FILTER_EXPRESSION *)a4, &Index);
v18 = result;
if( result )
return result;
p_LocaleName = (char *)&a4[1].LocaleName;
v20 = -1073741823;
v41 = (char *)(v17 + 56i64 * (unsigned int)Index);
v21 = v12 - Index;
v22 = v12 - 1;
LODWORD(v39) = v21;
if( v14 == 3145728 || v14 == 0x100000 )
{
while( 1 )
{
if( v22 <= 1 )
goto LABEL_26;
LODWORD(Index) = 0;
*(_DWORD *)v15 = 0;
if( (*(_DWORD *)p_LocaleName & 0xFF00000) != 0 )
{
result = FindFilterOperatorClose(v22, (const _DEVPROP_FILTER_EXPRESSION *)p_LocaleName, &Index);
v30 = Index + 1;
if( result )
return result;
result = FilterEvalStrict(
a1,
GetPropertyCallback,
(VOID *)v30,
(const _DEVPROPCOMPKEY *)p_LocaleName,
v15,
PropertyBufferB,
BufferSizeB,
v36,
PropertyTypeA,
(const _DEVPROP_FILTER_EXPRESSION *)v38,
v39);
v18 = result;
if( result == -1073741823 )
{
HIDWORD(v38) = 0;
}
else if( result )
{
return result;
}
v22 -= v30;
v26 = 56i64 * v30;
}
else
{
v18 = ((__int64(__fastcall *)(INT64 *, char *, UINT64 *, char *, UINT8 **))a1)(
GetPropertyCallback,
p_LocaleName + 8,
&PropertyTypeA,
(char *)&PropertyTypeA + 4,
&PropertyBufferA);
if( v18 == -1073741275 )
{
v18 = 0;
if( (*(_DWORD *)p_LocaleName & 0xFFF) != 1 )
{
HIDWORD(v38) = 0;
v26 = 56i64;
--v22;
goto LABEL_13;
}
v23 = 0i64;
v25 = 0i64;
v24 = 0i64;
PropertyTypeA = 0i64;
PropertyBufferA = 0i64;
}
else
{
v23 = (unsigned int)PropertyTypeA;
v24 = PropertyBufferA;
v25 = HIDWORD(PropertyTypeA);
}
if( v18 )
return v18;
LODWORD(BufferSizeB) = *((_DWORD *)p_LocaleName + 11);
LODWORD(PropertyTypeB) = *((_DWORD *)p_LocaleName + 10);
PropertyEval(
v23,
(WCHAR *)v24,
v25,
*(_DEVPROP_OPERATOR *)p_LocaleName,
PropertyTypeB,
*((WCHAR **)p_LocaleName + 6),
(UINT64)BufferSizeB,
(INT64 *)v15);
--v22;
v26 = 56i64;
}
if( *(_DWORD *)v15 == (v14 == 3145728) )
{
p_LocaleName = v41;
v27 = 1;
v22 = (unsigned int)v39;
goto LABEL_15;
}
LABEL_13:
p_LocaleName += v26;
}
}
if( v14 != 5242880 )
return -1073741811;
if( (*(_DWORD *)p_LocaleName & 0xFF00000) != 0 )
{
result = FindFilterOperatorClose(v22, (const _DEVPROP_FILTER_EXPRESSION *)p_LocaleName, &Index);
v31 = Index + 1;
if( !result )
{
result = FilterEvalStrict(
a1,
GetPropertyCallback,
(VOID *)v31,
(const _DEVPROPCOMPKEY *)p_LocaleName,
v15,
PropertyBufferB,
BufferSizeB,
v36,
PropertyTypeA,
(const _DEVPROP_FILTER_EXPRESSION *)v38,
v39);
v18 = result;
if( !result )
{
p_LocaleName += 56 * v31;
v22 -= v31;
v20 = -1073741823;
LABEL_46:
*(_DWORD *)v15 = *(_DWORD *)v15 == 0;
LABEL_26:
v27 = v38;
LABEL_15:
if( !v22 )
return -1073741811;
v28 = *(_DWORD *)p_LocaleName & 0xFF00000;
switch( v28 )
{
case 4194304:
v29 = v14 == 3145728;
break;
case 2097152:
if( v14 == 0x100000 )
goto LABEL_19;
return -1073741811;
case 6291456:
v29 = v14 == 5242880;
break;
default:
return -1073741811;
}
if( v29 )
{
LABEL_19:
if( v27 || HIDWORD(v38) || v18 )
return v18;
return v20;
}
return -1073741811;
}
}
}
else
{
result = ((__int64(__fastcall *)(INT64 *, const _DEVPROPCOMPKEY *, UINT64 *, char *, UINT8 **))a1)(
GetPropertyCallback,
&a4[2],
&PropertyTypeA,
(char *)&PropertyTypeA + 4,
&PropertyBufferA);
v18 = result;
if( result == -1073741275 )
return v20;
if( !result )
{
LODWORD(BufferSizeB) = *(_DWORD *)&a4[3].Key.fmtid.Data2;
LODWORD(PropertyTypeBa) = a4[3].Key.fmtid.Data1;
PropertyEval(
(unsigned int)PropertyTypeA,
(WCHAR *)PropertyBufferA,
HIDWORD(PropertyTypeA),
*(_DEVPROP_OPERATOR *)p_LocaleName,
PropertyTypeBa,
*(WCHAR **)a4[3].Key.fmtid.Data4,
(UINT64)BufferSizeB,
(INT64 *)v15);
--v22;
p_LocaleName = (char *)&a4[3].Key.pid;
goto LABEL_46;
}
}
return result;
}Referenced by:
FilterEvalStrict