http://bugs.winehq.org/show_bug.cgi?id=12238
--- Comment #4 from James Hawkins truiken@gmail.com 2008-03-26 16:35:12 --- check out wine/libs/wine/config.c:174
we first check the HOME env var, and if it doesn't exist, we call getpwuid and get the home dir from that structure (like you were guessing). For that to work, HAVE_GETPWUID has to be defined when wine is built.