Asteroids game hits the auto-stub at start. However, this function is by far not enough to make that work really, it is using much more of unimplemented bits.
The first patch fixes the present math tests. Since no function is imported from d2d1.dll it is not getting loaded at the process during test process load and GetModuleHandleA("d2d1.dll") always returns NULL.