https://bugs.winehq.org/show_bug.cgi?id=46870
--- Comment #51 from Zebediah Figura z.figura12@gmail.com --- (In reply to Paul Gofman from comment #50)
Created attachment 64154 [details] xaudio2_7: Preserve EBX in call_on_voice_processing_pass_start().
I could not help looking into this intriguing issue a bit more and found that the problem is that the IXAudio2VoiceCallback_OnVoiceProcessingPassStart callback does not preserve EBX register. It is apparently not the first time such callbacks are naughty this way, as there is already a workaround preserving %esi for EVE Online. I am attaching the patch (on top of Staging) which fixes the issue for me.
There is the same callback with the same workaround for EVE online called in mainstream FAudio xaudio, but the problem is not there as the code is entirely different and function just ends after this callback call, so it apparently does not need that EBX anymore. Yet if anyone confirms that this patch is fixing the crash with some tricky build, it probably worth doing it there also.
Thanks for debugging further. I suspect we'd still want that in current Wine, then; the fact that the current build successfully restores (or doesn't depend on) EBX (and perhaps also other registers as well) is not something we can depend on.