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.

#172 AS1/2 checkPrecoNextParts() emptyness checks; not resolving constants
Author:
pepka

Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: AS1/2Obfuscated
State: closed 

> What steps will reproduce the problem?
The method in ActionGraph class is prone ArrayIndexOutOfBoundsException:
if (!items.isEmpty()) { <== this check doesn't guarantee that there
are more than 1 element
if (items.get(items.size() - 1) instanceof ActionIf) {
if (items.get(items.size() - 2) instanceof ActionStrictEquals) { <==
but here is the reference which intends at least 2 elements
List<Integer> storeRegisters = new ArrayList<>();
for (GraphSourceItem s : items) {
if (s instanceof ActionStoreRegister) {
ActionStoreRegister sr = (ActionStoreRegister) s;
storeRegisters.add(sr.registerNumber);
}
}
if (!storeRegisters.isEmpty()) {
List<GraphPart> caseBodies = new ArrayList<>();
boolean proceed = false;
do {
proceed = false;
caseBodies.add(part.nextParts.get(0)); //jump <== also it
seams that "part" can have no "nextParts" (see example)
part = part.nextParts.get(1); //nojump
items = getPartItems(part);
part = makeMultiPart(part);
...
Please check mx.transitions.Tween and mx.skins.halo.ButtonSkin for the first and second
issues respectively.
> What version of the product are you using? On what operating system?
1.6.4u1
The example is protected by SWF Protector 4.

State: new→opened
version 1.6.5 was released. This should be fixed, try it.
State: opened→upgraded
This problem has gone, but now I see CONSTANTs as it was once a long time ago:
if(!CONSTANT0)
{
CONSTANT2.CONSTANT3.CONSTANT4.CONSTANT5("CONSTANT1");
CONSTANT2.CONSTANT3.CONSTANT4.CONSTANT5("CONSTANT6");
CONSTANT7(vol_val);
CONSTANT0=true;
CONSTANT8(isMute);
}
State: upgraded→returned
Title: checkPrecoNextParts() is missing some emptyness checks→AS1/2 checkPrecoNextParts() emptyness checks; not resolving constants
Title: checkPrecoNextParts() is missing some emptyness checks→AS1/2 checkPrecoNextParts() emptyness checks; not resolving constants
State: returned→opened
version 1.6.5u1 was released
It should be better.
State: opened→upgraded
It's fixed. Thanks!
State: upgraded→closed