PspInitPhase1
BOOL __stdcall PspInitPhase1(){
NTSTATUS inserted;
INT64 v1;
INT64 v2;
BOOL result;
INT64 v4;
INT64 v5;
INT64 v6;
INT64 v7;
INT64 v8;
INT64 v9;
INT64 v10;
INT64 v11;
INT64 v12;
INT64 v13;
INT64 v14;
INT64 v15;
VOID *v16;
VOID **Handle;
PVOID Object;
inserted = ObInsertObject(PspSystemPartition, 0i64, 0x1F0003ui64, 0i64, 0i64, &PspSystemPartitionHandle);
v2 = 0i64;
if( inserted < 0 )
v2 = (unsigned int)inserted;
if( (int)v2 < 0 )
KeBugCheck(0x60ui64);
if( !PspInitializeNetRateControl(v2, v1) )
goto LABEL_13;
result = PspInitializeBackgroundActivityModeratorCallouts(v5, v4);
if( result < 0 )
goto LABEL_13;
result = PspInitializeDesktopActivityModeratorCallouts(v7, v6);
if( result < 0 )
goto LABEL_13;
result = PspInitializeMMCSSCallouts(v9, v8);
if( result < 0 )
goto LABEL_13;
result = PspInitializeHwTraceCallouts(v11, v10);
if( result < 0 )
goto LABEL_13;
result = PspInitializeOctagonExtensionHost(v13, v12);
if( result < 0 )
goto LABEL_13;
result = PspInitializeSecExtensionHost(v15, v14);
if( result < 0 )
goto LABEL_13;
if( !VslVsmEnabled )
goto LABEL_12;
LODWORD(Handle) = 0;
LOBYTE(v16) = *((_BYTE *)PsInitialSystemProcess + 2170);
result = PsCreateMinimalProcess((_EPROCESS *)PsInitialSystemProcess, 0i64, 0, v16, 0i64, Handle);
if( result < 0
|| (Object = 0i64,
result = ObReferenceObjectByHandle(0i64, 0, (POBJECT_TYPE)PsProcessType, 0, &Object, 0i64),
PsSecureSystemProcess = (ULONG_PTR)Object,
result < 0)
|| (strcpy_s((PSTR)Object + 1448, 0xFui64, (PSTR)"Secure System"),
result = VslRegisterSecureSystemProcess(),
result < 0) )
{
LABEL_13:
LOBYTE(result) = 0;
}
else
{
LABEL_12:
LOBYTE(result) = 1;
}
return result;
}Referenced by:
PsInitSystem