JPEXS Free Flash Decompiler Issue Tracker

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.

List of issuesList of issues

#2491 Modifying P-Code from a CLI Export
Date created:
Type: feature
Visibility: Everybody
Assigned to:
Labels: ImportP-code
State: new Help

Hi, so i've made a python script that exports the action script from a swf file as the game we are modifying has swf files for 5 platforms (ps3, ps4, xb1, ios, wii u), which i tried to make it so i can build for all 5 platforms under 1 codebase, tho in most cases editing action script breaks stuff in game, tho i've noticed editing p-code works fine and doesn't have the same issue as editing the action script, by any chance is there anyway to import edited p-code into a .swf from cli? As i noticed you can export p-code from it, but i don't think it imported edited p-code file unless i was doing it wrong, thanks.
There are better P-code assemblers than FFDec, for example RABCDasm itself, which has the same syntax as FFDec. If you want to import P-code of a method to AS3 SWF file using commandline, then do it using following command: java -jar ffdec.jar -replace infile.swf outfile.swf com.jpexs.pkg.SampleClass input.pcode 159 where: com.jpexs.pkg.SampleClass is class where you want to do the replacement input.pcode is file with P-code of a *SINGLE* method, not a p-code of whole class 159 is method body index of the method you want to replace. You can find method body index by turning on "Scripts / Show method body id" in Advanced Settings. Then the id will be printed as a comment inside the decompiled code. It's a hard way tough, but I am really not into making a copy of RABCDasm. It's enough that I stole its syntax.