Math PhD after graduating with average grades
This is the sort of thing you won't know until you apply and someone with authority to decide evaluates your background. However, in general, your most recent work will weigh more heavily in a decision for most people who think about it for more than a minute. 

However, you are in competition with others who don't have your "disadvantage" so you need to have some way to explain it. If your recent work overwhelms the past then you are more likely to be successful. 

A doctoral advisor will be more interested in your potential for the future than in your past and will be looking for both deep knowledge and enthusiasm. Most likely the issue of getting funding or not depends on how much confidence he/she has in you rather then your past. But there will be competition, even there. 

But if you don't ask, you don't get an answer.