What is the push button 4wd buttons plugged into? on 2002 Chevrolet S10

Took my dash out to install a stereo, the wires that go to the 4wd were keeping me from taking the dash off completely. Before I could unhook it, the black box came in half and some parts went flying out of it. I put it back together as best I could but now the 4wd doesn't work. What is this box called? and what does it do? Thanks

Get Your Car Fixed at a RepairPal Certified Shop.
We certify shops based on expertise, quality work, and verified customer reviews
2 answers
That black box is part of the switch assembly itself best i can figure. As for 'now', you now need a new switch assembly!
All you have to do is simply unplug this switch! Where the wires go is not relevant to what you are doing.
It's the transfer case shift control switch. It plugs into the transfer case shift control module. It's mounted under the right kick panel.