http://bugs.winehq.org/show_bug.cgi?id=20466
--- Comment #29 from Anastasius Focht focht@gmx.net --- Hello Andrew,
you need to reserve TLS slot 0 right from the beginning to avoid any TLS alloc stealing it (Wine builtins do that) before the game accesses it.
If you want to try it on your own there are some options. For a one-liner hack, have a look here:
http://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ntdll/thread.c#l205
--- snip --- 212 HANDLE thread_init(void) 213 { ... 255 RtlInitializeBitMap( &tls_bitmap, peb->TlsBitmapBits, sizeof(peb->TlsBitmapBits) * 8 ); 256 RtlInitializeBitMap( &tls_expansion_bitmap, peb->TlsExpansionBitmapBits, ... 331 return exe_file; 332 } --- snip ---
Insert the following code _after_ line 255 to reserve slot 0 internally:
--- snip --- RtlSetBits( peb->TlsBitmap, 0, 1); --- snip ---
Recompile Wine and check with the game.
Regards