This is what I need to know:

If i buy an iphone 4s with a bad esn from Sprint can i somehow get it to fully function on a different carrier in the U.S, specifically T-Mobile?

If this is possible how do I go about doing it?