https://github.com/adang1345/PythonWin7/tree/master/3.9.16
Here you can download the x64 zip file, take python.exe, python39.dll and api-ms-win-core-path-l1-1-0.dll, copy them over to UE_5.2\Engine\Binaries\Win64 and UE_5.2\Engine\Binaries\ThirdParty\Python\Win64. Replace the existing files. If you try to run it however, it won't work as one more step is necessary. One dll contains a Windows 8+ function called CreateFile2, but just renaming it to CreateFileW in a hex editor does the job.
If you don't want to do this yourself, I provided a link to the patched dll at the bottom of the post, but in case you want to do it yourself, the process is as follows:
Download HxD or any hex editor of choice. Go to UE_5.2\Engine\Plugins\Media\ImgMedia\Binaries\Win64 and open UnrealEditor-OpenExrWrapper.dll in your editor. In HxD, you can press Ctrl+R for the replace menu. Replace all instances of CreateFile2 with CreateFileW and save. That's it, the file is patched and you can run Unreal Engine 5.2. The process works for Unreal Engine 5.1 also, if there is any reason for you to use 5.1. Ignore all api-ms-winrt errors, the Unreal Editor lauches no problem. Soon I wil try to get Nanite working via a Vulkan wrapper, and maybe Lumen if someone with an RTX card can test some stuff out.
As promised, here is the patched dll:
https://www.mediafire.com/file/giim7ca9quajqbg/UnrealEditor-OpenExrWrapper.dll/file
Place it in UE_5.2\Engine\Plugins\Media\ImgMedia\Binaries\Win64
AstroGrep: https://astrogrep.sourceforge.net/
HxD: https://mh-nexus.de/en/hxd/
