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 issues#944 AS3 PCode reading problem (not deobfuscation)
Author: honfika
Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: AS3ObfuscatedP-code
State: closed
> What steps will reproduce the problem?
Open abyss...swf
> What is the expected output? What do you see instead?
Exception:
Jul 05, 2015 7:25:23 AM com.jpexs.decompiler.flash.abc.types.MethodBody convert
SEVERE: Decompilation error in ab2137f0fe797b9/§72cddaee6e22e98§.initializer
java.util.concurrent.ExecutionException:
com.jpexs.decompiler.flash.abc.avm2.ConvertException: Invalid jump to ofs00021 on line -1
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at com.jpexs.helpers.CancellableWorker.get(CancellableWorker.java:99)
at com.jpexs.helpers.CancellableWorker.call(CancellableWorker.java:117)
at com.jpexs.decompiler.flash.abc.types.MethodBody.convert(MethodBody.java:271)
at com.jpexs.decompiler.flash.abc.types.traits.TraitClass.convert(TraitClass.java:551)
at com.jpexs.decompiler.flash.abc.types.traits.Trait.convertPackaged(Trait.java:171)
at com.jpexs.decompiler.flash.abc.ScriptPack.convert(ScriptPack.java:153)
at com.jpexs.decompiler.flash.abc.ScriptPack$1.call(ScriptPack.java:187)
at com.jpexs.decompiler.flash.abc.ScriptPack$1.call(ScriptPack.java:184)
at com.jpexs.helpers.CancellableWorker$3.doInBackground(CancellableWorker.java:112)
at com.jpexs.helpers.CancellableWorker$1.call(CancellableWorker.java:49)
at java.util.concurrent.FutureTask.run(Unknown Source)
at com.jpexs.helpers.CancellableWorker.run(CancellableWorker.java:66)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.jpexs.decompiler.flash.abc.avm2.ConvertException: Invalid jump to ofs00021
on line -1
at com.jpexs.decompiler.flash.abc.avm2.AVM2Code.adr2pos(AVM2Code.java:1167)
at
com.jpexs.decompiler.flash.abc.avm2.deobfuscation.AVM2DeobfuscatorRegisters$1.adr2pos(AVM2
DeobfuscatorRegisters.java:199)
at
com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction.getBranches(AVM2Instructi
on.java:379)
at
com.jpexs.decompiler.flash.abc.avm2.deobfuscation.AVM2DeobfuscatorRegisters.visitCode(AVM2
DeobfuscatorRegisters.java:175)
at
com.jpexs.decompiler.flash.abc.avm2.deobfuscation.AVM2DeobfuscatorRegisters.getSingleUseRe
gisters(AVM2DeobfuscatorRegisters.java:113)
at
com.jpexs.decompiler.flash.abc.avm2.deobfuscation.AVM2DeobfuscatorRegisters.deobfuscate(AV
M2DeobfuscatorRegisters.java:76)
at
com.jpexs.decompiler.flash.abc.types.MethodBody.convertMethodBody(MethodBody.java:341)
at com.jpexs.decompiler.flash.abc.types.MethodBody$1.call(MethodBody.java:263)
at com.jpexs.decompiler.flash.abc.types.MethodBody$1.call(MethodBody.java:260)
... 7 more
> What version of the product are you using? Is it "nighlty build"? Which operating system
do you have?
> Please provide any additional information below. If the problem is related to a SWF
file, attach it here, otherwise we can't help you.
This is not a deobfuscation problem. The read pcode list is invalid. So the problem is in
AVM2Code constructor.
For example:
; 5d 9d 14
ofs00096:findpropstrict Qname(PackageNamespace(""),"addChild")
; 14 d2 4f 9d
ofs00098:ifne ofs-6467528
; d2
ofs00099:getlocal_2
; 4f 9d 14 01
ofs00100:callpropvoid Qname(PackageNamespace(""),"addChild") 1
; 47
ofs00104:returnvoid
findpropstrict instruction is 3 bytes, so the next instruction shuold be the getlocal. But
between them there is an if. (probably it is from a lookupswitch)
Jump offset is negative, but it is not a problem, deobfuscation fixes it.
The problem is that the next instuction after the ifne was not read. (At offset 98+4 =
102)
Maybe I'll check this later, but currently I'm working on finding other decompilation
errors, so you can check it if you have time.
Try the version in the repository now.
State: new→upgraded
Fixed, thank you.
State: upgraded→closed