2013 Madrid Open finalist Maria Sharapova booked her place in the last four of this year's competition with a three-set win over Li Na on Friday.