Commit Graph

233 Commits

Author SHA1 Message Date
Jindra Petřík
e5142a45e5 fix(actionscript): fix loop after switch (#2698)
Fixes #2698
2026-04-13 16:17:36 +02:00
Jindra Petřík
db6f49fbf8 fix: actionscript and/or operators with simple value operands (#2680)
Fixes #2680
2026-04-06 21:06:19 +02:00
Jindra Petřík
bc82228aa8 chore: fix test - avoid stackoverflow in populateparts 2026-04-06 21:06:19 +02:00
Jindra Petřík
2bc1c4e012 perf: optimize recursion, avoid stackoverflow on larger scripts (#2672) 2026-04-06 21:06:19 +02:00
Jindra Petřík
7d18834c81 feat!: redesigned loop detector (#2542)
Instead of walking code structures to get loops,
the loops are populated by new faster algorithm.
Also, we do not join adjacent GraphParts anymore
in non-obfuscated code.
For proper switch handling, the code is decompiled
in two passes everytime (Previously, the second pass
was used only sometimes).
In first pass we do not process ifs as it may break
switch detection. Second pass is executed after we know
the switches position.

Fixes #2542
2026-04-06 21:06:19 +02:00
Jindra Petřík
0942d7d96d fix: push commands in as2 left in code (#2654)
If the code does not contain any §§pop() instructions,
then all §§push instructions are converted to their
values with comment "unpopped".

Fixes #2654
2026-04-06 21:06:19 +02:00
Jindra Petřík
729d754ca0 fix: as1/2 maintain push order, temp variables usage 2026-04-06 21:06:19 +02:00
Jindra Petřík
d487ef7064 Fixed: #2651 Loop breaks detection 2026-03-04 20:18:02 +01:00
Jindra Petřík
fab6defe9c Fixed: #2636 ActionScript - switches vs loop breaks 2026-02-18 19:46:35 +01:00
Jindra Petřík
ad727716fa Fixed: #2636 ActionScript - Incorrect always-break detection causing insertion of while(true)
Fixed: #2636 ActionScript 3 - Incorrect switch detection
2026-02-18 03:41:28 +01:00
Jindra Petřík
fe28187a97 Fixed: #2636 ActionScript - Incorrect always-break detection causing insertion of while(true)
Fixed: ActionScript - newline after do..while
2026-02-17 18:12:02 +01:00
Jindra Petřík
281b35f3bf Fixed: #2473, #2530 Always-break loops containing breaks (forward gotos) 2026-01-25 12:49:05 +01:00
Jindra Petřík
e577257532 Update year in license header. 2026-01-16 21:33:23 +01:00
Jindra Petřík
1c8d9b9e13 Removed unused useThrow parameter 2025-11-09 21:22:30 +01:00
Jindra Petřík
3b82db57ba Spelling fixes 2025-09-06 02:21:46 +02:00
Jindra Petřík
3f1ed100be AS3 switch compilation reorganized 2025-09-04 19:47:04 +02:00
Jindra Petřík
b8f3b49b0e Switch cases finish block 2025-09-02 21:31:51 +02:00
Jindra Petřík
f0809171e3 Checkstyle fix 2025-09-01 20:07:01 +02:00
Jindra Petřík
60d42e76c3 deobfuscation fixes 2025-09-01 17:01:29 +02:00
Jindra Petřík
8bbdd415bd Fix TestLogicalComputing 2025-09-01 17:01:27 +02:00
Jindra Petřík
2048402750 Fix TestIncDec1 and 2 2025-09-01 17:01:26 +02:00
Jindra Petřík
82d3cc2d2a Temp var declarations 2025-09-01 17:01:26 +02:00
Jindra Petřík
77d96e8e43 Fix swaps 2025-09-01 17:01:26 +02:00
Jindra Petřík
b449db946f §§dupsrc introduced 2025-09-01 17:01:25 +02:00
Jindra Petřík
922cd45084 Fixed tests. 2025-09-01 17:01:25 +02:00
Jindra Petřík
95b7abb9bc Comma expression improvements. WIP
However, tests fail :-(
2025-09-01 17:01:25 +02:00
Jindra Petřík
9a9811f170 Better Comma operator detection WIP 2025-09-01 17:01:25 +02:00
Jindra Petřík
b3a693e4e3 2497 Swap instruction handling. WIP 2025-09-01 17:01:22 +02:00
Jindra Petřík
4b48b8408a Fixed: #2519 AS1/2 avoid multi-level loops in cases where possible 2025-08-22 19:29:04 +02:00
Jindra Petřík
fc3b4a378e Fixed: #2520 Loop detection 2025-08-22 18:02:18 +02:00
Jindra Petřík
2cd1c4f3a1 Checkstyle fix 2025-08-21 18:49:37 +02:00
Jindra Petřík
c6889134d9 Fixed: #2517 Loop break detection problems in some cases 2025-08-21 18:21:04 +02:00
Jindra Petřík
7559970c17 Fixed: #2493 Incorrect placement of §§push instructions 2025-07-24 21:12:24 +02:00
Jindra Petřík
84b92a9d46 Fixed: #2486 AS1/2 if jump to function end as return 2025-07-24 11:21:01 +02:00
Jindra Petřík
a9763c7151 Fixed: #2485 Some variants of switches 2025-07-21 08:48:57 +02:00
Jindra Petřík
7076cdfc36 Fixed: #2486 AS3 switches detection in some cases 2025-07-20 11:55:37 +02:00
Jindra Petřík
974c4fc6bd Fixed: #2486 AS1/2 stoppart as end of function part 2025-07-18 19:55:12 +02:00
Jindra Petřík
3b3720ca87 Fixed: #2486 AS1/2 stoppart as end of function part 2025-07-18 19:11:06 +02:00
Jindra Petřík
b471b48ba7 Fixed: #2486 decompilation timeout on infinite loop 2025-07-17 22:42:32 +02:00
Jindra Petřík
eb3f403021 Fixed: #2486 AS3 skipping label instruction 2025-07-16 21:35:52 +02:00
Jindra Petřík
2c5f4c9774 Fixed: #2486 AS ifs with direct breaks (in obfuscated code) 2025-07-13 21:32:45 +02:00
Jindra Petřík
7bfa09cd98 Fixed: #2486 AS Loop in loop producing gotos in some cases 2025-07-13 18:45:54 +02:00
Jindra Petřík
6a2a3e3fa9 Fixed: #1277 AS1/2 Propagate break/continue to avoid loop/switch labels 2025-07-12 16:49:09 +02:00
Jindra Petřík
381b97c026 Fixed: #2338 AS2 Reading large classes with incorrect if jumps on the beginning
Fixed: #2338 AS1/2/3 Obfuscated code - jump to jump handling
2025-07-12 15:23:37 +02:00
Jindra Petřík
0fc10bde99 Fixed: #2477 AS1/2 Switch in last statement of switch break labels 2025-07-11 21:08:49 +02:00
Jindra Petřík
7b948f92a3 Fixed: #2477 AS1/2 deobfuscation - and/or operators, jumps before function start,
jumps to function end, jumps in for..in return/break
2025-07-11 19:51:18 +02:00
Jindra Petřík
8a3cbf9e2d Checkstyle fix 2025-06-29 23:48:41 +02:00
Jindra Petřík
e6fb646b1b Fixed: #2474 Gotos incorrectly decompiled 2025-06-29 22:58:28 +02:00
Jindra Petřík
894b152bbd Fixed: AS1/2/3 for decompilation with multiple variables 2025-05-31 15:48:51 +02:00
Jindra Petřík
3f9f349a69 Update year in license headers to 2025 2025-05-26 07:41:42 +02:00