My Ranger has been rolled but it was in the sand not pavement like yours from the looks of it... I drove mine back home ~300 miles, parked it for a while, took some measurements from another Ranger, pulled what was left of the windshield, pulled the rear window, pulled the roof skin, straightened it all out the best I could (used a "port a power" to get the A pillar and everything back to straight, pounded the dents out of the roof skin the best I could, welded it back on (and added some silicone body isolation spots like was in the roof when I took it apart) then put a windshield back in. That was 7 years ago or thereabouts, leaks some somewhere in the top passenger corner of the windshield but that's it.
It really depends on what your plans are, if you want it to be pristine and correct you'd need a new cab, but if you are going to be in a similar situation again and just want to have fun and don't care if it is perfect, get it close and workable.