tags:

views:

76

answers:

1
var \x01 = -712 + \x04\x05();
for (\x01 = eval("\x01") + 242; eval("\x01") == 765; \x01 = eval("\x01") - 27)
{
} 

Is this valid ActionScript? If so what does it doo?

+2  A: 

Well, if it came fron an ActionScript file then yes, it probably does work.

It's certainly consistent in its use of strange identifiers for variables and functions. That means it's almost certainly been passed through an obfuscator of some sort to make it harder to do exactly what you're trying to do (decompile it is my guess but I may be wrong).

I'm not entirely sure that it does anything useful in its current form since there's no body in the for loop. But the code itself seems to:

  • Set the variable \x01 to whatever the function \x04\x05() returns less 712.
  • Loop with specific values of \x01 until it's not 765 (these seems unusual - terminating conditions are usually inequalities rather than equalties - in this case it seems that the loop will only execute once since you change \x01 each time through the loop).

Basically, with obfucated code, you should just replace the weird identifiers with more sensible ones to see if makes sense. That's a good first step to understanding the code (but probably not the only step required).

paxdiablo