PopInitPlatformSettings
INT64 __fastcall PopInitPlatformSettings(){
_BYTE *v0;
int SystemInformation;
_DWORD *PoolWithTag;
UINT64 v3;
int v4;
v0 = 0i64;
SystemInformation = ZwQuerySystemInformation();
if( SystemInformation != -1073741789 )
goto LABEL_27;
PoolWithTag = ExAllocatePoolWithTag(PagedPool, 0i64, 0x206D654Dui64);
v0 = PoolWithTag;
if( !PoolWithTag )
{
SystemInformation = -1073741670;
goto LABEL_31;
}
*PoolWithTag = 1094930505;
PoolWithTag[1] = 1;
PoolWithTag[2] = 1346584902;
PoolWithTag[3] = -16;
SystemInformation = ZwQuerySystemInformation();
if( SystemInformation < 0 )
LABEL_31:
KeBugCheckEx(0xA0u, 0xEui64, SystemInformation, 0i64, 0i64);
if( v0[24] >= 3u )
PopFirmwarePlatformRole = (unsigned __int8)v0[61];
if( (unsigned __int8)off_140C00860[0]() )
PopPlatformAoAc = 1;
if( PopPlatformRoleOverride != -1 )
PopFirmwarePlatformRole = PopPlatformRoleOverride;
if( PopPlatformAoAcOverride != -1 )
PopPlatformAoAc = PopPlatformAoAcOverride != 0;
if( (HvlpFlags & 2) != 0 )
{
v3 = (HvlpEnlightenments & 0x10000) != 0 ? 16 : 31;
if( (HvlpRootFlags & 0x400) != 0 )
v3 = 31i64;
PopLogSleepDisabled(0x12ui64, v3, 0i64, 0i64);
}
if( PopPlatformAoAc )
{
if( !InitSafeBootMode && !InitIsWinPEMode && !PopModernStandbyDisabled )
goto LABEL_24;
}
else
{
PopLogSleepDisabled(0x13ui64, 0x20ui64, 0i64, 0i64);
}
PopPlatformAoAc = 0;
LABEL_24:
v4 = PopFirmwarePlatformRole;
if( (unsigned int)PopFirmwarePlatformRole > 8 )
{
v4 = 0;
PopFirmwarePlatformRole = 0;
}
PopPlatformRole = v4;
SystemInformation = 0;
LABEL_27:
if( SystemInformation < 0 )
goto LABEL_31;
if( v0 )
ExFreePoolWithTag(v0, 0x206D654Du);
return(unsigned int)SystemInformation;
}Referenced by:
NtPowerInformation