VslCreateSecureSection
NTSTATUS __stdcall VslCreateSecureSection(
PHANDLE Handle,
PEPROCESS TargetProcess,
PMDL Mdl,
UINT32 DevicePageProtection,
UINT32 Attributes){
NTSTATUS result;
unsigned __int64 v10;
int v11;
INT64 v12[10];
INT64 v13[14];
memset(v13, 0i64, 0x68u);
memset(v12, 0i64, 0x48u);
*Handle = 0i64;
if( (Attributes & 0xFFFFFFFE) != 0 )
return -1073741580;
if( (Attributes & 1) == 0 && ((Mdl->ByteCount & 0xFFF) != 0 || Mdl->ByteOffset) )
return -1073741583;
LODWORD(v10) = MmSizeOfMdl((PVOID)Mdl->ByteOffset, Mdl->ByteCount);
if( v10 > 0xFFFFFFFF )
return -1073741583;
result = VslpLockPagesForTransfer((INT64)v12, (INT64)Mdl, (unsigned int)v10, 0i64, 0);
if( result >= 0 )
{
v13[3] = v12[0];
v13[5] = v12[7];
v13[1] = (INT64)TargetProcess->Pcb.SecureState;
LODWORD(v13[2]) = DevicePageProtection;
v11 = VslpEnterIumSecureMode(2u, 63, 0i64, (INT64)v13);
VslpUnlockPagesForTransfer((INT64 **)v12);
if( v11 >= 0 )
*Handle = (void *)v13[4];
return v11;
}
return result;
}Referenced by:
No references.