EFI_STATUS ModuleEntryPoint(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
int v2; // eax
int DebugPeiServicesPtr; // eax
unsigned __int64 v4; // rax
EFI_STATUS v5; // esi
unsigned __int64 v6; // rax
int PeiServices; // eax
v2 = PeiCryptLibConstructor((int)ImageHandle, (int)SystemTable); /*0xffde3089*/
if ( v2 < 0 ) /*0xffde3097*/
{
DebugPrint(0x80000000, "\nASSERT_EFI_ERROR (Status = %r)\n", v2); /*0xffde30a0*/
DebugPeiServicesPtr = GetDebugPeiServicesPtr(); /*0xffde30a8*/
if ( DebugPeiServicesPtr ) /*0xffde30af*/
(*(void (__cdecl **)(const char *, int, const char *))(DebugPeiServicesPtr + 4))( /*0xffde30c0*/
"e:\\hs\\Build\\HR6N0XMLK\\DEBUG_VS2015\\IA32\\PurleyPlatPkg\\BootGuard\\ExtendBtGSupportToDxe\\Pei\\BootGuardPei"
"\\DEBUG\\AutoGen.c",
168,
"!EFI_ERROR (Status)");
}
v4 = __readmsr(0x13Au); /*0xffde30cb*/
v5 = 0; /*0xffde30cd*/
if ( (v4 & 0x100000000LL) != 0 ) /*0xffde30d6*/
{
DebugPrint(64, "Processor supports Boot Guard.\n"); /*0xffde30df*/
v6 = __readmsr(0x13Au); /*0xffde30eb*/
if ( (_DWORD)v6 ) /*0xffde30ef*/
{
PeiServices = GetPeiServices(); /*0xffde30f8*/
return (*(int (__cdecl **)(int, void *))(*(_DWORD *)PeiServices + 36))(PeiServices, &unk_FFDE4CAC); /*0xffde3108*/
}
else
{
DebugPrint( /*0xffde30f6*/
0x80000000,
"[BootGuardPei.c] Boot Guard is disabled by Boot Guard Profile Configuration in the Intel Fitc\n");
}
}
else
{
DebugPrint(0x80000000, "Processor does not support Boot Guard.\n"); /*0xffde3112*/
}
return v5; /*0xffde3119*/
}