while testing my own implementation of a DoABC tag parser (Actionscript bytecode) i ran across a swf file that had something strange in it. There is a method with bytecode that makes little to no sense (even opcodes that are not defined!).
I have found some more swf files that have such a method. Strangely enough, this method seems to have always the same length and is always the last one defined, but the bytecode varies from file to file. However it seems the swf file is not in any way affected by this method, since it works fine. I figured that maybe this method is not called, but I cannot verify that at the moment.
Does anyone have an idea what the purpose of this method is?
For reference, one such file is here: http://swf.tubechop.com/tubechop.swf
This swf has some very strange things, I’m pretty sure it’s been obfuscated.
For example, this appears at the start of every method:
Which decompiles into
As for the method you’ve found, it looks like it’s just full of jibberish. There are no references to it, so the verifier will never even look at the code. Definitely a good technique to stop decompliation.
I checked it out with my own app: http://swfwire.com/inspector