The NSA has tremendous computing power, storage capabilities, and some of the smartest mathematicians and computer scientists on the planet.
Let's assume that the key influencers in the US government that decide the fate of the NSA suddenly become victims of a positive psychosis, and no longer want the agency to conduct warrantless mass surveillance. Moreover, they want to atone for their sins, and decide to direct the agency towards using its resources in pursuits that would most benefit the United States, if not mankind at large.
What would be such pursuits?