The question -- how did campaign finance laws affect the 2012 presidential election -- is a bit of a misnomer insofar as campaign finance laws have never really been applied. Major U.S. Supreme Court decisions have essentially rendered meaningless efforts by, among others, Senator John McCain and former Senator Russ Feingold, to limit the role of money and financial donors in American politics. Those decisions, Citizens United v. Federal Election Commission (2010) and McCutcheon v. Federal Election Commission (2014), have had the combined effect of eliminating the limitations on how much nonprofit corporations and individuals can contribute to political campaigns and, equally importantly, to political action committees (PACs). While McCutcheon wasn't argued and decided in the Supreme Court until after the 2012 election was over, the question of constitutionality addressed in that case had been argued, albeit unsuccessfully, at the appellate level, and implementation of the 2002 Bipartisan Campaign Reform Act had been consistently obstructed through legal actions intended to have that very effect.
Campaign finance laws had no impact on the 2012 presidential election. Both major party candidates, Barack Obama and Mitt Romney, raised and spent many hundreds of millions of dollars each, with campaign contributions pouring in from myriad sources unimpeded by any presumed statutory restrictions on such activities.