Frequently Asked Questions
- 1) Is the decompiler really free of charge? What are the downsides?
- Yes, you can download it and use for free. You can also view its source code. You don't have to pay a single penny. What you can do with the sources is limited to its GPLv3(gui) and LGPLv3(lib) licenses.
- 2) Can I use the decompiler for commercial purposes?
- Yes, you can run the FFDec application to work on commercial projects. You can also use its commandline arguments for commercial purposes. If you want to integrate its source code to your commercial product, then make sure you comply with the license of the code. Application GUI is licensed with GPLv3, which means any derivative works of its source code (and applications using it as library) must be also released under that license (= opensource). FFDec core library is licensed with LGPLv3, which means derivative works of the library source must stay opensource, but you can use it as binary library in closed source projects.
- 3) What is the "FFDec library" good for? Why to download it standalone?
- You can use the library in your own Java projects which work with SWF files. It has LGPLv3 license which mean you can link it in any project (open/closed source) you want.
- 4) Where is documenation for the souce code? (library, etc.)
- I am sorry, but there is none. I know it is terrible, but we focus on implementing new features and fixing bugs and there is not much time left to create documentation on how to use library or which classes to use. Some of the class names are pretty self-explaining, others not. Just try it.
- 5) There is a bug in the decompiler, it doesn't work. What can I do?
- You can report it in our issue tracker
so we will know about it and solve if possible, then somebody from community may notice it and fix it.
- 6) Can you export to FLA format CS4 or lower, Flash 8, etc. ?
- No, not easily. FLA files before CS5 are binary files without any documentation released so we cannot easily generate such files. FLA files CS5 or newer are based on XML, so easy to read and understand and thus generate. Only way to get pass this is reverse engineer old FLA format by generating these FLA files in some Flash generator and study the binary content, but it is hard, because noone knows meaning of every bytes. Commercial decompilers like Sothink or Trillix probably have a partnership with Adobe which gives them the specs for bunch of money. (speculation, I don't know where they got it)
- 7) Why are there these weird characters like §dw+dw§ or §§dup ?
- These are two kinds of things: A) §identifier§ - these are obfuscated identifiers B) §§instruction - there are special "preprocessor" instructions
- 8) How these §identifier§ work?
- If you see §something§ in the decompiled code, it means that "something" is identifier but it was scrambled by an obfuscator so it's now invalid ActionScript keyword. FFDec marks invalid identifiers with § prefix and postfix (+escapes § in it). With this syntax FFDec can display code colorized and handle them as identifiers and safely edit.
- 9) How these §§instructions work?
- We call them FFDec "preprocessor" instructions. If you encounter these somewhere, it usually means that the code was compiled with some not standard compiler(FlashCC, Haxe,...) or an obfuscator.
If you export the code for example to FLA or try to compile with other tool than FFDec, it will fail. And unfortunately, you cannot do anything with it. You can only fix it by replacing the instruction with othere
language constructs, but it is not always possible.
Current stable FFDec (7.1.2) cannot edit(=save) these instructions. This might be changed in future (nightly does that).
Examples: §§pop(), §§push(value), §§dup(value), §§goto, ...
- 10) I see §§dup instruction often, what can I do?
- §§dup instruction is "duplicate value on stack" instruction. dup is ActionScript bytecode instruction.
In many cases FFDec translates this instruction as simply duplicating values and you don't see it in final code.
In some special cases, §§dup is left in the code (v7.1.2).
var a = §§dup(someFunc()); var b = someFunc();In this code you see §§dup instruction. In the bytecode, there is call instruction to call someFunc function and then value is duplicated on the stack and assigned to both "a" and "b" variable. The function is called only once. In the decompiled code, it is sometimes hard to reflect this, so FFDec inserts §§dup preprocessor instruction to mark these duplicated code. If you remove §§dup identifier from the code, someFunc is called twice, which is sometimes bad idea. Maybe we figure out a better solution in the future. In current nightly, there is configuration option to hide §§dup, but as you can see - some code may be then be called twice.
- 11) What does "nightly build" mean. Where can I get it?
- Everytime our developers implement something new, it is pushed to "dev" branch of the source repository. At this moment, new nightly version is released. Nightly version thus contains newest updates. You can download nightly build on nightly download page. There can be some unfinished unstable parts. From time to time we release "stable" versions (dev is merged to "master" branch") which have different major/minor/release number.
If you try to run FFDec and you get something like
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/jpexs/decompiler/flash/ gui/Main : Unsupported major.minor version 51.0you are probably running program in older version of Java. FFDec needs Java 1.8 or later.