http://bugs.winehq.org/show_bug.cgi?id=56316
--- Comment #1 from Ratchanan Srirattanamet peathot@hotmail.com --- Seems like there's a sort-of graduation project which try to handle this exact function:
https://deepblue.lib.umich.edu/bitstream/handle/2027.42/195350/egraber_final...
Not sure if the reverse-engineering method is applicable though, but just dumping a link from my research.