You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
1.3 KiB
29 lines
1.3 KiB
4 years ago
|
#pragma once
|
||
|
#include <Uefi.h>
|
||
|
#include <Library/UefiLib.h>
|
||
|
#include <Library/DebugLib.h>
|
||
|
#include <Library/MemoryAllocationLib.h>
|
||
|
#include <Library/UefiBootServicesTableLib.h>
|
||
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
||
|
#include <Library/DevicePathLib.h>
|
||
|
#include <Library/PrintLib.h>
|
||
|
#include <Protocol/SimpleFileSystem.h>
|
||
|
#include <Protocol/LoadedImage.h>
|
||
|
#include <IndustryStandard/PeImage.h>
|
||
4 years ago
|
#include <Library/ShellLib.h>
|
||
4 years ago
|
#include <Guid/GlobalVariable.h>
|
||
|
#include "WinLoad.h"
|
||
|
|
||
4 years ago
|
#define START_BOOT_APPLICATION_SIG "\xE8\x00\x00\x00\x00\x48\x8B\xCE\x8B\xD8\xE8\x00\x00\x00\x00\x41\x8B\xCF"
|
||
|
#define START_BOOT_APPLICATION_MASK "x????xxxxxx????xxx"
|
||
4 years ago
|
|
||
4 years ago
|
static_assert(sizeof(START_BOOT_APPLICATION_SIG) == sizeof(START_BOOT_APPLICATION_MASK), "signature and mask size's dont match...");
|
||
4 years ago
|
#define WINDOWS_BOOTMGFW_PATH L"\\efi\\microsoft\\boot\\bootmgfw.efi"
|
||
|
#define WINDOWS_BOOTMGFW_BACKUP_PATH L"\\efi\\microsoft\\boot\\bootmgfw.efi.backup"
|
||
|
|
||
4 years ago
|
extern SHITHOOK BootMgfwShitHook;
|
||
|
typedef EFI_STATUS(EFIAPI* IMG_ARCH_START_BOOT_APPLICATION)(VOID*, VOID*, UINT32, UINT8, VOID*);
|
||
4 years ago
|
EFI_STATUS EFIAPI RestoreBootMgfw(VOID);
|
||
4 years ago
|
EFI_STATUS EFIAPI InstallBootMgfwHooks(EFI_HANDLE ImageHandle);
|
||
4 years ago
|
EFI_STATUS EFIAPI ArchStartBootApplicationHook(VOID* AppEntry, VOID* ImageBase, UINT32 ImageSize, UINT8 BootOption, VOID* ReturnArgs);
|