http://bugs.winehq.org/show_bug.cgi?id=11788
--- Comment #9 from Alexander Dorofeyev alexd4@inbox.lv 2008-03-23 10:57:20 --- Ok i tried this on windows. There, on entering WinMain, the address in question is on a page not yet accessible. The first thing WinMain does is passes 0x51DC (apparently size of object it allocated on the stack) to some routine that fetches a byte from every page so this area is added to stack and seems to be initialized to zeros. That's probably why on Windows it doesn't fail this way, because the pointer at [esp-0x4e02] thus gets initialized to NULL.
I don't know what's the right way to do about this on Wine (if any) - maybe juts zero-fill the stack on startup before passing control to the app.