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

#1173 How is P-code ofsXXX generated?
Author:
Date created:
Type: question
Visibility: Everybody
Assigned to:
Labels: P-code
State: closed Help

I'm wondering how p-code ofs"XXXX" is generated. Because I'm making a tool that generate code for a flash program. So I know how I should convert xxxx to. Right now do I only generate numbers. But I have seen letters too. And I wonder how it's generated. Example P-code generated from my tool: iffalse ofs5875 ofs5875: P-code example from the swf: iffalse ofs028f ofs028f:
It is a hexadecimal number 5875 is 22645 in dec 028f is 655
State: new→upgraded
It is just a label. You can put "dog" in it, any valid AS identifier, it will compile iffalse helloKitty ... helloKitty: this will compile in FFDec correctly. Label names are not stored in the SWF file so they are lost. During decompilation we assign then unique identifiers based on offset in the method - ofs028f is "ofs" and 028f which is address of the instruction in hexadecimal. The label does not matter, it just need to be unique in the P-code so we give them addressbased name.
Thanks.
State: upgraded→closed