SeSecureBootQueryInformation
INT64 __fastcall SeSecureBootQueryInformation(
_SYSTEM_INFORMATION_CLASS SystemInformationClass,
VOID *SystemInformation,
UINT64 SystemInformationLength,
UINT64 *ReturnLength){
UINT8 *v4;
unsigned int v5;
char *v6;
UINT8 *v8;
unsigned int v9;
unsigned int v10;
unsigned int v11;
v4 = 0i64;
v5 = 0;
if( SystemInformationClass != SystemSecureBootPolicyInformation )
{
if( SystemInformationClass == SystemSecureBootInformation )
{
*(_DWORD *)ReturnLength = 2;
if( (unsigned int)SystemInformationLength >= 2 )
{
*(_BYTE *)SystemInformation = dword_140C54384 & 1;
*((_BYTE *)SystemInformation + 1) = (dword_140C54384 & 8) != 0;
return v5;
}
return(unsigned int)-1073741820;
}
if( SystemInformationClass != SystemSecureBootPolicyFullInformation )
{
if( SystemInformationClass != SystemCodeIntegrityPlatformManifestInformation )
return(unsigned int)-1073741821;
v8 = g_SecureBootActivePlatformManifest;
if( !g_SecureBootActivePlatformManifest )
return(unsigned int)-1058340858;
v9 = g_SecureBootActivePlatformManifestSize;
v10 = g_SecureBootActivePlatformManifestSize + 4;
*(_DWORD *)ReturnLength = g_SecureBootActivePlatformManifestSize + 4;
if( (unsigned int)SystemInformationLength >= v10 )
{
memmove((UINT8 *)SystemInformation + 4, v8, v9);
return v5;
}
return(unsigned int)-1073741820;
}
}
v6 = (char *)qword_140CF4AF8;
if( !qword_140CF4AF8 )
return(unsigned int)-2143092730;
if( SystemInformationClass == SystemSecureBootPolicyFullInformation )
{
*(_DWORD *)ReturnLength = 28;
v4 = (UINT8 *)SystemInformation;
v11 = *((_DWORD *)v6 + 14) + 28;
}
else
{
v11 = 24;
}
*(_DWORD *)ReturnLength = v11;
if( (unsigned int)SystemInformationLength < v11 )
return(unsigned int)-1073741820;
*(_OWORD *)SystemInformation = *(_OWORD *)(v6 + 4);
*((_DWORD *)SystemInformation + 4) = *((_DWORD *)v6 + 5);
*((_DWORD *)SystemInformation + 5) = *((_DWORD *)v6 + 8);
if( SystemInformationClass == SystemSecureBootPolicyFullInformation )
{
memmove(v4 + 28, (UINT8 *)v6 + 60, *((unsigned int *)v6 + 14));
*((_DWORD *)v4 + 6) = *((_DWORD *)v6 + 14);
}
return v5;
}Referenced by:
ExpQuerySystemInformation