1
0
mirror of https://github.com/momo5502/hypervisor.git synced 2025-05-31 16:37:43 +00:00

Prepare integrity analysis

This commit is contained in:
momo5502 2022-05-15 15:09:38 +02:00
parent ffb7fc4a69
commit e77359be93

View File

@ -78,21 +78,20 @@ std::filesystem::path extract_driver()
void unsafe_main(const int /*argc*/, char* /*argv*/[])
{
//launcher().run();
//return;
const auto driver_file = extract_driver();
driver driver{driver_file, "MomoLul"};
const driver_device driver_device{R"(\\.\HelloDev)"};
//launcher().run();
std::string pid_str{};
printf("Please enter the pid: ");
std::getline(std::cin, pid_str);
const auto pid = atoi(pid_str.data());
/*
// IW5
insert_nop(driver_device, pid, 0x4488A8, 2); // Force calling CG_DrawFriendOrFoeTargetBoxes
insert_nop(driver_device, pid, 0x47F6C7, 2); // Ignore blind-eye perks
@ -110,17 +109,19 @@ void unsafe_main(const int /*argc*/, char* /*argv*/[])
constexpr uint8_t data3[] = {0xEB};
patch_data(driver_device, pid, 0x443A2A, data3, sizeof(data3));
patch_data(driver_device, pid, 0x443978, data3, sizeof(data3));
*/
/*
insert_nop(driver_device, pid, 0x441D5A, 6);
insert_nop(driver_device, pid, 0x525104, 2);
insert_nop(driver_device, pid, 0x525121, 2);
constexpr uint8_t data3[] = {0xEB};
patch_data(driver_device, pid, 0x525087, data3, sizeof(data3));
patch_data(driver_device, pid, 0x524E7F, data3, sizeof(data3));
patch_data(driver_device, pid, 0x52512C, data3, sizeof(data3));
*/
insert_nop(driver_device, pid, 0x441D5A, 6);
insert_nop(driver_device, pid, 0x525104, 2);
insert_nop(driver_device, pid, 0x525121, 2);
constexpr uint8_t data3[] = {0xEB};
patch_data(driver_device, pid, 0x525087, data3, sizeof(data3));
patch_data(driver_device, pid, 0x524E7F, data3, sizeof(data3));
patch_data(driver_device, pid, 0x52512C, data3, sizeof(data3));
*/
printf("Press any key to disable all hooks!\n");
(void)_getch();
@ -140,11 +141,13 @@ int main(const int argc, char* argv[])
catch (std::exception& e)
{
printf("Error: %s\n", e.what());
_getch();
return 1;
}
catch (...)
{
printf("An unknown error occured!\n");
_getch();
return 1;
}
}