Mochicrypt support, replace Sprite with GIF, SVG enhancements, AS1/2 code docs in the 19.1.x version of the decompiler.
19.1.2 – 2023-10-16
Mochicrypt packer support
SWF with content inside DefineBinaryData tags packed by Mochicrypt can now be viewed and also modified.

Replacing DefineSprites with GIF
Sprites can now be replaced with animated GIF images. FFDec will import the GIF animation frames to Sprite timeline. It will also sync the timeline with SWF frame rate.
You can also bulk import multiple GIFs (import menu). For command line you can use-importSprites
command.
When replacing Sprite this way, all items which were placed in that sprite before are removed. This does not include items that have associated class or are used elsewhere in the SWF file. This ensures that if you repeat GIF import with another image, you will not end up with cluttered old images all over place.
Invalid UTF-8 bytes in Strings as ‘{invalid_utf8:xxx}’
Strings are written in UTF-8 encoding in the SWF file. Some SWF cryptors which rename identifiers may use invalid UTF-8 bytes inside UTF-8 strings. To ensure FFDec will write always write the bytes as it has read them, special sequence in the format {invalid_utf8:xxx}
was introduced. The xxx
here is a number which is integer value of the byte actually read. This code is replaced with the actual xxx
byte value when written.
Modify header with command line -header
You can edit various items with the command line commands. Now you can also edit the basic thing as SWF header.
The syntax is following:
-header -set <key> <value> [-set <key2> <value2> ...] <swffile> [<outfile>]
Available keys:
- version
- gfx (true/false)
- displayrect ([x1,y1,x2,y2])
- width
- height
- framecount
- framerate
For width, height and displayrect subvalues you can use suffix px
for pixel values. Otherwise its twips.
The -header with just single swffile after it will print header info.
SVG frame export enhancements
If you export frame to SVG, now it will have more things, like:
Blend modes

(Note: for some reasons, it does not blend with white background)
Some modes are not supported in SVG – add, alpha, erase, invert, layer, subtract.
Filters

Some filters are not supported – gradient bevel, gradient glow.
SVG shapes non-scaling strokes
Strokes on shapes that have flag set to not scale their width when the shape is resized have now support for export and import SVG. Flash supports deciding whether to scale on x or y axes, SVG support only scaling/nonscaling on both axes.

DefineShape4 nonzero winding rule
Winding rule is special rule to determine whether portions of shape around path belong to shape or not. It is useful when you want to fill something. Standard shapes in flash use even odd winding rule.
DefineShape4 kind of shape supports also nonzero winding rule via its useFillWindingRule
flag.

In this version of FFDec, support for nonzero winding rule was added, including display, bitmap export, SVG import/export, canvas export.
Generic tag editor – MORPHSTYLE2 enums
Dropdown lists added for cap style and join style in MORPHSTYLE2 in DefineMorphshape2 tags, just like already present for LINESTYLE2 in normal shapes.

Generic tag editor – default values for filters
When you create new filter using generic tag editor, it now has some meaningful default values, instead of just transparent color, zero width, like before. It has default values that uses Flash CS6 editor.

AS1/2 P-code inline docs
For ActionScript 1 and ActionScript 2 files, a new P-code documentation window is displayed, just like for ActionScript 3. It shows some information for every action you have cursor on, its parameters, how stack looks like before and after.
P-code inline docs current argument hilighting
For both AS1/2 and AS3, now when you place your cursor on some place in the arguments of instruction/action, that argument is highlighted in the documentation window so you know what you write.

Large shape protection
When you edit points of a shape and you want to make shape larger, you may encounter problem saving the shape as the edges of shape have limits of lengths of coordinates. In previous version, the shape got corrupted. The new version shows error message and lets you fix it (make the shape smaller or insert points into some edges).

Changed:
AS1/2 P-code args separated by commas
Since this version, in ActionScript 1 and 2 P-code, the action arguments are shown with commas between arguments, instead of just space. You can write without commas and the program will accept it (like inserting code from previous version), but the new code is not accepted by older version.
Changed:
AS1/2 P-code GetURL2 switched parameters
We changed the order of arguments in GetURL2
action P-code, sendVarsMethod
argument is first.
It matches more the argument order in bytecode. The editor will accept older code, but older versions of FFDec will refuse compile the new order of arguments.
Leave a Reply