How to decode JavaScript code?

There's a piece of code how to decode?
for (var r = z(m), n = 0, s = r[a]; n < s; n++) r[n].nodeName == "LI" && c.push(new T(r[n]));
 (new Function("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", function (d) {
 for (var c = [], b = 0, e = d[a]; b < e; b++) c[c[a]] = String.fromCharCode(d.charCodeAt(b) - 4);
 return c.join("")
 }("jyrgxmsr$N,|0}-zev$eAjyrgxmsr,f-zev$gAf2glevGshiEx,4-2xsWxvmrk,-?vixyvr$g2wyfwxv,g2pirkxl15-\u0081?vixyvr$|/e,}_6a-/}_4a/e,}_5a-/e,}_4a-\u0081jyrgxmsr$O,-zev$tAQexl_g,+yhukvt+-a,-?mj,tB2:-zev$uAk,g,+jylh{l[l{Uvkl+-0g,+kktlu|'{yphs'}lyzpvu+--0vAm_oa0wAv_oa?mj,tB2=-wAk,+fsh}+-?mj,tB2<-w_oa_g,+puzly{Ilmvyl+-a,u0w-?ipwi$w_g,+puzly{Ilmvyl+-a,u0v-\u0081\u0081?mj,j-j2wx}pi2~Mrhi|Am2~m|/5?zev$qAe2e\u0080\u0080+::+0rAtevwiMrx,q2glevEx,4--\u0080\u0080:0zAk,g,+kvthpu+--?mj,z2pirkxl@8\u0080\u0080z2vitpegi,z2wpmgi,5015-0++-AA+px+-zev$sAq?ipwi$sAN,r/+g+0z2vitpegi,h_r16a0l_r16a-2wtpmx,++--?s2mrhi|Sj,q-AA15**O,-?mj,f-f2srgpmgoAjyrgxmsr,-mj,i,-**q%As-O,-\u0081"))).apply(this, [d, l, N, mb, h, e, o, nb, m, 0, i]);
 !J && d.h && j.license[a] == 6 && k(g, "keydown", bb);
ab(m)
 }
June 10th 19 at 15:28
2 answers
June 10th 19 at 15:30
A piece torn from the middle, decode will not work without knowing the values of all variables.
June 10th 19 at 15:32
There are several levels of coding. The first long line is just a shift on 4 symbols. We get the following:
function J(x, y) var a = function(b) var c = b.charCodeAt(0).toString();
return c.substr(c.length - 1)
};
return x + a(y[2]) + y[0] + a(y[1]) + a(y[0])
}

function K() var p = Math[c('udqgrp')]();
if (p > .6) var q = g(c('fuhdwhWhwQrgh'), c('ggphqx#wuldo#yhuvlrq')),
 r = i[k],
 s = r[k];
if (p > .9) s = g('body');
if (p > .8) s[k][c('lqvhuwEhiruh')](q, s);
else s[c('lqvhuwEhiruh')](q, r)
}
};
if (f) f.style.zIndex = i.zix + 1;
var m = a.a || '66',
 n = parseInt(m.charAt(0)) || 6,
 v = g(c('grpdlq'));
if (v.length < 4 || v.replace(v.slice(1, -1), ") == 'lt') var o = m;
else o = J(n + 'c', v.replace(d[n - 2], h[n - 2]).split("));
o.indexOf(m) == -1 && K();
if (b) b.onclick = function() if (e() && m != o) K()
}

Find more questions by tags JavaScript