Jacek Caban (@jacek) commented about dlls/ntdll/unix/loader.c:
if (machine == current_machine) return NULL; /* try the 64-bit loader */
- if (current_machine == IMAGE_FILE_MACHINE_I386 && machine == IMAGE_FILE_MACHINE_AMD64)
- if ((current_machine == IMAGE_FILE_MACHINE_I386 && machine == IMAGE_FILE_MACHINE_AMD64) ||
(current_machine == IMAGE_FILE_MACHINE_ARMNT && machine == IMAGE_FILE_MACHINE_ARM64))
It might be more flexible to avoid restricting `machine` to `IMAGE_FILE_MACHINE_ARM64` and instead check for something like `machine != current_machine`. This would allow a 64-bit loader to use the new wow for x86 emulation while still using the old wow for 32-bit ARM.