You know, I sell used Sunroof motors, that are proven to work..60$ sent to your door.. just fyi..
First thing is to pop out the lights themselves from the housing, u can do this carefully with a smaller flat-blade..
Then, best thing is to remove the two phillips head screws beneath the cover, the CAREFULLY slide the sun-roof motor cover rearward to remove the little tabs on the opposite side of the screws.
In my endless junk-yard search it's hit and miss.
Sometimes they come right out no problem are a durable a bit, Other times they shatter into 10,000 piece the moment u attempt to THINK about taking it off..
Next un-clip the electrical connection, after that then it's 3 torx #30 screws is all u need to take the motor out. MAKE SURE IT IS AT THE REST POSITION BETWEEN VENT AND OPEN... u can do this by running the switch normally like u would to close your sun-roof.. YOU MUST DO THIS FOR THE ONE GOING IN ASWELL, or they will not sync.
Then it just slides straight down off the gear for the sun-roof itself.
new one goes in reverse order, MAKE SURE it's at the "REST" position or you'll strip it trying to force it to go a weird way.