Thank you for posting this.
I wonder if the decoded code could replace the encoded code?

To decode such function, you can do this online for example here:
http://www.tools4noobs.com/online_php_functions/base64_decode/

Additionally I would like to recommend a security plugin called: Wordfence

It scans your site automatically for security issues like this and can automatically email you go alert you.