Function of wickedness? Evil primarily! (4)
I believe the answer is:
sine
'function' is the definition.
(mathematical function)
'wickedness? evil primarily' is the wordplay.
'wickedness?' becomes 'sin' ('sin' can be a synonym of 'wickedness').
'primarily' indicates taking the first letters.
The initial letter of 'evil' is 'e'.
'sin'+'e'='SINE'
'of' is the link.
(Other definitions for sine that I've seen before include "Indefinitely, with no appointed date - . . . . die" , "Indispensable condition" , "Latin tag for indefinitely - . . . . die" , "Mathematical function" , "Trigonometrical function" .)