Skip to content

Commit

Permalink
Remove Outdated patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Bush2021 committed Oct 27, 2023
1 parent 35f580e commit 56480ff
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/patch.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,29 @@ pLdrLoadDll RawLdrLoadDll = nullptr;

// https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/ui/dialogs/outdated_upgrade_bubble.cc?q=outdated_upgrade_bubble&ss=chromium%2Fchromium%2Fsrc
// 该功能失效,需要修改
void Outdated(HMODULE module)
{
// "OutdatedUpgradeBubble.Show"
#ifdef _WIN64
BYTE search[] = {0x48, 0x89, 0x8C, 0x24, 0xF0, 0x00, 0x00, 0x00, 0x80, 0x3D};
uint8_t *match = SearchModuleRaw(module, search, sizeof(search));
#else
BYTE search[] = {0x31, 0xE8, 0x89, 0x45, 0xF0, 0x88, 0x5D, 0xEF, 0x80, 0x3D};
uint8_t *match = SearchModuleRaw(module, search, sizeof(search));
#endif
if (match)
{
if (*(match + 0xF) == 0x74)
{
BYTE patch[] = {0x90, 0x90};
WriteMemory(match + 0xF, patch, sizeof(patch));
}
}
else
{
DebugLog(L"patch Outdated failed %p", module);
}
}
// void Outdated(HMODULE module)
//{
// // "OutdatedUpgradeBubble.Show"
//#ifdef _WIN64
// BYTE search[] = {0x48, 0x89, 0x8C, 0x24, 0xF0, 0x00, 0x00, 0x00, 0x80, 0x3D};
// uint8_t *match = SearchModuleRaw(module, search, sizeof(search));
//#else
// BYTE search[] = {0x31, 0xE8, 0x89, 0x45, 0xF0, 0x88, 0x5D, 0xEF, 0x80, 0x3D};
// uint8_t *match = SearchModuleRaw(module, search, sizeof(search));
//#endif
// if (match)
// {
// if (*(match + 0xF) == 0x74)
// {
// BYTE patch[] = {0x90, 0x90};
// WriteMemory(match + 0xF, patch, sizeof(patch));
// }
// }
// else
// {
// DebugLog(L"patch Outdated failed %p", module);
// }
//}

void DevWarning(HMODULE module)
{
Expand All @@ -61,7 +61,7 @@ NTSTATUS WINAPI MyLdrLoadDll(IN PWCHAR PathToFile OPTIONAL,
if (wcsstr(ModuleFileName->Buffer, L"chrome.dll") != 0 && !chrome_loaded)
{
chrome_loaded = true;
Outdated((HMODULE)*ModuleHandle);
// Outdated((HMODULE)*ModuleHandle);
DevWarning((HMODULE)*ModuleHandle);
}
}
Expand Down

0 comments on commit 56480ff

Please sign in to comment.