mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-11 19:01:55 +00:00
#958 Remove and Replace character tag of items from CLI
This commit is contained in:
@@ -2854,6 +2854,20 @@ public final class SWF implements SWFContainerItem, Timelined {
|
||||
}
|
||||
}
|
||||
|
||||
public void replaceCharacterTags(CharacterTag characterTag, int newCharacterId) {
|
||||
int characterId = characterTag.getCharacterId();
|
||||
CharacterTag newCharacter = getCharacter(newCharacterId);
|
||||
newCharacter.setCharacterId(characterId);
|
||||
characterTag.setCharacterId(newCharacterId);
|
||||
newCharacter.setModified(true);
|
||||
characterTag.setModified(true);
|
||||
|
||||
assignExportNamesToSymbols();
|
||||
assignClassesToSymbols();
|
||||
clearImageCache();
|
||||
updateCharacters();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getShortFileName();
|
||||
|
||||
@@ -422,7 +422,7 @@ public class AVM2DeobfuscatorSimple implements SWFDecompilerListener {
|
||||
|
||||
public void deobfuscate(String path, int classIndex, boolean isStatic, int scriptIndex, ABC abc, AVM2ConstantPool cpool, Trait trait, MethodInfo minfo, MethodBody body) throws InterruptedException {
|
||||
AVM2Code code = body.getCode();
|
||||
//code.fixJumps(body);
|
||||
code.fixJumps(body);
|
||||
removeUnreachableActions(code, cpool, trait, minfo, body);
|
||||
removeObfuscationIfs(classIndex, isStatic, scriptIndex, abc, cpool, trait, minfo, body, new ArrayList<>());
|
||||
removeZeroJumps(code, body);
|
||||
|
||||
Reference in New Issue
Block a user