Properly indent the code (I used http://beta.phpformatter.com/)
http://pastebin.com/A106eFjY
Look for function calls (func()
or $func()
).
Line 14: `$eva1tYldokBcVSjr(..., $eva1tYldakBcVSir(...));
Comment out the function call, and echo $eva1tYldokBcVSjr
(and $eva1tYldakBcVSir
) to see what it's doing.
echo $eva1tYldokBcVSjr;
=> 'preg_replace'
echo $eva1tYldakBcVSir;
=> 'strrev'
echo
out the parameters passed to $eva1tYldokBcVSjr()
(preg_replace()
).
$eva1tYidokBcVSjr[0.016 * (7812.5 * 0.016)]
=> "@(.+)@ie"
$eva1tYidokBcVSjr[62.5 * 0.016]
=> "eval("\1");"
strrev($eva1tYidokBcVSjr[0.061 * 0.031])
=> "@eval(base64_decode($eva1tYidakBcVSjr[1]));"
So line 14 decodes to (in a PHP regex anything can be a delimiter):
preg_replace("/(.+)/ie", 'eval("\1");', eval(base64_decode($eva1tYidakBcVSjr[1])));
The string that's being base64_decoded
decodes to code with a bunch of eval
s in it.
http://pastebin.com/zRr9dMHN
Replace all those eval
s with echo
s, to see what's going on. There are even more eval(base64_decode(
s.
http://pastebin.com/H9WcBFyJ
Changing those eval
s to echo
s gets you this:
http://pastebin.com/VaYCgUyK
I see a setcookie
in there...
EDIT: Here's a post where someone continued decoding this:
http://www.thehosthelpers.com/technical-help/help-de-obfsucating-code/msg17585#msg17585