mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-10 19:42:32 +00:00
Merge origin/master
This commit is contained in:
@@ -53,6 +53,7 @@ public class SourceGeneratorLocalData implements Serializable {
|
||||
public String currentClass;
|
||||
|
||||
public String superClass = null;
|
||||
|
||||
public DottedChain superPkg = null;
|
||||
|
||||
public int activationReg = 0;
|
||||
@@ -72,6 +73,7 @@ public class SourceGeneratorLocalData implements Serializable {
|
||||
public boolean subMethod = false;
|
||||
|
||||
public int privateNs = 0;
|
||||
|
||||
public int protectedNs = 0;
|
||||
|
||||
public boolean isStatic = false;
|
||||
|
||||
@@ -735,5 +735,4 @@ public class AVM2Graph extends Graph {
|
||||
protected List<GraphTargetItem> filter(List<GraphTargetItem> list) {
|
||||
return avm2code.clearTemporaryRegisters(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instructions;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetLexIns;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.parser.script.AVM2SourceGenerator;
|
||||
import com.jpexs.decompiler.flash.abc.types.Namespace;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
@@ -25,6 +24,7 @@ import java.util.List;
|
||||
public class RegExpAvm2Item extends AVM2Item {
|
||||
|
||||
public String pattern;
|
||||
|
||||
public String modifier;
|
||||
|
||||
public RegExpAvm2Item(String pattern, String modifier, GraphSourceItem instruction, GraphSourceItem lineStartIns) {
|
||||
@@ -101,5 +101,4 @@ public class RegExpAvm2Item extends AVM2Item {
|
||||
ins(AVM2Instructions.Construct, hasModifier ? 2 : 1)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2016 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.model;
|
||||
|
||||
import com.jpexs.decompiler.graph.GraphTargetItem;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JPEXS
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -45,6 +45,7 @@ public class CallAVM2Item extends AVM2Item {
|
||||
public List<GraphTargetItem> arguments;
|
||||
|
||||
public int line;
|
||||
|
||||
public List<NamespaceItem> openedNamespaces;
|
||||
|
||||
public CallAVM2Item(List<NamespaceItem> openedNamespaces, int line, GraphTargetItem name, List<GraphTargetItem> arguments) {
|
||||
|
||||
@@ -34,7 +34,9 @@ import java.util.Objects;
|
||||
public class NamespaceItem {
|
||||
|
||||
public DottedChain name;
|
||||
|
||||
public int kind;
|
||||
|
||||
private int nsIndex = -1;
|
||||
|
||||
public void forceResolve(AbcIndexing abcIndex) {
|
||||
@@ -148,5 +150,4 @@ public class NamespaceItem {
|
||||
|
||||
return abcIndex.getSelectedAbc().constants.getNamespaceSetId(nssa, true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -713,10 +713,9 @@ public abstract class Action implements GraphSourceItem {
|
||||
public abstract boolean execute(LocalDataArea lda);
|
||||
|
||||
/* {
|
||||
//throw new UnsupportedOperationException("Action " + toString() + " not implemented");
|
||||
return false;
|
||||
}*/
|
||||
|
||||
//throw new UnsupportedOperationException("Action " + toString() + " not implemented");
|
||||
return false;
|
||||
}*/
|
||||
/**
|
||||
* Translates this function to stack and output.
|
||||
*
|
||||
@@ -1063,7 +1062,7 @@ public abstract class Action implements GraphSourceItem {
|
||||
}
|
||||
|
||||
/*ActionJump && ActionIf removed*/
|
||||
/*if ((action instanceof ActionEnumerate2) || (action instanceof ActionEnumerate)) {
|
||||
/*if ((action instanceof ActionEnumerate2) || (action instanceof ActionEnumerate)) {
|
||||
loopStart = ip + 1;
|
||||
isForIn = true;
|
||||
ip += 4;
|
||||
|
||||
@@ -10,9 +10,13 @@ import java.util.Map;
|
||||
public class ActionScriptFunction extends ActionScriptObject {
|
||||
|
||||
protected long functionOffset;
|
||||
|
||||
protected long functionLength;
|
||||
|
||||
protected String functionName;
|
||||
|
||||
protected List<String> paramNames;
|
||||
|
||||
protected Map<Integer, String> funcRegNames;
|
||||
|
||||
public String getFunctionName() {
|
||||
@@ -38,5 +42,4 @@ public class ActionScriptFunction extends ActionScriptObject {
|
||||
public long getFunctionOffset() {
|
||||
return functionOffset;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,9 +13,11 @@ import java.util.Map;
|
||||
public class ActionScriptObject implements Cloneable {
|
||||
|
||||
protected Map<Integer, Object> properties = new HashMap<>();
|
||||
|
||||
protected Map<String, Object> members = new HashMap<>();
|
||||
|
||||
protected Object extendsObj;
|
||||
|
||||
protected List<Object> implementsObjs = new ArrayList<>();
|
||||
|
||||
public void clearMembers() {
|
||||
|
||||
@@ -7,7 +7,9 @@ package com.jpexs.decompiler.flash.action;
|
||||
public class ActionScriptWith {
|
||||
|
||||
protected ActionScriptObject obj;
|
||||
|
||||
protected long startAddr;
|
||||
|
||||
protected long length;
|
||||
|
||||
public ActionScriptWith(ActionScriptObject obj, long startAddr, long length) {
|
||||
@@ -15,5 +17,4 @@ public class ActionScriptWith {
|
||||
this.startAddr = startAddr;
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,8 +29,11 @@ public class CachedScript implements Serializable {
|
||||
public String text;
|
||||
|
||||
public List<Highlighting> hilights;
|
||||
|
||||
public List<Highlighting> methodHilights;
|
||||
|
||||
public List<Highlighting> classHilights;
|
||||
|
||||
public List<Highlighting> specialHilights;
|
||||
|
||||
public CachedScript(String text, List<Highlighting> hilights, List<Highlighting> methodHilights, List<Highlighting> classHilights, List<Highlighting> specialHilights) {
|
||||
|
||||
@@ -13,6 +13,5 @@ public class DepthStateObjectAdapter extends ActionScriptObject {
|
||||
public DepthStateObjectAdapter(DepthState ds) {
|
||||
this.ds = ds;
|
||||
}
|
||||
|
||||
//TODO
|
||||
}
|
||||
|
||||
@@ -14,8 +14,11 @@ public class DisplayObject extends ActionScriptObject {
|
||||
protected Map<Integer, Object> displayList = new HashMap<>();
|
||||
|
||||
protected int totalFrames = 1;
|
||||
|
||||
protected int currentFrame = 1;
|
||||
|
||||
protected boolean paused = false;
|
||||
|
||||
protected boolean dragging = false;
|
||||
|
||||
public void startDrag() {
|
||||
|
||||
@@ -14,8 +14,11 @@ import java.util.List;
|
||||
public class Stage extends DisplayObject {
|
||||
|
||||
protected long startTime;
|
||||
|
||||
protected Timelined timelined;
|
||||
|
||||
protected Timeline timeline;
|
||||
|
||||
protected Frame frame;
|
||||
|
||||
public Stage(Timelined timelined) {
|
||||
|
||||
@@ -72,5 +72,4 @@ public class ActionFSCommand2 extends Action {
|
||||
public boolean execute(LocalDataArea lda) {
|
||||
return true; //TODO?
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.util.List;
|
||||
public class EvalActionItem extends ActionItem {
|
||||
|
||||
public EvalActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem value) {
|
||||
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
|
||||
super(instruction, lineStartIns, PRECEDENCE_PRIMARY, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -48,7 +48,7 @@ public class LoadMovieActionItem extends ActionItem {
|
||||
}
|
||||
|
||||
public LoadMovieActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem targetString, int method) {
|
||||
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
|
||||
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
|
||||
this.urlString = urlString;
|
||||
this.targetString = targetString;
|
||||
this.method = method;
|
||||
|
||||
@@ -48,7 +48,7 @@ public class LoadVariablesActionItem extends ActionItem {
|
||||
}
|
||||
|
||||
public LoadVariablesActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem urlString, GraphTargetItem targetString, int method) {
|
||||
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
|
||||
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
|
||||
this.urlString = urlString;
|
||||
this.targetString = targetString;
|
||||
this.method = method;
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2010-2016 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.action.model;
|
||||
|
||||
import com.jpexs.decompiler.flash.SourceGeneratorLocalData;
|
||||
@@ -43,7 +44,7 @@ public class UnLoadMovieActionItem extends ActionItem {
|
||||
}
|
||||
|
||||
public UnLoadMovieActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem targetString) {
|
||||
public UnLoadMovieActionItem(GraphSourceItem instruction, GraphSourceItem lineStartIns, GraphTargetItem targetString) {
|
||||
super(instruction, lineStartIns, PRECEDENCE_PRIMARY);
|
||||
this.targetString = targetString;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -28,5 +28,4 @@ import java.lang.annotation.Target;
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.FIELD)
|
||||
public @interface ConfigurationDirectory {
|
||||
|
||||
}
|
||||
|
||||
@@ -34,7 +34,9 @@ public abstract class GraphTextWriter {
|
||||
protected CodeFormatting formatting;
|
||||
|
||||
public static final int TRAIT_INSTANCE_INITIALIZER = -1;
|
||||
|
||||
public static final int TRAIT_CLASS_INITIALIZER = -2;
|
||||
|
||||
public static final int TRAIT_SCRIPT_INITIALIZER = -3;
|
||||
|
||||
public CodeFormatting getFormatting() {
|
||||
|
||||
@@ -111,5 +111,4 @@ public class ProtectTag extends Tag implements PasswordTag {
|
||||
public boolean hasPassword(String password) {
|
||||
return this.passwordHash.equals(MD5Crypt.crypt(password, 2));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,5 +25,4 @@ public interface PasswordTag {
|
||||
public void setPassword(String password);
|
||||
|
||||
public boolean hasPassword(String password);
|
||||
|
||||
}
|
||||
|
||||
@@ -33,5 +33,4 @@ public enum ImageFormat {
|
||||
public String getExtension() {
|
||||
return extension;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -59,6 +59,7 @@ public class Frame implements TreeItem, Exportable {
|
||||
public boolean layersChanged;
|
||||
|
||||
public String label = null;
|
||||
|
||||
public boolean namedAnchor = false;
|
||||
|
||||
public Frame(Timeline timeline, int frame) {
|
||||
|
||||
@@ -33,5 +33,4 @@ public @interface SWFVersion {
|
||||
int from() default 1;
|
||||
|
||||
int to() default Integer.MAX_VALUE;
|
||||
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ public class DottedChain implements Serializable {
|
||||
private final int length;
|
||||
|
||||
private final int hash;
|
||||
|
||||
private boolean isNull = false;
|
||||
|
||||
public static final DottedChain parse(String name) {
|
||||
|
||||
@@ -33,6 +33,7 @@ public class MD5Crypt {
|
||||
private static final String HASH64_CHARS = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
public static final String MAGIC = "$1$";
|
||||
|
||||
public static final String MAGIC_APACHE = "$apr1$";
|
||||
|
||||
public static boolean checkPassword(String password, String hash) {
|
||||
@@ -124,11 +125,11 @@ public class MD5Crypt {
|
||||
a.update(constBytes); //Add the constant string $1$ to digest A
|
||||
a.update(saltBytes); //Add the salt to digest A
|
||||
|
||||
//For each block of 16 bytes in the password string, add digest B to digest A
|
||||
//For each block of 16 bytes in the password string, add digest B to digest A
|
||||
for (int i = passwordBytes.length; i > 0; i -= 16) {
|
||||
if (i >= 16) {
|
||||
a.update(digest_b);
|
||||
} else { //For the remaining N bytes of the password string, add the first N bytes of digest B to digest A
|
||||
} else { //For the remaining N bytes of the password string, add the first N bytes of digest B to digest A
|
||||
a.update(digest_b, 0, i);
|
||||
}
|
||||
}
|
||||
@@ -242,5 +243,4 @@ public class MD5Crypt {
|
||||
}
|
||||
return magic + salt + "$" + result.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user