If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
NEW : We have got a new blog where we post some interesting SWF internals info.

#513 SWF extraction from ZIP/SWC/binary/EXE files with command line support
Author:
megalol

Date created:
Type: feature
Visibility: Everybody
Assigned to:
honfika

Labels: BundlesCommandline
State: closed 

In GUI I can search in memory and dump swf but I want to be able to do it with command
line. And if there are several swf's in exe I want to be able to choose what to extract
(for examle the biggest one because other files are usually a GUI elements of Adobe Flash
Projector and doesn't needed to extract).
Assigned: →
honfika

Implemented, you can extract all swf or the biggest one. Default is: "all"
9) -extract <infile> [(all|biggest)]
...Extracts SWF files from ZIP or other binary files
Command line syntax can be changed in the stable build.
Please try the latest nightly build. Let me know if you need any other "extract mode".
State: new→upgraded
Thanks, that works but it takes much more time comparing with other exe2swf tools :D.
Yes, because ffdec parses all the tags to filter out invalid swf files. Should i switch
off this functionality for extracting from command line?
Maybe you can add a special command line switch to skip tags check if needed?
Try the latest nightly build with the following parameters:
9) -extract <infile> [nocheck] [(all|biggest)]
State: upgraded→upgraded
I can't get it work. My command: ffdec.bat -extract test.exe nocheck biggest
This one works (without nocheck): ffdec.bat -extract test.exe biggest
Also could be useful to write output .swf filename manually (for example "-o test.swf") or
for biggest switch auto get the name from exe (test + .swf).
For me the following syntax works:
ffdec.bat -extract 1.bin nocheck biggest
This is the same as what you wrote. Are you sure that you have the latest nightly build?
Is there any error message in the console output?
Or can you attach the exe file?
I'm using ffdec_1.8.1u1_76785fcfb2df. Here is a test file. With others exe's I have same
problem with nocheck.

Please try the latest nightly again.
Now it works but I didn't saw speed up on big files (about 50Mb) with nocheck.
And what about "Also could be useful to write output .swf filename manually (for example
"-o test.swf") or
for biggest switch auto get the name from exe (test + .swf)."?
it is implemented, now when you select "biggest" mode the output filename should be the
same as the input filename (with swf extension)
how slow is it? For me it takes only 1-2 seconds to extract the swf from the 10MB file.
This speed probably can't be much faster, because this is a java program, it needs to load
the runtime and JIT compile the bytecode. A native program can be much faster.
40mb swf (inside exe) takes about 20 seconds (with and wihout nocheck). Small swf (less
1mb) takes about 1-2 sec.
Can you attach that swf, too? Or upload somewhere? Or any similar public swf. (Which takes
long time to extract)
Try lwf.swf. You can create my test .exe by yourself with attached files. Extract content
of attached file near lwt.swf and run 1.bat.

Please try the latest nightly build. It should be much faster.
It has a small issue (but it was exist in the previous builds, too). In the end of
extracted swf there are some junk bytes (max 511 bytes). I'll try to find a solution to
fix it, but currently I dont know how to solve it (without recompressing the swf). The
exported swf is working, so its only a minor problem.
Thanks, now is much faster. But what about output .swf file location cmd switch? Because
if i run a batch (.bat) file from location outside ffdec it places output file near it:
java -jar "C:\ffdec\ffdec.jar" -extract "C:\ffdec\lwt.exe" nocheck biggest
.bat file is at C:\test and output .swf file was placed at C:\test
so I want to have an optional -o switch to specify output file location if needed
Ok. Earlier you wrote "-o switch" OR "get the name from exe", it was implemented:) (the
2nd part of the condition). I'll add "-o" command line switch later.
State: upgraded→new
Implemented:
9) -extract <infile> [-o <outpath>|<outfile>] [nocheck] [(all|biggest|first)]
...Extracts SWF files from ZIP or other binary files
...-o parameter should contain a file path when \"biggest\" or \"first\" parameter is
specified
...-o parameter should contain a folder path when no exctaction mode or \"all\"
parameter is specified
State: new→upgraded
Thanks, again. Seems to work fine.
State: upgraded→closed