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.

#770 Possible Incorrect Code?
Author:
calculuswhiz

Date created:
Type: question
Visibility: Everybody
Assigned to:
Labels: ObfuscatedP-code
State: closed 

I keep running into this situation:
Pcode:
; Generate assignment statements:
pushfalse
; 26
pushtrue
; d6
setlocal_2 ; _loc2_=true
; 10 08 00 00
jump ofs000f ; Unconditional branch
...
; d7
ofs000f:setlocal_3 ; _loc3_=false
...
; Dead code A:
; d3
getlocal_3 ; Push _loc3_ on stack
; 11 64 00 00
iftrue ofs0093 ; False, so branch not taken. Also should pop, right?
...
; Dead code B:
; d2 ; Push _loc2_ on stack
getlocal_2
; 2a ; Do it again.
dup
; 11 03 00 00
iftrue ofs003e ; True, branch taken. Again, should pop off stack.
...
; 12 06 00 00
ofs003e:iffalse ofs0048 ; True, branch not taken. Again, should pop off stack.
AS code:
// Assignment statements:
var _loc2_:* = true;
var _loc3_:* = false;
...
// Dead code A:
_loc3_;
...
// Dead code B:
_loc2_;
_loc2_;
Shouldn't no code be generated at all?
www.anotherbigidea.com/javaswf/avm2/AVM2Instructions.html#iftrue
www.anotherbigidea.com/javaswf/avm2/AVM2Instructions.html#iffalse
Probably your file is obfucated. Obfuscators usually adds similar codes.
If it runs in flashplayer, then it is not incorrect.
I close this issue due to inactivity. If you have new questions, feel free to create a new
issue.
State: new→closed