Compare commits

..

No commits in common. 'f4e9faf87622e148c58b6e81fe52bbd33cfe3e6e' and 'f1127191e668499cf93f6cffd8b6d7ddddc6dd0c' have entirely different histories.

  1. 2875
      CHANGELOG.md
  2. 7235
      ExplorerPatcher/TwinUIPatches.cpp
  3. 26053
      ExplorerPatcher/dllmain.c
  4. 2109
      ExplorerPatcher/utility.h
  5. 78
      ep_startmenu/ep_sm_main.c
  6. 2
      version.h

2875
CHANGELOG.md

File diff suppressed because it is too large Load Diff

7235
ExplorerPatcher/TwinUIPatches.cpp

File diff suppressed because it is too large Load Diff

26053
ExplorerPatcher/dllmain.c

File diff suppressed because it is too large Load Diff

2109
ExplorerPatcher/utility.h

File diff suppressed because it is too large Load Diff

78
ep_startmenu/ep_sm_main.c

@ -77,7 +77,27 @@ void PatchXamlMetaDataProviderGuid() @@ -77,7 +77,27 @@ void PatchXamlMetaDataProviderGuid()
PBYTE beginRData = NULL;
DWORD sizeRData = 0;
RDataSectionBeginAndSize(GetModuleHandleW(NULL), &beginRData, &sizeRData);
// Our target is in .rdata
PIMAGE_DOS_HEADER dosHeader = (PIMAGE_DOS_HEADER)GetModuleHandleW(NULL);
if (dosHeader->e_magic == IMAGE_DOS_SIGNATURE)
{
PIMAGE_NT_HEADERS64 ntHeader = (PIMAGE_NT_HEADERS64)((u_char*)dosHeader + dosHeader->e_lfanew);
if (ntHeader->Signature == IMAGE_NT_SIGNATURE)
{
PIMAGE_SECTION_HEADER firstSection = IMAGE_FIRST_SECTION(ntHeader);
for (unsigned int i = 0; i < ntHeader->FileHeader.NumberOfSections; ++i)
{
PIMAGE_SECTION_HEADER section = firstSection + i;
if (!strncmp(section->Name, ".rdata", 6))
{
beginRData = (PBYTE)dosHeader + section->VirtualAddress;
sizeRData = section->SizeOfRawData;
break;
}
}
}
}
if (!beginRData || !sizeRData)
{
return;
@ -112,62 +132,6 @@ void Init() @@ -112,62 +132,6 @@ void Init()
LoadLibraryW(L"JumpViewUI_.dll");
g_bIsUsingOwnJumpViewUI = TRUE;
}
PBYTE beginText = NULL;
DWORD sizeText = 0;
TextSectionBeginAndSize(GetModuleHandleW(NULL), &beginText, &sizeText);
if (beginText && sizeText)
{
// Fix 0x800704DA (The service is already registered) exception when feature flag 58205615 is enabled
// Feature flag introduced in:
// - Germanium Client 26100.5742+
// - Germanium Server 26461+
// - Bromine Canary 27924+ (reworked in 27938)
// Used to be inlined in StartMenuExperienceHost::App::OnLaunched(), the rework made it be called using
// std::call_once, therefore we have a function that we can make it do nothing.
// StartMenuExperienceHost::App::SetExperienceManagerPropertiesAsync()
// Early return that function
#if defined(_M_X64)
// TODO Improve pattern
// 40 53 57 48 83 EC 28 E8 ?? ?? ?? ?? 48 8B D8 48 89 44 24 40 48 8B C8
PBYTE match = FindPattern(
beginText,
sizeText,
"\x40\x53\x57\x48\x83\xEC\x28\xE8\x00\x00\x00\x00\x48\x8B\xD8\x48\x89\x44\x24\x40\x48\x8B\xC8",
"xxxxxxxx????xxxxxxxxxxx"
);
if (match)
{
DWORD dwOldProtect = 0;
if (VirtualProtect(match, 1, PAGE_EXECUTE_READWRITE, &dwOldProtect))
{
match[0] = 0xC3; // ret
VirtualProtect(match, 1, dwOldProtect, &dwOldProtect);
}
}
#elif defined(_M_ARM64)
// TODO Improve pattern
// 7F 23 03 D5 F3 53 BF A9 FD 7B BC A9 FD 03 00 91 30 00 80 92
// ----------- PACIBSP, don't scan for this because it's everywhere
PBYTE match = FindPattern(
beginText,
sizeText,
"\xF3\x53\xBF\xA9\xFD\x7B\xBC\xA9\xFD\x03\x00\x91\x30\x00\x80\x92",
"xxxxxxxxxxxxxxxx"
);
if (match)
{
match -= 4; // include PACIBSP
DWORD dwOldProtect = 0;
if (VirtualProtect(match, 4, PAGE_EXECUTE_READWRITE, &dwOldProtect))
{
*(DWORD*)match = 0xD65F03C0; // RET
VirtualProtect(match, 4, dwOldProtect, &dwOldProtect);
}
}
#endif
}
}
HMODULE hMod;
GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, hModule, &hMod);

2
version.h

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
#define VER_MAJOR 26100
#define VER_MINOR 4946
#define VER_BUILD_HI 69
#define VER_BUILD_LO 3
#define VER_BUILD_LO 2
#define VER_FLAGS VS_FF_PRERELEASE

Loading…
Cancel
Save