Tom Hanks. Tom Cruise. Ben Affleck. None of them have been a match for Tyler Perry’s Madea.

In a surprise victory at the weekend box office, Perry’s “Boo! A Madea Halloween” toppled another A-lister as Hanks’ and Ron Howard’s new Dan Brown adaption, “Inferno,” went up in flames. Perry’s latest movie about his tough-talking grandmother remained No. 1 for the second straight week with an estimated $16.7 million.

That was enough to scare away the third installment of the “Da Vinci Code” franchise. According to studio estimates Sunday, “Inferno” bombed with $15 million, about half of what more bullish predictions anticipated.

Sony Pictures and “Inferno” could take solace in stronger overseas business. In three weeks of international release, the Italy-set film has earned nearly $150 million. The studio also stressed that the $75 million budget for “Inferno” was half that of 2006’s “The Da Vinci Code” or 2009’s “Angels & Demons.”