Decompiles .swf files using FFDec, and processes the output to make it more readable.
- Convert line endings to LF
- Remove trailing whitespace
- Remove more than one empty line
- Add a newline at the end of the file
- Remove empty lines between interface function declarations
- Remove empty lines between class field declarations with same modifiers
- Recover function parameters based on function body (for setters and constructors)
- Recover function return type based on function signature (manual)
wget https://github.com/jindrapetrik/jpexs-decompiler/releases/download/version22.0.2/ffdec_22.0.2.zip
unzip ffdec_22.0.2.zip -d ffdec_22.0.2
cargo build --release
RUST_LOG=info ./target/release/build-tool decompile <file.swf> --output tree/file/ --ffdec ffdec_22.0.2/ffdec.jar
RUST_LOG=info ./target/release/build-tool preprocess tree/file/
# Now you can create a Git repository in the output directory and do an initial commit
# to make sure post-processing won't break anything
RUST_LOG=info ./target/release/build-tool postprocess tree/file/
# Now do another commitLicensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or https://apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.