A quick experiment or two with the real Windows version suggests that the hash function in question is just MD5, repackaged as an array of four little-endian 32-bit words instead of 16 bytes.
This is pretty ugly code, but it works well enough to deliver the right versions for the files in my test MSI. I can polish it later.
But I haven't tested it yet, so it's probably got a zillion things wrong inside it.