SepIsMinTCB
NTSTATUS __stdcall SepIsMinTCB(
const _UNICODE_STRING *ImagePath,
UINT64 Flags,
_PS_PROTECTION RequestedProtection,
UINT8 *ExeSigningLevel,
UINT8 *DllSigningLevel,
_PS_PROTECTION *Protection){
_EJOB *CurrentServerSilo;
_ESERVERSILO_GLOBALS *ServerSiloGlobals;
const _UNICODE_STRING *UncSystemPaths;
unsigned int Length;
int v11;
int v13;
NTSTATUS v14;
CurrentServerSilo = PsGetCurrentServerSilo();
ServerSiloGlobals = PsGetServerSiloGlobals(CurrentServerSilo);
if( !_InterlockedCompareExchange64(
(volatile signed __int64 *)&ServerSiloGlobals->SeSiloState.UncSystemPaths,
0i64,
0i64) )
{
v11 = SepSetSystemPaths();
if( v11 < 0 )
return v11;
}
if( !ImagePath )
return -1073741275;
UncSystemPaths = ServerSiloGlobals->SeSiloState.UncSystemPaths;
Length = 42;
if( UncSystemPaths->Length < 0x2Au )
Length = UncSystemPaths->Length;
if( ImagePath->Length <= Length )
return -1073741275;
if( ImagePath->Buffer[1] == 63 )
{
if( !(unsigned __int8)RtlPrefixUnicodeString(UncSystemPaths, ImagePath, 1u)
&& !(unsigned __int8)RtlPrefixUnicodeString(UncSystemPaths + 1, ImagePath, 1u) )
{
return -1073741275;
}
}
else if( !(unsigned __int8)RtlPrefixUnicodeString(&stru_140001188, ImagePath, 1u)
&& !(unsigned __int8)RtlPrefixUnicodeString(&stru_140009700, ImagePath, 1u) )
{
return -1073741275;
}
SepIsImageInMinTcbList(&SeMsMinTCBList);
v11 = v13;
if( v13 < 0 && (*(&stru_140CF2E80 + 7280) & 1) == 0 && (_BYTE)KdDebuggerEnabled && !(_BYTE)KdDebuggerNotPresent )
{
SepIsImageInMinTcbList(L" \"");
return v14;
}
return v11;
}Referenced by:
SeQuerySigningPolicy