I updated my patches such that all the work that is done in the server is duplicated in kernelbase. The full branch can be found here:
https://gitlab.winehq.org/sbaars/wine/-/commits/shared-classes-new
the correctness of that branch can be tested more thoroughly by commenting out the `if (!(is_win64 && (access & KEY_WOW64_32KEY)))` part of `open_key`. This is not done in the branch itself for obvious performance reasons.
The old implementation that does the opposite and removes special handling from kernelbase can be found here:
https://gitlab.winehq.org/sbaars/wine/-/commits/shared-classes-old
I still like this approach much better, because there is less opportunity for introducing bugs. The internal flag that is used is currently already exposed to the outside world anyway. If we don't take this approach, we should probably do a `& ~OBJ_KEY_WOW64` somewhere in the server.