Deobfuscate Me

Fight against time to deobfuscate the JavaScript function and reval the password.

0:00

function validate(username, password)
{
    // JS is fun :) (also browser specific)
    p = noDups(password.toLowerCase());
    p = p.toUpperCase().replace(/[^A-Z]/g,'');
    if(p.indexOf('RSTCLA') == -1) { return false; }
    if(p.indexOf('JMGD') == -1) { return false; }
    if(p.length != 16) { return false; }
    
    var a = new Array(parseInt(p.length/2));
    for(var i = 0; i < a.length; i++)
    {
        c = parseInt(p.charCodeAt(i*2));
        c2 = parseInt(p.charCodeAt(i*2+1));  
        a[i]=((c>c2)?(c-c2):(c2-c));;
    }
    var b = new Array(parseInt(a.length/2));
    for(var i = 0; i < b.length; i++)
    {
        c = parseInt(a[i*2]);
        c2 = parseInt(a[i*2+1]);
        b[i]=((c/c2));
    }
    
    return (b[0]!=b[0])&&(b[1]==b[1])&&((b[2])&&((b[2]%2)!=(b[2]%2))&&(b[3]==b[3]));
    
    function noDups( s ) {
      var chars = {}, rv = '';
      for (var i = 0; i < s.length; ++i) {
        if (!(s[i] in chars)) {
          chars[s[i]] = 1;
          rv += s[i];
        }
      }
      return rv;
    }
}

Post Solution

You can pick any username,
but you'll need to deobfuscate the JS for the password.

Leaderboard

# Time Usernames
1 0:01 baboures
2 0:13 kronusme
3 0:19 avlidienbrunn
4 0:45 szytop
5 3:13 bek
6 21:49 Purkka
7 37:39 infandrew
8 61:22 Dizzi