deobfuscating a complex JavaScript function