Madara.
This is obvious, what do you people smoke ?.. Madara was the main Mastermind behind everything in Naruto. Obito was pitied and shown mercy by Madara not without a reason.. Obito used Madaras name not without a reason, Madara and Hashi were hyped so much not without a reason.. and finally Madara was revived not without a reason.
He's the progenitor. Madara wasn't in such a great state himself. Red Herring. A lot of ''Madara's hype'' is actually Obito's. So was Zabuza/Gaara's Dad/the 3rd Raikage/Sasori/Asuma.
Obito was always just an Madaras tool, and you can say a broken one.
If by broken you mean successfully hijacks the plan than yes.
Madara is 100 times smarter than Obito, + he still has his trump card, he will overcome the Sages power within Obito.
This? Where does ''Obito's a moron, Madara is the smartest guy ever ROFLOL'' come from? It was Obito who manipulated so many people and organised so many disasters to help further the plan. No matter what was thrown at him, even Madara, he overcame and proceeded. Result? He's the Juubi Jinchuriki, not Madara.
Obitos character was never created to be the Main Villain, just look at him.. getting Rasengans in his back all day long, his reasons are horrible, he is saying nonsense.. because everything he is doing now, he is doing only because of Madara, not because of his "RIN". Madara mind****ed him, and he doesn't realize this till this day.