The problem is due to a bug in the microsoft dll which, in one place (at offset 0x17C6), loads an address with a 32-bit instruction instead of with the 64-bit version.
This leads to errors if the address (actually on the stack) is not in the low 4 GB.