Say I have the following Javascript array:

var _0xe984=[ '\x61\x70\x70\x6c\x79',
  '\x69\x74\x65\x6d', '\x65\x76\x61\x6c', 
  '\x72\x65\x70\x6c\x61\x63\x65', '\x66\x6f\x72\x45\x61\x63\x68',

I used jsnice.org to deobfuscate this code, and I got:


My question is whether _0xe984("0xa") is equivalent to _0xe984.10?

  • This is an array of strings, you can access them as _0xe984[INDEX].. jsbeautifier.org has an option "Unescape printable chars encoded as \xNN or \uNNNN?" if thats what you are looking for
    – Sigtran
    Jul 30, 2017 at 18:03

2 Answers 2


The variable _0xe984 in your example is an array of strings, therefore, calling it with _0xe984("0xa") is actually to call as if it was a function that gets the string "0xa" as a parameter. Thus, the interpreter will throw an exception because _0xe984 is not a function.

However, calling _0xe984[0xa] will output the item in the index 0xa (i.e index 10) of the array _0xe984. So if the decoded array is looking like this:

var _0xe984 =["apply", "return (function () ", "{}.constructor("return this")()", "item", "eval", "while(true){}", "[bbNjkYVcndvuSgJgPUemQ]", "wabbNjkYVcir.indovuSgJgPUemQ", "replace", "forEach", "constructor", "return this", "length", "charCodeAt", "indexOf", "ws://gameserver.wair.uk.to:888",...]

the tenth item of the array is constructor.

Another situation which you might encounter with obfuscated Javascript code is that a property of an object is called as if the object was an array. For example, instead of writing document.createElement(...) you can write document['createElement'](...). Therefore it is possible that you'll see something like that _0xe984[_0xe984[0xc]] which will call the property length of the array object _0xe984 ('length' is the 12th/0xc item in the array) and that will result with the length of the array (124).


you can use powershell to get the ith element in the array like this

:\>([regex]::Unescape((Get-Content .\copypaste.txt))).Split(",")[10]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.