Now, first, "verb" and "adjective" etc. are not functions, they are word categories (parts of speech). Functions are 'subject', 'object', 'complement' etc.
"Vary" is a verb as in:
"Opinions vary about the benefits of EU membership".
"Ed varied his diet to make it more interesting".
Even when the present participle form is modifying a noun, it is still a verb:
"Our attempts resulted in varying degrees of success".
Some Mickey Mouse grammar books call "varying" an adjective in examples like that one, but they are wrong; it is a verb being used as a modifier.
(1) "Opinions vary about the benefits of EU membership".
(2) "Ed varied his diet to make it more interesting".
(3) "Our attempts resulted in varying degrees of success".
In (1) the noun "opinions" is the subject, and the function of the verb "vary" is "predicator". In (2) the subject is the noun "Ed" and the function of the verb "varied" is predicator. In (3) "varying" is a verb and its function is modifier of "degrees" in the noun phrase "varying degrees of success".