http://bugs.winehq.org/show_bug.cgi?id=10273
--- Comment #22 from Peter Beutner p.beutner@gmx.net 2007-11-08 16:43:19 --- user32 doesn't pass the check here.(compiled with gcc-4.2.2) Just changing one other function to not retrieve the PIC register and it works.
You are not by any chance running a distribution where -fstack-protector is enabled by default? Because compiling with that makes it work, too.
btw. compiling with gcc-3.4.6 and it works right away.