Merge pull request #59 from jindrapetrik/dev

dev to master for releasing new version
This commit is contained in:
Jindra Petřík
2018-01-17 21:39:08 +01:00
committed by GitHub
1707 changed files with 15963 additions and 14093 deletions
+3
View File
@@ -35,6 +35,9 @@
*.sh text eol=lf
*.bat text eol=crlf
# PHP scripts
*.php text
# Delphi sources
*.dpr text eol=crlf
*.dfm text eol=crlf
+3 -1
View File
@@ -71,4 +71,6 @@ hs_err_pid*.log
/libsrc/treetable/nbproject/private/
/libsrc/treetable/build/
/libsrc/treetable/dist/
/libsrc/plugins/nbproject/private/
/libsrc/plugins/nbproject/private/
/libsrc/plugins/dist/
/libsrc/plugins/build/
+15 -3
View File
@@ -2,6 +2,18 @@ language: java
jdk: [oraclejdk8]
before_install:
- sudo chmod a+x ./travis/*.sh
- ./travis/before_install.sh
install: ./travis/install.sh
script: ./travis/script.sh
- "./travis/before_install.sh"
install: "./travis/install.sh"
script: "source ./travis/script.sh"
notifications:
email:
recipients:
- [email protected]
on_success: change
on_failure: always
after_success: "source ./travis/after_success.sh"
branches:
#it is not tagged as nightly
#commits marked as nightly were already built
only:
- /^(?!nightly).*/
+81 -11
View File
@@ -2,6 +2,34 @@
All notable changes to this project will be documented in this file.
## [Unreleased]
### Added
- [#1240] AS search using multiple threads when parallel speedup is enabled
- [#1308] Search by all P-code files in AS3
- [#1333] Exporting sprites as swf files
- [#1365] Allow to configure all types of configuration settings from command line
- [#1369] Allow zoom in sprite (and button) export
- Debug tooltips on hover
- AS3 deobfuscation - removing push instructions immediately followed by pop
### Changed
- Homepage is now on GitHub jindrapetrik/jpexs-decompiler instead of free-decompiler.com
- Update checking now checks changes on GitHub releases
### Removed
- Removed help us section
- Removed changeslog from new version dialog
### Fixed
- [#1327] P-code editing: error message and syntax highlighting fixed when instruction name contains upper cased letter
- [#1343] AS 1/2 direct editation critical bug
- [#1348] Cannot properly export frame with cyrillic symbols to SVG
- [#1354] Various FLA export problem fixes
- [#1367] Raw edit conditional type fix.
- [#1401] SVG export: duplicate pattern IDs fixed
- [#1402] SVG export: certain font characters not exported properly fixed
- [#1430] AS 1/2 deobfuscation fixes
- Opening loaded SWF files during run fixed
- Not opening first script when clicked on app startup
## [10.0.0] - 2016-12-24
### Added
@@ -414,13 +442,13 @@ All notable changes to this project will be documented in this file.
### Changed
- Better gif exporter
- [#772]: closing loading dialog now cancels the loading of the swf
- [#772] closing loading dialog now cancels the loading of the swf
- [#762] export pcode with different extension
### Fixed
- CRITICAL: Update System Bug causing updates not working
- [#862] AS3 asm: do not read beyond return/throw instructions
- [#865], [#613]: ribbon prefered width fix
- [#865], [#613] ribbon prefered width fix
- [#868] export path fix, allow to export buttons
- [#865] TagTree font size problem on high resolution screens
- [#713],[#807] Installer for 4.0+ fails to access Adobe Website
@@ -435,7 +463,7 @@ All notable changes to this project will be documented in this file.
## [5.0.1] - 2015-04-18
### Fixed
- [#860]: Opening bundle (zip, swc, any binary file) files fixed
- [#860] Opening bundle (zip, swc, any binary file) files fixed
## [5.0.0] - 2015-04-18
### Added
@@ -563,13 +591,13 @@ All notable changes to this project will be documented in this file.
- [#716],[#717],[#718] Proxy - save SWF, replace, copy URL, filesizes, table design
### Changed
- [#720]: edited shape tag is not marked as modified after replacing
- [#720] edited shape tag is not marked as modified after replacing
- reorganized about dialog
### Fixed
- [#719] null swf name in Proxy after cancelling rename dialog
- flashplayer - font display
- [#723]: saving swf with invalid referenced characters
- [#723] saving swf with invalid referenced characters
- DefineCompactedFont paging
- [#288] Less memory usage during FLA export
- Corrected syntax hilighting for AS3 P-code
@@ -766,7 +794,7 @@ All notable changes to this project will be documented in this file.
- Advanced settings dialog with tabs, config names, descriptions
### Fixed
- [#561], [#509], [#433]: AS3 EmptyStackException fix - correct hasnext2 arguments
- [#561], [#509], [#433] AS3 EmptyStackException fix - correct hasnext2 arguments
- Internal viewer: Filters fix
## [2.0.1 update 2] - 2014-04-05
@@ -789,7 +817,7 @@ All notable changes to this project will be documented in this file.
- Internal viewer: Sounds on stage
- All sounds to WAV export
- Internal viewer: Showing texts, dynamic text border/fill
- [#504]: Unicode characters in JSyntaxPane
- [#504] Unicode characters in JSyntaxPane
- Internal viewer: showing object under cursor
- Folder icons
- Sound/Image format on command line.
@@ -816,7 +844,7 @@ All notable changes to this project will be documented in this file.
- Generic tag tree editor
- Timeline view (stub only)
- FLA export to CS5, CS5.5, CC format (previously only CS6 was supported)
- [#513]: command line option to extract swf from binary file
- [#513] command line option to extract swf from binary file
- Configurable code formatting (Indentation + brace position)
- [#262] Export FLA: Font character ranges export
- Configurable checking for updates
@@ -1482,6 +1510,11 @@ All notable changes to this project will be documented in this file.
- AS3: Method info editor fixed
- Edittext & Button displaying
## [1.2.0 update 1] - 2013-01-19
## Fixed
- [#27] Problems on loading DefineSceneAndFrameLabel
- CSMTextSettings tag writing fix
## [1.2.0] - 2013-01-19
### Added
- Displaying various SWF objects (shapes, sprites,...) with flash player library (Windows only, sorry).
@@ -1599,7 +1632,8 @@ All notable changes to this project will be documented in this file.
### Added
- Initial public release
[Unreleased]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version9.0.0...dev
[Unreleased]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version10.0.0...dev
[10.0.0]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version9.0.0...version10.0.0
[9.0.0]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version8.0.1...version9.0.0
[8.0.1]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version8.0.0...version8.0.1
[8.0.0]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version7.1.2...version8.0.0
@@ -1683,7 +1717,8 @@ All notable changes to this project will be documented in this file.
[1.4.0 update 1]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version1.4.0...version1.4.0u1
[1.4.0]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version1.3.1...version1.4.0
[1.3.1]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version1.3.0...version1.3.1
[1.3.0]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version1.2.0...version1.3.0
[1.3.0]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version1.2.0u1...version1.3.0
[1.2.0 update 1]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version1.2.0...version1.2.0u1
[1.2.0]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version1.1.0...version1.2.0
[1.1.0]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version1.0.1...version1.1.0
[1.0.1]: https://github.com/jindrapetrik/jpexs-decompiler/compare/version1.0.0...version1.0.1
@@ -2269,4 +2304,39 @@ All notable changes to this project will be documented in this file.
[#34]: https://www.free-decompiler.com/flash/issues/34
[#35]: https://www.free-decompiler.com/flash/issues/35
[#32]: https://www.free-decompiler.com/flash/issues/32
[#31]: https://www.free-decompiler.com/flash/issues/31
[#31]: https://www.free-decompiler.com/flash/issues/31
[#1240]: https://www.free-decompiler.com/flash/issues/1240
[#1308]: https://www.free-decompiler.com/flash/issues/1308
[#1333]: https://www.free-decompiler.com/flash/issues/1333
[#1365]: https://www.free-decompiler.com/flash/issues/1365
[#1369]: https://www.free-decompiler.com/flash/issues/1369
[#1327]: https://www.free-decompiler.com/flash/issues/1327
[#1343]: https://www.free-decompiler.com/flash/issues/1343
[#1348]: https://www.free-decompiler.com/flash/issues/1348
[#1354]: https://www.free-decompiler.com/flash/issues/1354
[#1367]: https://www.free-decompiler.com/flash/issues/1367
[#1401]: https://www.free-decompiler.com/flash/issues/1401
[#1402]: https://www.free-decompiler.com/flash/issues/1402
[#1430]: https://www.free-decompiler.com/flash/issues/1430
[#1254]: https://www.free-decompiler.com/flash/issues/1254
[#907]: https://www.free-decompiler.com/flash/issues/907
[#1311]: https://www.free-decompiler.com/flash/issues/1311
[#1313]: https://www.free-decompiler.com/flash/issues/1313
[#1308]: https://www.free-decompiler.com/flash/issues/1308
[#1189]: https://www.free-decompiler.com/flash/issues/1189
[#1274]: https://www.free-decompiler.com/flash/issues/1274
[#1275]: https://www.free-decompiler.com/flash/issues/1275
[#1278]: https://www.free-decompiler.com/flash/issues/1278
[#1281]: https://www.free-decompiler.com/flash/issues/1281
[#1254]: https://www.free-decompiler.com/flash/issues/1254
[#1289]: https://www.free-decompiler.com/flash/issues/1289
[#1283]: https://www.free-decompiler.com/flash/issues/1283
[#1294]: https://www.free-decompiler.com/flash/issues/1294
[#1302]: https://www.free-decompiler.com/flash/issues/1302
[#1309]: https://www.free-decompiler.com/flash/issues/1309
[#1312]: https://www.free-decompiler.com/flash/issues/1312
[#1303]: https://www.free-decompiler.com/flash/issues/1303
[#1314]: https://www.free-decompiler.com/flash/issues/1314
[#1320]: https://www.free-decompiler.com/flash/issues/1320
[#1323]: https://www.free-decompiler.com/flash/issues/1323
[#27]: https://www.free-decompiler.com/flash/issues/27
+11
View File
@@ -0,0 +1,11 @@
# How to contribute
## Pull requests
You can fork our decompiler on GitHub and then create pull request.
Pull request target branch should be `dev`, as this is main development branch.
## GUI vs Library
Make sure library part (libsrc/ffdec_lib) does not depend on GUI and does not contain anything GUI related.
## Tests
Make sure existing tests pass.
+191 -8
View File
@@ -1,11 +1,194 @@
JPEXS Free Flash Decompiler
================
# JPEXS Free Flash Decompiler
*Opensource flash SWF decompiler and editor. Extract resources, convert SWF to FLA, edit ActionScript, replace images, sounds, texts or fonts. Various output formats available. Works with Java on Windows, Linux or MacOS.*
Opensource flash SWF decompiler and editor. Extract resources, convert SWF to FLA, edit ActionScript, replace images, sounds, texts or fonts. Various output formats available. Works with Java on Windows, Linux or MacOS.
You can find more information on homepage at:
https://www.free-decompiler.com/flash/
## Application description and features
For information how to install, use the software, list of features, etc., visit [FFDec Wiki](https://github.com/jindrapetrik/jpexs-decompiler/wiki/).
**This page on GitHub contains only source code.** Everything else is on homepage.
You can download stable releases on GitHub here too and in fact, homepage redirects here for nonnightly builds,
but we still recommend to visit the page.
## Free-Decompiler.com website
In the past (before 2018), we were using *free-decompiler.com* domain as HomePage, GitHub for source code, now we moved all information to Github.
## Download application
Fow downloading the app, see [releases section](https://github.com/jindrapetrik/jpexs-decompiler/releases)
## Issue tracker
For bug reporting and/or feature requests, our own Issue tracker exists :
[https://www.free-decompiler.com/flash/issues](https://www.free-decompiler.com/flash/issues),
but as of 2018/01, our support is *very limited*.
## Source code
### How to get source
You can make local copy of the sources with the following command:
```
git clone https://github.com/jindrapetrik/jpexs-decompiler.git
```
### Branches
Git source control manager supports multiple code branches. We use two main branches.
* `master` - for released "stable" versions
* `dev` - for newest changes from developers - "nightly" version is released from this branch
You can switch to `dev` branch with following git command:
```
git checkout dev
```
### GIT recommended
It is recommended to have [GIT] commandline executables installed. Building script uses GIT to include revision number in to the binary. (For Windows, you must enable Git in windows commandline during installation.)
### Netbeans project
Source code contains Netbeans Project so you can open it in [Netbeans IDE]. Then you can use standard actions like Run, Build,Debug, Clean and Build in the IDE. Other specific tasks can be executed via menu on build.xml (see Ant part)
### Ant
If you do not have Netbeans, you can build source code also with Apache Ant.
After installing Ant it is good to put it into your PATH variable.
Open up commandline and navigate to sources directory.
To run application, execute task "run" by entering this command:
```
ant run
```
To only build, execute build task:
```
ant build
```
For creating EXE, Installer and ZIP version, there exist Ant tasks "exe","installer","release". These tasks require additional software installed:
* [launch4j] (3.5 or newer) - creates windows executable
* [NSIS] (Nullsoft Scriptable Install System) (3.0b3 or newer) - creates installer
You must configure installation path of these tools in tools.properties file, which could look like this for windows:
```
nsis.path = c:\\program files (x86)\\NSIS
launch4j.path = c:\\program files (x86)\\launch4j
```
### Building libraries
There are few libraries which need to be built too. These libraries are placed in "libsrc" directory.
* **FFDec_lib** - core of decompilation, SWF parsing, exporting
**This library is built automatically with main project, but can be build also separately with its own Ant script.**
* **jpacker** - used for compression of JavaScript Canvas scripts (Netbeans/Ant project)
* **jpproxy** - proxy part of FFDec (Netbeans/Ant project)
* **jsyntaxpane** - code editor (Netbeans/Apache Maven project)
* **LZMA** - used for SWF compression (Netbeans/Ant project)
* **nellymoser** - used for Nelly Moser sounds decoding (Netbeans/Ant project)
* **Swf2Exe** - Stub for "Save to EXE" feature (Delphi 7 Project)
* **ttf** - used for TTF font export (Netbeans/Ant project)
* **gnujpdf** - used for PDF export (Netbeans/Ant project)
## Change log
All notable changes are listed in the file [CHANGELOG.md](CHANGELOG.md)
## Deployment
### Nightly builds
When a commit is pushed/merged into `dev` branch, new prerelease version is created automatically by Travis CI,
these prerelease versions are called nightly builds. On releasing new nightly build, previous nightly build is removed.
### Stable versions
New stable version is created automatically by Travis CI when marking a revision in `master` branch with a tag in format `versionxxx`.
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning
Versions are in format `x.y.z`, for example `9.1.2`.
For the versions available, see the [tags on this repository](https://github.com/jindrapetrik/jpexs-decompiler/tags).
Nightly builds have additional suffix `_nightlyN` where `N` is number which increments with every (automatic) nightly releleas
and does not depend on the `x.y.z` numbers. (This means nightly number is *NOT* reseted to 0 when releasing stable)
Older nightly builds are *NOT* available through git tags.
## Authors
The decompiler was originally written by **Jindra Petřík** also known as **JPEXS**.
The application was made in Czech republic.
### Developers
* **JPEXS** - leader, development of the decompiler, website main admin, github account admin, organization
* **honfika** - development of the decompiler
* **Paolo Cancedda** - former developer
* ...other pushers on GitHub or Google Code
### Translators
* **Jaume Badiella Aguilera** - catalan translation
* **Capasha** - swedish translation
* **王晨旭** (Chenxu Wang) - chinese translation
* **focus** - russian translation
* **honfika** - hungarian translation
* **kalip** - italian translation
* **Krock** - german translation
* **Laurent LOUVET** - french translation
* **MaGiC** - portugese translation
* **martinkoza** - polish translation
* **pepka** - ukrainian and dutch translation
* **poxyran** - spanish translation
* **realmaster42** - portugese-brasil translation
* **Rtsjx** - chinese translation
## Licenses + Acknowledgments
### Application
FFDec Application is licensed with GNU GPL v3, see the [license.txt](license.txt).
It uses modified code of these libraries:
* [JSyntaxPane] (Code editor) - Apache License 2.0
* [Muffin] (Proxy) - GPL
And links also these libraries:
* [Java Native Access - JNA] (Registry association, Process memory reading) - LGPL
* [Insubstantial] (Substance Look and Feel, Flamingo Ribbon component) - Revised BSD
* [javactivex] (Flash Player ActiveX embedding) - LGPLv3
* [flashdebugger library] (Debugging ActionScript) - LGPLv3
* FFDec Library (LGPLv3) - see below
Application uses also some icons of the [Silk icons pack], [Silk companion 1] and [FatCow icons pack].
### Library
FFDec Library is licensed with GNU LGPL v3, see [license.txt](libsrc/ffdec_lib/license.txt) for details.
It uses modified code of these libraries:
* [sfntly] (WOFF font export) - Apache License 2.0
* [JLayer] (Decoding MP3) - LGPL
* UAB "DKD" NellyMoser ASAO codec (Decoding Nelly Moser sound format) - LGPL
* [Animated GIF Writer] (Frames to GIF export) - Creative Commons Attribution 3.0 Unported
* [Animated GIF Encoder] (Frames to GIF export)
And links also these libraries:
* [LZMA SDK] (SWF de/compress) - public domain
* [Monte Media Library] (Frames to AVI export) - LGPL
* [Fontastic] (Font TTF export) - LGPL
* [DoubleType] (Font TTF export) - GPLv2
* [jPacker] (Canvas scripts compression) - MIT License
* [gnujpdf] (PDF export) - LGPL License
[GIT]: http://git-scm.com/downloads
[Netbeans IDE]: http://www.netbeans.org/
[Apache Ant]: http://ant.apache.org/
[launch4j]: http://launch4j.sourceforge.net/
[NSIS]: http://nsis.sourceforge.net/
[JSyntaxPane]: https://code.google.com/p/jsyntaxpane/
[Muffin]: http://muffin.doit.org/
[Java Native Access - JNA]: https://github.com/twall/jna
[Insubstantial]: http://shemnon.com/speling/2011/04/insubstantial-62-release.html
[javactivex]:https://github.com/jindrapetrik/javactivex
[flashdebugger library]: https://github.com/jindrapetrik/flashdebugger
[Silk icons pack]: http://www.famfamfam.com/lab/icons/silk/
[Silk companion 1]: http://damieng.com/creative/icons/silk-companion-1-icons
[FatCow icons pack]: http://www.fatcow.com/free-icons
[sfntly]: https://code.google.com/p/sfntly/
[JLayer]: http://www.javazoom.net/javalayer/javalayer.html
[Animated GIF Writer]: http://elliot.kroo.net/software/java/GifSequenceWriter/
[Animated GIF Encoder]: http://www.fmsware.com/stuff/gif.html
[LZMA SDK]: http://www.7-zip.org/sdk.html
[Monte Media Library]: http://www.randelshofer.ch/monte/
[Fontastic]: http://code.andreaskoller.com/libraries/fontastic/
[DoubleType]: http://sourceforge.net/projects/doubletype/
[jPacker]: https://code.google.com/p/jpacker/
[gnujpdf]: http://gnujpdf.sourceforge.net/
+4 -4
View File
@@ -11,7 +11,7 @@ min.java.version = 1.8.0
vendor = JPEXS
internal.name = FFDec
product.name = JPEXS Free Flash Decompiler
product.url = https://www.free-decompiler.com/flash/
product.url = https://github.com/jindrapetrik/jpexs-decompiler
main.class = com.jpexs.decompiler.flash.gui.Main
mac.bundle = com.jpexs.decompiler.flash
@@ -35,10 +35,10 @@ version_info = version.properties
exe.config = build_exe.xml
website.upload.url = https://www.free-decompiler.com/flash/release/release
website.version.url = https://www.free-decompiler.com/flash/release/versionid
website.upload.url = -
website.version.url = -
app.vendor.mail = flash@free-decompiler.com
app.vendor.mail = jindra.petrik@gmail.com
app.osx.dir = FFDec
app.deb.desktop.file = FFDec
+4 -142
View File
@@ -476,129 +476,10 @@
</target>
<target name="-upload-fail" unless="upload.config.exists">
<fail message="Cannot upload - Website properties file missing. Create file named jpexs_website.properties and put username=xxx, password=yyy lines in there" />
</target>
<target name="-set-none-newversion" unless="newversion.type">
<property name="newversion.type" value="none"/>
</target>
<target name="-check-version-online" depends="-set-none-newversion,git-tag">
<loadproperties srcfile="jpexs_website.properties" prefix="website"/>
<echo level="info">Checking version online: ${newversion.type}...</echo>
<!-- Note: You must have developer account to upload to JPEXS website -->
<java jar="${ant.lib.dir}/uploader.jar" fork="true" failonerror="true" outputproperty="newversion.prop">
<arg value="${website.version.url}" />
<arg value="-field" />
<arg value="mode" />
<arg value="commandline" />
<arg value="-field" />
<arg value="set_username" />
<arg value="${website.username}" />
<arg value="-field" />
<arg value="set_password" />
<arg value="${website.password}" />
<arg value="-field" />
<arg value="revision" />
<arg value="${git.tag}" />
<arg value="-field" />
<arg value="new" />
<arg value="${newversion.type}" />
</java>
<echo file="${version_info}" message="${newversion.prop}" force=""/>
</target>
<target name="-upload-do" if="upload.config.exists">
<loadproperties srcfile="jpexs_website.properties" prefix="website"/>
<echo level="info">Uploading...</echo>
<!-- Note: You must have developer account to upload to JPEXS website -->
<java jar="${ant.lib.dir}/uploader.jar" fork="true" failonerror="true">
<arg value="${website.upload.url}" />
<arg value="-field" />
<arg value="mode" />
<arg value="commandline" />
<arg value="-field" />
<arg value="set_username" />
<arg value="${website.username}" />
<arg value="-field" />
<arg value="set_password" />
<arg value="${website.password}" />
<arg value="-${upload.form.new.type}" />
<arg value="new" />
<arg value="${upload.form.new.value}" />
<arg value="-${upload.form.fixed.type}" />
<arg value="fixed" />
<arg value="${upload.form.fixed.value}" />
<arg value="-file" />
<arg value="fileExe" />
<arg value="${exe.file}" />
<arg value="-file" />
<arg value="fileZip" />
<arg value="${zip.file}" />
<arg value="-file" />
<arg value="fileOSXZip" />
<arg value="${osx.zip.file}" />
<arg value="-file" />
<arg value="filePkg" />
<arg value="${pkg.file}" />
<arg value="-file" />
<arg value="fileDeb" />
<arg value="${deb.file}" />
<arg value="-file" />
<arg value="fileLang" />
<arg value="${lang.file}" />
<arg value="-file" />
<arg value="fileLib" />
<arg value="${lib.file}" />
</java>
</target>
<target name="-upload-check-config">
<available file="jpexs_website.properties" property="upload.config.exists"/>
</target>
<!-- Prepare upload dialog to not show (no changes in nightly) -->
<target name="-upload-check-nightly" if="nightly">
<property name="upload.form.new.type" value="emptyfield" />
<property name="upload.form.new.value" value="" />
<property name="upload.form.fixed.type" value="emptyfield" />
<property name="upload.form.fixed.value" value="" />
</target>
<!-- Prepare upload dialog to show -->
<target name="-upload-check-stable" unless="nightly">
<property name="upload.form.new.type" value="textarea" />
<property name="upload.form.new.value" value="New:" />
<property name="upload.form.fixed.type" value="textarea" />
<property name="upload.form.fixed.value" value="Fixed:" />
</target>
<target name="-upload" depends="-upload-check-nightly,-upload-check-stable,-upload-check-config,-upload-do,-upload-fail">
</target>
<target name="dist" depends="build,exe">
<copy todir="${dist.dir}">
<fileset dir="${resources.dir}" includes="**/*.*"/>
@@ -646,7 +527,7 @@
</copy>
<echo file="${locales.target.dir}/readme.txt">${project.name} ${version}${version.suffix} localization pack
-------------------------------------------------------------------
Please follow instructions on https://www.free-decompiler.com/flash/translations/
Please follow instructions on https://github.com/jindrapetrik/jpexs-decompiler
</echo>
<property name="lang.file" value="${releases.dir}/${prefix.filename}_${version}${version.suffix}_lang.zip" />
<zip destfile="${lang.file}" basedir="${locales.target.dir}"/>
@@ -901,29 +782,10 @@
<property name="new.version" value="1" />
</target>
<target name="new-version-major" depends="git-pull,-new-version-set,-inc-major,-check-version-online,all,-upload,git-push">
<target name="new-version" depends="-new-version-set,-set-none-newversion,all">
</target>
</target>
<target name="new-version-minor" depends="git-pull,-new-version-set,-inc-minor,-check-version-online,all,-upload,git-push">
</target>
<target name="new-version-release" depends="git-pull,-new-version-set,-inc-release,-check-version-online,all,-upload,git-push">
</target>
<target name="new-version-nightlybuild" depends="git-pull,-new-version-set,-inc-nightlybuild,-check-version-online,all,-upload,git-push">
</target>
<target name="upload-last" depends="all,-upload">
</target>
<target name="windows-home" >
</target>
-1
View File
@@ -1 +0,0 @@
Testing CI2
+1 -1
View File
@@ -4,7 +4,7 @@
#define MyAppName "JPEXS Free Flash Decompiler"
#include "installer.cfg"
#define MyAppPublisher "JPEXS"
#define MyAppURL "http://www.free-decompiler.com/flash/"
#define MyAppURL "https://github.com/jindrapetrik/jpexs-decompiler"
#define MyAppExeName "ffdec.exe"
[Setup]
+2 -27
View File
@@ -11,7 +11,7 @@
!define APP_VER "0.0"
!define APP_VER_MAJOR 0
!define APP_VER_MINOR 0
!define APP_URL "https://www.free-decompiler.com/flash/"
!define APP_URL "https://github.com/jindrapetrik/jpexs-decompiler"
!define APP_PUBLISHER "JPEXS"
!define APP_NAME "JPEXS Free Flash Decompiler"
!define JRE_VERSION "1.8"
@@ -304,7 +304,7 @@ var SMDir
!insertmacro MUI_PAGE_STARTMENU 0 $SMDir
;Page custom CUSTOM_PAGE_CONTEXTMENU
!insertmacro MUI_PAGE_INSTFILES
Page custom CUSTOM_PAGE_HELPUS
;Page custom CUSTOM_PAGE_HELPUS
!define MUI_FINISHPAGE_RUN "$INSTDIR\${APP_EXENAME}"
!insertmacro MUI_PAGE_FINISH
@@ -402,11 +402,6 @@ var SMDir
Exch $R2
!macroend
Function HelpUsClick
ExecShell "Open" "https://www.free-decompiler.com/flash/help_us.html"
FunctionEnd
!define un.StrRep "!insertmacro un.StrRep"
!macro un.StrRep output string old new
Push `${string}`
@@ -496,26 +491,6 @@ Function AddContextClick
${NSD_GetState} $1 $AddToContextMenu
FunctionEnd
*/
Function CUSTOM_PAGE_HELPUS
nsDialogs::create /NOUNLOAD 1018
pop $1
!insertmacro MUI_HEADER_TEXT "$(STRING_HELP_US)" "$(STRING_HELP_US_DOYOU)"
${NSD_CreateLabel} 0 0 100% 50 "$(STRING_HELP_US_FREE)"
pop $1
${NSD_CreateLabel} 0 75 100% 50 "$(STRING_HELP_US_DONATE)"
pop $1
${NSD_CreateLabel} 0 150 200 25 "$(STRING_HELP_US_MORE)"
pop $1
${NSD_CreateButton} 225 145 80 25 "$(STRING_HELP_US_BUTTON)"
pop $1
${NSD_OnClick} $1 HelpUsClick
nsDialogs::Show
FunctionEnd
Function IndexOf
Exch $R0
Binary file not shown.
Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
Copyright (c) 2013, 2014 EclipseSource
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -88,7 +88,7 @@ Multiname = m\[[0-9]+\]
Identifier = [:jletter:][:jletterdigit:]*
InstructionName = [a-z][a-z0-9_]*
InstructionName = [:jletter:][:jletterdigit:]*
Label = {Identifier}:
@@ -70,7 +70,7 @@ WhiteSpace = [ \t\f]+
Identifier = [:jletter:][:jletterdigit:]*
InstructionName = [a-zA-Z][a-zA-Z0-9_]*
InstructionName = [:jletter:][:jletterdigit:]*
Label = {Identifier}:
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import java.util.ResourceBundle;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import java.io.IOException;
@@ -53,17 +52,24 @@ public class ApplicationInfo {
public static String shortApplicationVerName;
public static final String PROJECT_PAGE = "https://www.free-decompiler.com/flash";
public static final String GIT_HUB_PROJECT = "jindrapetrik/jpexs-decompiler";
public static final String PROJECT_PAGE = "https://github.com/" + GIT_HUB_PROJECT;
/**
* URL for checking new updates
*/
public static String updateCheckUrl = "https://www.free-decompiler.com/flash/update/check/?currentVersion=<version>&currentRevision=<revision>&currentVersionMajor=<version.major>&currentVersionMinor=<version.minor>&currentVersionRelease=<version.release>&currentVersionBuild=<version.build>&currentNightly=<nightly>";
public static final String GITHUB_RELEASES_LATEST_URL = "https://api.github.com/repos/" + GIT_HUB_PROJECT + "/releases/latest";
/**
* URL for checking new updates
*/
public static final String GITHUB_RELEASES_URL = "https://api.github.com/repos/" + GIT_HUB_PROJECT + "/releases";
/**
* URL for doing update
*/
public static String updateUrl = "https://www.free-decompiler.com/flash/update/update/?currentVersion=<version>&currentRevision=<revision>&currentVersionMajor=<version.major>&currentVersionMinor=<version.minor>&currentVersionRelease=<version.release>&currentVersionBuild=<version.build>&currentNightly=<nightly>";
public static String UPDATE_URL = PROJECT_PAGE;
static {
loadProperties();
@@ -105,26 +111,6 @@ public class ApplicationInfo {
} catch (IOException | NullPointerException | NumberFormatException ex) {
// ignore
version = "unknown";
}
try {
updateCheckUrl = updateCheckUrl
.replace("<revision>", URLEncoder.encode(revision, "UTF-8"))
.replace("<version>", URLEncoder.encode(version, "UTF-8"))
.replace("<version.major>", "" + version_major)
.replace("<version.minor>", "" + version_minor)
.replace("<version.release>", "" + version_release)
.replace("<version.build>", "" + version_build)
.replace("<nightly>", nightly ? "1" : "0");
updateUrl = updateUrl
.replace("<revision>", URLEncoder.encode(revision, "UTF-8"))
.replace("<version>", URLEncoder.encode(version, "UTF-8"))
.replace("<version.major>", "" + version_major)
.replace("<version.minor>", "" + version_minor)
.replace("<version.release>", "" + version_release)
.replace("<version.build>", "" + version_build)
.replace("<nightly>", nightly ? "1" : "0");
} catch (UnsupportedEncodingException e) {
}
applicationVerName = APPLICATION_NAME + " v." + version;
shortApplicationVerName = SHORT_APPLICATION_NAME + " v." + version;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.decompiler.graph.GraphSourceItem;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.helpers.SwfHeaderStreamSearch;
@@ -0,0 +1,181 @@
/*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.decompiler.flash.abc.ScriptPack;
import com.jpexs.decompiler.flash.abc.types.ConvertData;
import com.jpexs.decompiler.flash.abc.types.ScriptInfo;
import com.jpexs.decompiler.flash.action.ActionList;
import com.jpexs.decompiler.flash.cache.ScriptDecompiledListener;
import com.jpexs.decompiler.flash.configuration.Configuration;
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
import com.jpexs.decompiler.flash.helpers.HighlightedText;
import com.jpexs.decompiler.flash.helpers.HighlightedTextWriter;
import com.jpexs.decompiler.flash.tags.base.ASMSource;
import com.jpexs.helpers.ImmediateFuture;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* @author JPEXS
*/
public class DecompilerPool {
private final ThreadPoolExecutor executor;
public DecompilerPool() {
int threadCount = Configuration.getParallelThreadCount();
executor = new ThreadPoolExecutor(threadCount, threadCount,
0L, TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<>());
}
public Future<HighlightedText> submitTask(ASMSource src, ActionList actions, ScriptDecompiledListener<HighlightedText> listener) {
Callable<HighlightedText> callable = new Callable<HighlightedText>() {
@Override
public HighlightedText call() throws Exception {
if (listener != null) {
listener.onStart();
}
HighlightedTextWriter writer = new HighlightedTextWriter(Configuration.getCodeFormatting(), true);
writer.startFunction("!script");
src.getActionScriptSource(writer, actions);
writer.endFunction();
HighlightedText result = new HighlightedText(writer);
SWF swf = src.getSwf();
if (swf != null) {
swf.as2Cache.put(src, result);
}
if (listener != null) {
listener.onComplete(result);
}
return result;
}
};
return submit(callable);
}
public Future<HighlightedText> submitTask(ScriptPack pack, ScriptDecompiledListener<HighlightedText> listener) {
Callable<HighlightedText> callable = new Callable<HighlightedText>() {
@Override
public HighlightedText call() throws Exception {
if (listener != null) {
listener.onStart();
}
int scriptIndex = pack.scriptIndex;
ScriptInfo script = null;
if (scriptIndex > -1) {
script = pack.abc.script_info.get(scriptIndex);
}
boolean parallel = Configuration.parallelSpeedUp.get();
HighlightedTextWriter writer = new HighlightedTextWriter(Configuration.getCodeFormatting(), true);
pack.toSource(writer, script == null ? null : script.traits.traits, new ConvertData(), ScriptExportMode.AS, parallel);
HighlightedText result = new HighlightedText(writer);
SWF swf = pack.getSwf();
if (swf != null) {
swf.as3Cache.put(pack, result);
}
if (listener != null) {
listener.onComplete(result);
}
return result;
}
};
return submit(callable);
}
private Future<HighlightedText> submit(Callable<HighlightedText> callable) {
boolean parallel = Configuration.parallelSpeedUp.get();
if (parallel) {
Future<HighlightedText> f = executor.submit(callable);
return f;
} else {
boolean cancelled = false;
Throwable throwable = null;
HighlightedText result = null;
try {
result = callable.call();
} catch (InterruptedException ex) {
cancelled = true;
} catch (Exception ex) {
throwable = ex;
}
return new ImmediateFuture<>(result, throwable, cancelled);
}
}
public String getStat() {
return "core: " + executor.getCorePoolSize()
+ " size: " + executor.getPoolSize()
+ " largest: " + executor.getLargestPoolSize()
+ " max: " + executor.getMaximumPoolSize()
+ " active: " + executor.getActiveCount()
+ " count: " + executor.getTaskCount()
+ " completed: " + executor.getCompletedTaskCount();
}
public HighlightedText decompile(ASMSource src, ActionList actions) throws InterruptedException {
Future<HighlightedText> future = submitTask(src, actions, null);
try {
return future.get();
} catch (InterruptedException ex) {
future.cancel(true);
throw ex;
} catch (ExecutionException ex) {
Logger.getLogger(DecompilerPool.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
}
public HighlightedText decompile(ScriptPack pack) throws InterruptedException {
Future<HighlightedText> future = submitTask(pack, null);
try {
return future.get();
} catch (InterruptedException ex) {
future.cancel(true);
throw ex;
} catch (ExecutionException ex) {
Logger.getLogger(DecompilerPool.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
}
public void shutdown() throws InterruptedException {
executor.shutdown();
if (!executor.awaitTermination(100, TimeUnit.SECONDS)) {
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
/**
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.decompiler.flash.abc.RenameType;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.decompiler.flash.tags.Tag;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import java.io.IOException;
@@ -42,6 +41,10 @@ public class RetryTask {
} catch (InterruptedException ex) {
throw ex;
} catch (Exception ex) {
if (handler == null) {
throw ex;
}
switch (handler.handle(ex)) {
case AbortRetryIgnoreHandler.ABORT:
throw ex;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import java.io.IOException;
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import java.io.File;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import SevenZip.Compression.LZMA.Decoder;
@@ -36,7 +35,6 @@ import com.jpexs.decompiler.flash.abc.avm2.model.StringAVM2Item;
import com.jpexs.decompiler.flash.abc.types.ConvertData;
import com.jpexs.decompiler.flash.abc.types.MethodBody;
import com.jpexs.decompiler.flash.abc.types.Multiname;
import com.jpexs.decompiler.flash.abc.types.ScriptInfo;
import com.jpexs.decompiler.flash.abc.types.traits.Trait;
import com.jpexs.decompiler.flash.abc.types.traits.TraitClass;
import com.jpexs.decompiler.flash.abc.types.traits.TraitMethodGetterSetter;
@@ -70,6 +68,9 @@ import com.jpexs.decompiler.flash.action.swf5.ActionNewMethod;
import com.jpexs.decompiler.flash.action.swf5.ActionNewObject;
import com.jpexs.decompiler.flash.action.swf5.ActionSetMember;
import com.jpexs.decompiler.flash.action.swf7.ActionDefineFunction2;
import com.jpexs.decompiler.flash.cache.AS2Cache;
import com.jpexs.decompiler.flash.cache.AS3Cache;
import com.jpexs.decompiler.flash.cache.ScriptDecompiledListener;
import com.jpexs.decompiler.flash.configuration.Configuration;
import com.jpexs.decompiler.flash.dumpview.DumpInfo;
import com.jpexs.decompiler.flash.dumpview.DumpInfoSwfNode;
@@ -156,6 +157,7 @@ import com.jpexs.decompiler.graph.model.LocalData;
import com.jpexs.helpers.ByteArrayRange;
import com.jpexs.helpers.Cache;
import com.jpexs.helpers.Helper;
import com.jpexs.helpers.ImmediateFuture;
import com.jpexs.helpers.NulStream;
import com.jpexs.helpers.ProgressListener;
import com.jpexs.helpers.SerializableImage;
@@ -187,6 +189,7 @@ import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.TreeMap;
import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.DeflaterOutputStream;
@@ -338,13 +341,12 @@ public final class SWF implements SWFContainerItem, Timelined {
private final Cache<SoundTag, byte[]> soundCache = Cache.getInstance(false, false, "sound");
@Internal
private final Cache<ASMSource, ActionList> as2PcodeCache = Cache.getInstance(true, true, "as2pcode");
public final AS2Cache as2Cache = new AS2Cache();
@Internal
private final Cache<ASMSource, HighlightedText> as2Cache = Cache.getInstance(true, false, "as2");
public final AS3Cache as3Cache = new AS3Cache();
@Internal
private final Cache<ScriptPack, HighlightedText> as3Cache = Cache.getInstance(true, false, "as3");
private static final DecompilerPool decompilerPool = new DecompilerPool();
public static List<String> swfSignatures = Arrays.asList(
"FWS", // Uncompressed Flash
@@ -395,7 +397,6 @@ public final class SWF implements SWFContainerItem, Timelined {
swfList.swfs.clear();
}
as2PcodeCache.clear();
as2Cache.clear();
as3Cache.clear();
frameCache.clear();
@@ -1488,7 +1489,27 @@ public final class SWF implements SWFContainerItem, Timelined {
}
}
public static SWFHeader decodeHeader(byte[] headerData) throws IOException {
String signature = new String(headerData, 0, 3, Utf8Helper.charset);
if (!swfSignatures.contains(signature)) {
throw new SwfOpenException("Invalid SWF file, wrong signature.");
}
int version = headerData[3];
long fileSize;
try (SWFInputStream sis = new SWFInputStream(null, Arrays.copyOfRange(headerData, 4, 8), 4, 4)) {
fileSize = sis.readUI32("fileSize");
}
SWFHeader header = new SWFHeader();
header.version = version;
header.fileSize = fileSize;
header.gfx = headerData[1] == 'F' && headerData[2] == 'X';
return header;
}
private static SWFHeader decompress(InputStream is, OutputStream os, boolean allowUncompressed) throws IOException {
byte[] hdr = new byte[8];
// SWFheader: signature, version and fileSize
@@ -1496,25 +1517,12 @@ public final class SWF implements SWFContainerItem, Timelined {
throw new SwfOpenException("SWF header is too short");
}
String signature = new String(hdr, 0, 3, Utf8Helper.charset);
if (!swfSignatures.contains(signature)) {
throw new SwfOpenException("Invalid SWF file, wrong signature.");
}
SWFHeader header = decodeHeader(hdr);
long fileSize = header.fileSize;
int version = hdr[3];
long fileSize;
try (SWFInputStream sis = new SWFInputStream(null, Arrays.copyOfRange(hdr, 4, 8), 4, 4)) {
fileSize = sis.readUI32("fileSize");
}
SWFHeader header = new SWFHeader();
header.version = version;
header.fileSize = fileSize;
header.gfx = hdr[1] == 'F' && hdr[2] == 'X';
try (SWFOutputStream sos = new SWFOutputStream(os, version)) {
try (SWFOutputStream sos = new SWFOutputStream(os, header.version)) {
sos.write(getHeaderBytes(SWFCompression.NONE, header.gfx));
sos.writeUI8(version);
sos.writeUI8(header.version);
sos.writeUI32(fileSize);
switch (hdr[0]) {
@@ -2543,7 +2551,6 @@ public final class SWF implements SWFContainerItem, Timelined {
}
public void clearScriptCache() {
as2PcodeCache.clear();
as2Cache.clear();
as3Cache.clear();
IdentifiersDeobfuscation.clearCache();
@@ -2582,31 +2589,93 @@ public final class SWF implements SWFContainerItem, Timelined {
public static void uncache(ASMSource src) {
if (src != null) {
SWF swf = src.getSwf();
swf.as2Cache.remove(src);
swf.as2PcodeCache.remove(src);
if (swf != null) {
swf.as2Cache.remove(src);
}
}
}
public static void uncache(ScriptPack pack) {
if (pack != null) {
pack.getSwf().as3Cache.remove(pack);
SWF swf = pack.getSwf();
if (swf != null) {
swf.as3Cache.remove(pack);
}
}
}
public static boolean isCached(ASMSource src) {
return src.getSwf().as2Cache.contains(src);
if (src != null) {
SWF swf = src.getSwf();
if (swf != null) {
return swf.as2Cache.isCached(src);
}
}
return false;
}
public static boolean isActionListCached(ASMSource src) {
if (src != null) {
SWF swf = src.getSwf();
if (swf != null) {
return swf.as2Cache.isPCodeCached(src);
}
}
return false;
}
public static boolean isCached(ScriptPack pack) {
return pack.getSwf().as3Cache.contains(pack);
if (pack != null) {
SWF swf = pack.getSwf();
if (swf != null) {
return swf.as3Cache.isCached(pack);
}
}
return false;
}
public static HighlightedText getFromCache(ASMSource src) {
if (src != null) {
SWF swf = src.getSwf();
if (swf != null) {
return swf.as2Cache.get(src);
}
}
return null;
}
public static ActionList getActionListFromCache(ASMSource src) {
if (src != null) {
SWF swf = src.getSwf();
if (swf != null) {
return swf.as2Cache.getPCode(src);
}
}
return null;
}
public static HighlightedText getFromCache(ScriptPack pack) {
if (pack != null) {
SWF swf = pack.getSwf();
if (swf != null) {
return swf.as3Cache.get(pack);
}
}
return null;
}
public static ActionList getCachedActionList(ASMSource src, final List<DisassemblyListener> listeners) throws InterruptedException {
synchronized (src) {
SWF swf = src.getSwf();
int deobfuscationMode = Configuration.autoDeobfuscate.get() ? 1 : 0;
if (swf != null && swf.as2PcodeCache.contains(src)) {
ActionList result = swf.as2PcodeCache.get(src);
if (swf != null && swf.as2Cache.isPCodeCached(src)) {
ActionList result = swf.as2Cache.getPCode(src);
if (result.deobfuscationMode == deobfuscationMode) {
return result;
}
@@ -2625,7 +2694,7 @@ public final class SWF implements SWFContainerItem, Timelined {
list.fileData = actionBytes.getArray();
list.deobfuscationMode = deobfuscationMode;
if (swf != null) {
swf.as2PcodeCache.put(src, list);
swf.as2Cache.put(src, list);
}
return list;
@@ -2638,49 +2707,68 @@ public final class SWF implements SWFContainerItem, Timelined {
}
}
public static HighlightedText getFromCache(ASMSource src) {
SWF swf = src.getSwf();
if (swf.as2Cache.contains(src)) {
return swf.as2Cache.get(src);
}
return null;
}
public static HighlightedText getCached(ASMSource src, ActionList actions) throws InterruptedException {
SWF swf = src.getSwf();
if (swf.as2Cache.contains(src)) {
return swf.as2Cache.get(src);
HighlightedText res;
if (swf != null) {
res = swf.as2Cache.get(src);
if (res != null) {
return res;
}
}
HighlightedTextWriter writer = new HighlightedTextWriter(Configuration.getCodeFormatting(), true);
writer.startFunction("!script");
src.getActionScriptSource(writer, actions);
writer.endFunction();
HighlightedText res = new HighlightedText(writer);
swf.as2Cache.put(src, res);
return res;
return decompilerPool.decompile(src, actions);
}
public static HighlightedText getCached(ScriptPack pack) throws InterruptedException {
SWF swf = pack.getSwf();
if (swf.as3Cache.contains(pack)) {
return swf.as3Cache.get(pack);
HighlightedText res;
if (swf != null) {
res = swf.as3Cache.get(pack);
if (res != null) {
return res;
}
}
int scriptIndex = pack.scriptIndex;
ScriptInfo script = null;
if (scriptIndex > -1) {
script = pack.abc.script_info.get(scriptIndex);
}
boolean parallel = Configuration.parallelSpeedUp.get();
HighlightedTextWriter writer = new HighlightedTextWriter(Configuration.getCodeFormatting(), true);
pack.toSource(writer, script == null ? null : script.traits.traits, new ConvertData(), ScriptExportMode.AS, parallel);
HighlightedText res = new HighlightedText(writer);
swf.as3Cache.put(pack, res);
return decompilerPool.decompile(pack);
}
return res;
public static Future<HighlightedText> getCachedFuture(ASMSource src, ActionList actions, ScriptDecompiledListener<HighlightedText> listener) throws InterruptedException {
SWF swf = src.getSwf();
HighlightedText res;
if (swf != null) {
res = swf.as2Cache.get(src);
if (res != null) {
if (listener != null) {
listener.onComplete(res);
}
return new ImmediateFuture<>(res);
}
}
return decompilerPool.submitTask(src, actions, listener);
}
public static Future<HighlightedText> getCachedFuture(ScriptPack pack, ScriptDecompiledListener<HighlightedText> listener) throws InterruptedException {
SWF swf = pack.getSwf();
HighlightedText res;
if (swf != null) {
res = swf.as3Cache.get(pack);
if (res != null) {
if (listener != null) {
listener.onComplete(res);
}
return new ImmediateFuture<>(res);
}
}
return decompilerPool.submitTask(pack, listener);
}
public DecompilerPool getDecompilerPool() {
return decompilerPool;
}
public Cache<CharacterTag, RECT> getRectCache() {
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.helpers.streams.SeekableInputStream;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.decompiler.flash.treeitems.TreeItem;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
/**
@@ -46,4 +45,9 @@ public class SWFHeader {
* ScaleForm GFx
*/
public boolean gfx = false;
/**
* Frame rate
*/
public float frameRate;
}
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.decompiler.flash.action.Action;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.decompiler.flash.amf.amf3.Amf3OutputStream;
@@ -1201,8 +1200,7 @@ public class SWFOutputStream extends OutputStream {
if ((value.fillStyleType == FILLSTYLE.LINEAR_GRADIENT)
|| (value.fillStyleType == FILLSTYLE.RADIAL_GRADIENT)) {
writeGRADIENT(value.gradient, shapeNum);
}
if (value.fillStyleType == FILLSTYLE.FOCAL_RADIAL_GRADIENT) {
} else if (value.fillStyleType == FILLSTYLE.FOCAL_RADIAL_GRADIENT) {
writeFOCALGRADIENT((FOCALGRADIENT) value.gradient, shapeNum);
}
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.helpers.Helper;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.decompiler.flash.iggy.conversion.IggySwfBundle;
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.decompiler.flash.abc.types.ABCException;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
package com.jpexs.decompiler.flash;
import java.io.IOException;
@@ -1,3 +1,18 @@
/*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
package com.jpexs.decompiler.flash;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import java.util.HashMap;
@@ -26,31 +25,13 @@ import java.util.Map;
*/
public class Version {
public int versionId;
public String revision;
public String tagName;
public String versionName;
public String longVersionName;
public String releaseDate;
public String appName;
public boolean prerelease;
public String appFullName;
public String updateLink;
public int major;
public int minor;
public int release;
public int build;
public boolean nightly;
public Map<String, List<String>> changes = new HashMap<>();
public String description;
}
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash;
import com.jpexs.helpers.Helper;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc;
import com.jpexs.decompiler.flash.EndOfStreamException;
@@ -41,6 +40,7 @@ import com.jpexs.decompiler.flash.abc.types.traits.TraitClass;
import com.jpexs.decompiler.flash.abc.types.traits.TraitFunction;
import com.jpexs.decompiler.flash.abc.types.traits.TraitMethodGetterSetter;
import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst;
import com.jpexs.decompiler.flash.abc.types.traits.TraitType;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.abc.usages.ClassNameMultinameUsage;
import com.jpexs.decompiler.flash.abc.usages.ConstVarNameMultinameUsage;
@@ -58,6 +58,7 @@ import com.jpexs.decompiler.flash.abc.usages.TypeNameMultinameUsage;
import com.jpexs.decompiler.flash.dumpview.DumpInfo;
import com.jpexs.decompiler.flash.dumpview.DumpInfoSpecial;
import com.jpexs.decompiler.flash.dumpview.DumpInfoSpecialType;
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
import com.jpexs.decompiler.flash.helpers.SWFDecompilerPlugin;
import com.jpexs.decompiler.flash.importers.As3ScriptReplaceException;
import com.jpexs.decompiler.flash.importers.As3ScriptReplacerInterface;
@@ -1426,6 +1427,30 @@ public class ABC {
return null;
}
public int getGlobalTraitId(TraitType type, boolean isStatic, int classIndex, int index) {
if (type == TraitType.INITIALIZER) {
if (!isStatic) {
return GraphTextWriter.TRAIT_INSTANCE_INITIALIZER;
} else {
return GraphTextWriter.TRAIT_CLASS_INITIALIZER;
}
}
if (type == TraitType.SCRIPT_INITIALIZER) {
return GraphTextWriter.TRAIT_SCRIPT_INITIALIZER;
}
if (classIndex == -1) {
return index;
}
if (isStatic) {
return index;
} else {
return class_info.get(classIndex).static_traits.traits.size() + index;
}
}
private void removeClassFromTraits(Traits traits, int index) {
for (Trait t : traits.traits) {
if (t instanceof TraitClass) {
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc;
import com.jpexs.decompiler.flash.EndOfStreamException;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc;
import com.jpexs.decompiler.flash.abc.types.ClassInfo;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc;
import com.jpexs.decompiler.flash.abc.types.Decimal;
@@ -1,3 +1,18 @@
/*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
package com.jpexs.decompiler.flash.abc;
public class ABCVersion implements Comparable<ABCVersion> {
@@ -1,3 +1,18 @@
/*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
package com.jpexs.decompiler.flash.abc;
import java.lang.annotation.ElementType;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc;
import com.jpexs.decompiler.flash.BaseLocalData;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc;
import com.jpexs.decompiler.graph.DottedChain;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc;
import java.io.IOException;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc;
import com.jpexs.helpers.Helper;
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc;
import com.jpexs.decompiler.flash.SWF;
@@ -40,6 +39,7 @@ import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
import com.jpexs.decompiler.flash.helpers.HighlightedText;
import com.jpexs.decompiler.flash.helpers.NulWriter;
import com.jpexs.decompiler.flash.helpers.hilight.Highlighting;
import com.jpexs.decompiler.flash.search.MethodId;
import com.jpexs.decompiler.flash.tags.Tag;
import com.jpexs.decompiler.flash.treeitems.AS3ClassTreeItem;
import com.jpexs.decompiler.graph.DottedChain;
@@ -616,4 +616,15 @@ public class ScriptPack extends AS3ClassTreeItem {
((Tag) abc.parentTag).setModified(true);
}
public void getMethodInfos(List<MethodId> methodInfos) {
int script_init = abc.script_info.get(scriptIndex).init_index;
methodInfos.add(new MethodId(GraphTextWriter.TRAIT_SCRIPT_INITIALIZER, -1, script_init));
List<Trait> traits = abc.script_info.get(scriptIndex).traits.traits;
for (int t : traitIndices) {
Trait trait = traits.get(t);
trait.getMethodInfos(abc, GraphTextWriter.TRAIT_UNKNOWN, -1, methodInfos);
}
}
}
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
import com.jpexs.decompiler.flash.EndOfStreamException;
@@ -274,8 +273,6 @@ import com.jpexs.decompiler.flash.abc.types.MethodInfo;
import com.jpexs.decompiler.flash.abc.types.Multiname;
import com.jpexs.decompiler.flash.abc.types.ValueKind;
import com.jpexs.decompiler.flash.abc.types.traits.Trait;
import com.jpexs.decompiler.flash.abc.types.traits.TraitFunction;
import com.jpexs.decompiler.flash.abc.types.traits.TraitMethodGetterSetter;
import com.jpexs.decompiler.flash.abc.types.traits.TraitSlotConst;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.configuration.Configuration;
@@ -746,7 +743,9 @@ public class AVM2Code implements Cloneable {
lda.runtimeInfo = runtimeInfo;
for (AVM2Instruction ins : code) {
ins.definition.verify(lda, constants, ins);
if (!(ins.definition instanceof CallSuperVoidIns)) {
ins.definition.verify(lda, constants, ins);
}
}
while (pos < code.size()) {
@@ -2129,7 +2128,6 @@ public class AVM2Code implements Cloneable {
public void updateInstructionByteCountByAddr(long instructionAddress, int byteDelta, MethodBody body) {
if (byteDelta != 0) {
updateOffsets(new OffsetUpdater() {
@Override
public long updateInstructionOffset(long address) {
if (address > instructionAddress) {
@@ -2174,7 +2172,8 @@ public class AVM2Code implements Cloneable {
ins.operands[j] = updater.updateOperandOffset(target, ins.operands[j]);
}
}*/ //Faster, but not so universal
if (ins.definition instanceof IfTypeIns) {
{
if (ins.definition instanceof IfTypeIns) {
long target = ins.getTargetAddress();
try {
ins.operands[0] = updater.updateOperandOffset(ins.getAddress(), target, ins.operands[0]);
@@ -2182,14 +2181,17 @@ public class AVM2Code implements Cloneable {
throw new ConvertException("Invalid offset (" + ins + ")", i);
}
}
}
ins.setAddress(updater.updateInstructionOffset(ins.getAddress()));
//Note: changing operands here does not change instruction byte length as offsets are always S24 (not variable length)
}
for (ABCException ex : body.exceptions) {
ex.start = updater.updateOperandOffset(-1, ex.start, ex.start);
ex.end = updater.updateOperandOffset(-1, ex.end, ex.end);
ex.target = updater.updateOperandOffset(-1, ex.target, ex.target);
if (body != null) {
for (ABCException ex : body.exceptions) {
ex.start = updater.updateOperandOffset(-1, ex.start, ex.start);
ex.end = updater.updateOperandOffset(-1, ex.end, ex.end);
ex.target = updater.updateOperandOffset(-1, ex.target, ex.target);
}
}
}
@@ -2200,7 +2202,6 @@ public class AVM2Code implements Cloneable {
final List<Long> insAddrToRemove = new ArrayList<>();
final long endOffset = getEndOffset();
updateOffsets(new OffsetUpdater() {
@Override
public long updateInstructionOffset(long address) {
return address;
@@ -2213,7 +2214,6 @@ public class AVM2Code implements Cloneable {
}
return offset;
}
}, body);
boolean someIgnored = false;
@@ -2232,7 +2232,6 @@ public class AVM2Code implements Cloneable {
public void checkValidOffsets(MethodBody body) {
updateOffsets(new OffsetUpdater() {
@Override
public long updateInstructionOffset(long address) {
adr2pos(address);
@@ -2247,7 +2246,6 @@ public class AVM2Code implements Cloneable {
adr2pos(targetAddress);
return offset;
}
}, body);
}
@@ -2329,7 +2327,6 @@ public class AVM2Code implements Cloneable {
if (byteDelta != 0) {
updateOffsets(new OffsetUpdater() {
@Override
public long updateInstructionOffset(long address) {
if (address > instruction.getAddress()) {
@@ -2373,14 +2370,15 @@ public class AVM2Code implements Cloneable {
pos = code.size();
}
final int byteCount = instruction.getBytesLength();
if (pos == code.size()) {
if (code.size() == 0) {
instruction.setAddress(0);
} else if (pos == code.size()) {
instruction.setAddress(code.get(pos - 1).getAddress() + code.get(pos - 1).getBytesLength());
} else {
instruction.setAddress(code.get(pos).getAddress());
}
final long x = instruction.getAddress();
updateOffsets(new OffsetUpdater() {
@Override
public long updateInstructionOffset(long offset) {
if (offset >= x) {
@@ -2612,6 +2610,27 @@ public class AVM2Code implements Cloneable {
return stats;
}
// simplified version of getStats. This method calculates only the maxlocal value
public CodeStats getMaxLocal() {
CodeStats stats = new CodeStats();
for (AVM2Instruction ins : code) {
if (ins.definition instanceof SetLocalTypeIns) {
handleRegister(stats, ((SetLocalTypeIns) ins.definition).getRegisterId(ins));
} else if (ins.definition instanceof GetLocalTypeIns) {
handleRegister(stats, ((GetLocalTypeIns) ins.definition).getRegisterId(ins));
} else {
for (int i = 0; i < ins.definition.operands.length; i++) {
int op = ins.definition.operands[i];
if (op == DAT_LOCAL_REG_INDEX) {
handleRegister(stats, ins.operands[i]);
}
}
}
}
return stats;
}
private void visitCode(int ip, int lastIp, HashMap<Integer, List<Integer>> refs) throws InterruptedException {
List<Integer> toVisit = new ArrayList<>();
List<Integer> toVisitLast = new ArrayList<>();
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
import com.jpexs.decompiler.flash.abc.ABCVersionRequirements;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
import com.jpexs.decompiler.flash.IdentifiersDeobfuscation;
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
/**
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
import com.jpexs.decompiler.flash.abc.ABC;
@@ -57,6 +56,9 @@ public class CodeStats {
return writer;
}
public CodeStats() {
}
public CodeStats(AVM2Code code) {
instructionStats = new InstructionStats[code.code.size()];
for (int i = 0; i < code.code.size(); i++) {
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
import com.jpexs.decompiler.graph.GraphTargetItem;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
import com.jpexs.decompiler.graph.GraphTargetItem;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
import java.util.HashMap;
@@ -1,3 +1,18 @@
/*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
public class NumberContext {
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
import com.jpexs.decompiler.flash.abc.ABC;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
import com.jpexs.decompiler.flash.abc.ABC;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
import com.jpexs.decompiler.flash.BaseLocalData;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
import com.jpexs.decompiler.flash.BaseLocalData;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
import com.jpexs.decompiler.flash.abc.ABC;
@@ -64,11 +63,14 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PopIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushByteIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushDoubleIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushFalseIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushIntegerTypeIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushIntIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushNanIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushNullIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushShortIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushStringIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushTrueIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushUIntIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushUndefinedIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.SwapIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOrConvertTypeIns;
@@ -148,6 +150,42 @@ public class AVM2DeobfuscatorSimple extends SWFDecompilerAdapter {
return result;
}
protected boolean removeNullPushes(AVM2Code code, MethodBody body) throws InterruptedException {
boolean result = false;
Set<Long> offsets = code.getImportantOffsets(body, true);
// Deliberately skip over instruction zero
for (int i = 1; i < code.code.size(); i++) {
AVM2Instruction ins1 = code.code.get(i - 1);
AVM2Instruction ins2 = code.code.get(i);
if (ins2.definition instanceof PopIns
&& !offsets.contains(ins2.getAddress())
&& (ins1.definition instanceof PushByteIns
|| ins1.definition instanceof PushDoubleIns
|| ins1.definition instanceof PushFalseIns
|| ins1.definition instanceof PushIntIns
|| ins1.definition instanceof PushNanIns
|| ins1.definition instanceof PushNullIns
|| ins1.definition instanceof PushShortIns
|| ins1.definition instanceof PushStringIns
|| ins1.definition instanceof PushTrueIns
|| ins1.definition instanceof PushUIntIns
|| ins1.definition instanceof PushUndefinedIns)) {
if (Thread.currentThread().isInterrupted()) {
throw new InterruptedException();
}
code.removeInstruction(i - 1, body);
i--;
code.removeInstruction(i, body);
i--;
offsets = code.getImportantOffsets(body, true); //update offsets, they changed because of removing instruction
result = true;
}
}
return result;
}
protected void initLocalRegs(LocalDataArea localData, int localReservedCount, int maxRegs, boolean executeFromFirst) {
for (int i = 0; i < localReservedCount; i++) {
localData.localRegisters.put(i, NotCompileTime.INSTANCE);
@@ -374,6 +412,7 @@ public class AVM2DeobfuscatorSimple extends SWFDecompilerAdapter {
code.removeDeadCode(body);
removeObfuscationIfs(classIndex, isStatic, scriptIndex, abc, body, null);
removeZeroJumps(code, body);
removeNullPushes(code, body);
}
class ExecutionResult {
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
import com.jpexs.decompiler.flash.abc.ABC;
@@ -68,11 +67,14 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PopIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushByteIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushDoubleIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushFalseIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushIntegerTypeIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushIntIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushNanIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushNullIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushShortIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushStringIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushTrueIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushUIntIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.PushUndefinedIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.stack.SwapIns;
import com.jpexs.decompiler.flash.abc.avm2.instructions.types.CoerceOrConvertTypeIns;
@@ -102,6 +104,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
*
@@ -156,7 +159,7 @@ public class AVM2DeobfuscatorSimpleOld extends SWFDecompilerAdapter {
}
// find jump targets
List<Integer> jumpTargets = new ArrayList<Integer>();
List<Integer> jumpTargets = new ArrayList<>();
for (int i = 0; i < code.code.size(); i++) {
AVM2Instruction ins = code.code.get(i);
if (ins.definition instanceof JumpIns) {
@@ -203,6 +206,42 @@ public class AVM2DeobfuscatorSimpleOld extends SWFDecompilerAdapter {
return result;
}
protected boolean removeNullPushes(AVM2Code code, MethodBody body) throws InterruptedException {
boolean result = false;
Set<Long> offsets = code.getImportantOffsets(body, true);
// Deliberately skip over instruction zero
for (int i = 1; i < code.code.size(); i++) {
AVM2Instruction ins1 = code.code.get(i - 1);
AVM2Instruction ins2 = code.code.get(i);
if (ins2.definition instanceof PopIns
&& !offsets.contains(ins2.getAddress())
&& (ins1.definition instanceof PushByteIns
|| ins1.definition instanceof PushDoubleIns
|| ins1.definition instanceof PushFalseIns
|| ins1.definition instanceof PushIntIns
|| ins1.definition instanceof PushNanIns
|| ins1.definition instanceof PushNullIns
|| ins1.definition instanceof PushShortIns
|| ins1.definition instanceof PushStringIns
|| ins1.definition instanceof PushTrueIns
|| ins1.definition instanceof PushUIntIns
|| ins1.definition instanceof PushUndefinedIns)) {
if (Thread.currentThread().isInterrupted()) {
throw new InterruptedException();
}
code.removeInstruction(i - 1, body);
i--;
code.removeInstruction(i, body);
i--;
offsets = code.getImportantOffsets(body, true); //update offsets, they changed because of removing instruction
result = true;
}
}
return result;
}
protected AVM2LocalData newLocalData(int scriptIndex, ABC abc, AVM2ConstantPool cpool, MethodBody body, boolean isStatic, int classIndex) {
AVM2LocalData localData = new AVM2LocalData();
localData.isStatic = isStatic;
@@ -475,6 +514,7 @@ public class AVM2DeobfuscatorSimpleOld extends SWFDecompilerAdapter {
code.removeDeadCode(body);
removeObfuscationIfs(classIndex, isStatic, scriptIndex, abc, body, new ArrayList<>());
removeZeroJumps(code, body);
removeNullPushes(code, body);
}
class ExecutionResult {
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
import com.jpexs.decompiler.flash.SWF;
@@ -1,3 +1,18 @@
/*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
/**
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.exceptions;
/**
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.exceptions;
/**
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.exceptions;
/**
@@ -1,18 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.exceptions;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.fastavm2;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.fastavm2;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.fastavm2;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.graph;
import com.jpexs.decompiler.flash.BaseLocalData;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.graph;
import com.jpexs.decompiler.flash.BaseLocalData;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.instructions;
import com.jpexs.decompiler.flash.BaseLocalData;
@@ -1,3 +1,18 @@
/*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.instructions;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.instructions;
/**
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.instructions;
import com.jpexs.decompiler.flash.abc.ABC;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.instructions;
import com.jpexs.decompiler.flash.abc.AVM2LocalData;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.instructions;
import com.jpexs.decompiler.flash.abc.ABC;
@@ -1,19 +1,18 @@
/*
* Copyright (C) 2010-2016 JPEXS, All rights reserved.
*
* Copyright (C) 2010-2018 JPEXS, All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
* License along with this library. */
package com.jpexs.decompiler.flash.abc.avm2.instructions;
import com.jpexs.decompiler.flash.abc.ABC;

Some files were not shown because too many files have changed in this diff Show More