CmpCheckAdminAccess
NTSTATUS __stdcall CmpCheckAdminAccess(UINT64 DesiredAccess, PVOID SecurityDescriptor, UINT8 *AdminAllowed){
UINT8 *v3;
unsigned int v5;
UINT8 *v6;
int v7;
UINT64 v9;
INT64 GrantedAccess;
PTOKEN_ACCESS_INFORMATION PrimaryTokenInformation;
PPRIVILEGE_SET Privileges;
GrantedAccess = 0i64;
v5 = DesiredAccess;
PrimaryTokenInformation = 0i64;
Privileges = 0i64;
v6 = v3;
v7 = CmpBuildAdminInformation(&PrimaryTokenInformation);
if( v7 >= 0 )
{
LODWORD(v9) = 0;
*v6 = SeAccessCheckFromState(
SecurityDescriptor,
PrimaryTokenInformation,
0i64,
v5,
v9,
&Privileges,
(GENERIC_MAPPING *)((char *)CmKeyObjectType + 76),
1,
(UINT64 *)((char *)&GrantedAccess + 4),
&GrantedAccess);
v7 = 0;
}
if( Privileges )
ExFreePoolWithTag(Privileges, 0);
if( PrimaryTokenInformation )
CmSiFreeMemory((PPRIVILEGE_SET)PrimaryTokenInformation);
return v7;
}Referenced by:
CmKeyBodyReplicateToVirtual
CmpVEExecuteCreateLogic
CmpVEPerformOpenAccessCheck