Piotr, can you review this, please? I've only tested this with two apps on 32 bits, I have not tested at all on 64 bits, and am only guessing on the calling convention stuff.
Seems to fix http://bugs.winehq.org/show_bug.cgi?id=27698 for Harvest and one other app (I can't reproduce the problem with Origin, and I haven't tried cl.exe).