Updated with just the winecrt0 part, also added atexit support, which requires to pull some allocation function and thus caused some linking problems for various modules which can't import it. I added explicit DllMainCRTStartup declarations for those modules to avoid pulling in the winecrt0 object for them.