The engines were for many years nearly identical to the ones used by Ferrari but were branded ( named ) Petronas . The engines were for many years nearly identical to the ones used by Ferrari but were branded Petronas .