I managed to pry the sunroof closed with a large flat blade screwdriver. I reconnected the motor and everything works, it even tries to pull the sunroof back a few inches but gets bound up somewhere.
It could be fixed at a later date, but I'm just glad I can drive it now without the wind noise.