Yesterday I worked on a car with these problems and found a simple solution.
The GM which controls all this is fed from the power protection relay which is next to it in the rear E-box.
Check for battery voltage at pin 6 of the socket it rests in, if none or low your problem could be a corroded factory splice in the wire harness. This splice lies in a large black tape wrapped bundle of red wires that dead ends right beneath the E-box. Unwind the yards of tape to find a connection of four red/gry stripe wires, two large, two smaller. One of them is the power feed for the pp relay.
The car I worked on had seen some water under the seat and this connection had corroded.
Cutting the bad ends and reconnecting them cured the problems.
The moral here is don't overlook the simple things and regarding electrical spend some time with the wiring diagram before diving in.
The car's owner had given up(and was offering the car for parts) after ripping half the car's interior apart and exchanging nearly every electrical component in the car.