I don't know that Pakistani customs agents would care about an American prohibition of travel to Pakistan and doubt they would enforce American laws.
How’d he get out of the U.S.? By lying about his destination. People do it all the time traveling to Cuba. Which comes back to whether or not the violation of an America prohibition of travel to Pakistan (which by the way, I'm assuming is true based on your word - I have no personal knowledge that there was one) is a felony. Even if it was, the statute of limitations has run long ago on it. The fact could be used to embarrass Barry and might cost him some votes, but he is still an American citizen and eligible to run for President.
As before, my statement of the facts of the law does not in any way constitute an approval of his candidacy and possible future election.
It matters a hell of a lot if he had dual citizenship and has lied about it. Dual citizenship, like naturalization, makes him ineligible to be President and Commander-in-Chief due to a question of allegience.
That would be under Article II of the U.S. Consititution.