upvote
How does it handle stuff like syscalls without altering the executed code?
reply
Windows apps don't use syscalls directly; they call into kernel32.dll, which is convenient for Wine. (Microsoft enforces this by scrambling the syscall numbers on OS updates [1].)

[1]: https://j00ru.vexillium.org/syscalls/nt/64/

reply
Huh, now I know. I suppose macos is the same way these days even if you can technically bypass it.
reply
Yes. Linux is the only major operating system where there is even a convention to directly access system calls. For macOS, everything goes through libSystem.
reply
It installs handlers. I don't have the exact name but there's support in the kernel to redirect syscalls to a Userland process
reply
https://www.phoronix.com/news/Wine-11.5-Released

"SUD" Syscall User Dispatch feature in Linux 5.11 +

reply