ExpGenuinePolicyPostProcess
NTSTATUS __stdcall ExpGenuinePolicyPostProcess(
UINT64 *Type,
VOID *Data,
UINT64 DataSize,
UINT64 *ResultDataSize,
UINT8 *QueryHandled){
unsigned int v6;
NTSTATUS v8;
VOID **v9;
bool v10;
_UNICODE_STRING *v11;
int v12;
VOID **PoolWithTag;
_UNICODE_STRING *v14;
int v15;
UINT64 *ResultDataSizea;
UINT64 *ResultDataSizeb;
UINT8 v19[4];
int Dataa;
int v21;
UINT64 v22;
UINT8 *v23;
__int128 v24;
_BYTE *v25;
v6 = (unsigned int)ResultDataSize;
v23 = QueryHandled;
v21 = 0;
*v25 = 0;
v8 = 0;
v9 = 0i64;
LODWORD(v22) = 4;
Dataa = 0;
v24 = 0i64;
*(_DWORD *)v19 = 0;
if( *Type )
{
v8 = sub_14094D46C(Data, (_DWORD *)DataSize, (unsigned int)ResultDataSize, QueryHandled, 2);
*v25 = 1;
return v8;
}
if( DataSize )
{
if( (_DWORD)ResultDataSize == 1 )
{
v10 = *(_BYTE *)DataSize == 1;
}
else
{
if( (_DWORD)ResultDataSize != 2 )
{
if( *(_DWORD *)DataSize == 1 )
return v8;
goto LABEL_11;
}
v10 = *(_WORD *)DataSize == 1;
}
if( v10 )
return v8;
}
LABEL_11:
v8 = ZwQueryLicenseValue((_UNICODE_STRING *)&stru_1409841B8 + 1, 0i64, &Dataa, 4ui64, &v22);
if( v8 < 0 || Dataa != 1 )
{
v8 = qword_140D2C438 ? qword_140D2C438(&v21) : -1073741637;
if( v8 >= 0 )
{
if( qword_140D2C3F8 )
{
LODWORD(ResultDataSizea) = 0;
v8 = ExpOsProductCacheProviderHelper(v11, (UINT64 *)&qword_140983950, 0i64, 0i64, ResultDataSizea, v19);
if( v8 == -1073741789 )
{
v12 = *(_DWORD *)v19;
PoolWithTag = ExAllocatePoolWithTag(1ui64, *(unsigned int *)v19, 542329939i64);
v9 = PoolWithTag;
if( !PoolWithTag )
return -1073741801;
LODWORD(ResultDataSizeb) = v12;
v8 = ExpOsProductCacheProviderHelper(
v14,
(UINT64 *)&qword_140983950,
0i64,
(UINT64)PoolWithTag,
ResultDataSizeb,
v19);
}
if( v8 < 0 )
goto LABEL_32;
v15 = qword_140D2C3F8(3i64, v9, 0i64);
v8 = v15;
if( v15 >= 0 && (v24 & 0x40) != 0 || v15 == -1073741198 )
{
v8 = 0;
goto LABEL_30;
}
}
else
{
v8 = -1073741637;
}
if( v8 < 0 )
{
LABEL_32:
if( v9 )
ExFreePoolWithTag(v9, 0);
return v8;
}
LABEL_30:
if( !v21 )
{
v8 = sub_14094D46C(Data, (_DWORD *)DataSize, v6, v23, 2);
*v25 = 1;
}
goto LABEL_32;
}
}
return v8;
}Referenced by:
No references.