It could be a bad motor, a bad contact in one of the connectors, or the resistor.

First and probably the easiest...check the connectors. Look for cooked terminals and housings as well as corrosion. Something that will be fairly hard to spot is that the terminals used on modern GM cars have very thin terminals. Sometimes, they'll open up to the point where contact with the mating pin is spotty. If you can stop the car and wiggle the connectors to get the motor turning again, you've probably found your culprit. For corrosion issues, try contact cleaner, available at any good electronics stores. Burnt or loose connectors are probably best replaced, but they're pricey. They come as "pigtail" assemblies from the dealer, and for the resistor connector, don't be shocked if it's over $75.