The function you posted is incomplete - it would fail.
If you require help just post your own website address, version of WP involved, list of plugins/changes made recently, along with an explanation of what is occuring on your PHP based site.
You might be annoyed, but a copy/pasta from an aspx injection thread isn’t the same problem, and posting 2 direct links to a virus can only be detrimental to everyone.
If you’re averse to posting your website address, then what you need to determine first is WP version number and what (if anything) you’ve changed recently. Make a complete backup of your database as it may require cleaning and then check your user root and domain root for any files that appear out of place (such as something.txt or test.php, etc.) Don’t forget to check for .hidden files too.
Maximum Cash Discount on any plan with MAXCASH