http://bugs.winehq.org/show_bug.cgi?id=34921
--- Comment #3 from Andrey Gusev andrey.goosev@gmail.com 2013-11-15 13:28:50 CST --- (In reply to comment #1)
Created attachment 46536 [details] bad implementation
I needed this function for other program, I ended up writing a very simple implementation that at least helped me. I could not find it so I rewrote it, it was not tested.
Bruno, I confirm that your patch fixes the problem. After that way goes to bug 24517.