No, I believe my description is correct. The game starts cmd.exe with CreateProcessW() with STARTUPINFO.cbReserved / STARTUPINFO.lpReserved set as described, I dumped that fields at CreateProcess, I saw return address in CreateProcessW and the code doing that and found the source code for the library used which I linked. I know cmd.exe does it too but indeed it only copies the related attribute, stdout text mode is changed at cmd.exe start and not at tasklist.exe start by cmd. Another thing now seems suspicious to me with the second patch: I realized msvcrt.spawn does not set std handles in STARTUPINFO, and with that change in the second patch now nothing on the spawn path is going to set the system's std handles in TEB which doesn't look right at once. What if, e. g., that should be set in spawn, or there are more conditions when std handles are updated at startup. I am going to test this part a bit more (and if that ends up being too convoluted maybe even just drop that second patch for now, that is not needed for the case I am fixing, only the first one). -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11710#note_149394