Code Monkey home page Code Monkey logo

flazzy's People

Contributors

arachish avatar guic1337 avatar paulusparssinen avatar speaqer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flazzy's Issues

AS3 Non-Complex Instruction Execution

Allow for the execution of instructions that only utilize the stack for arithmetic, and when instructions are comparing constant values caused by obfuscation.

Motivation

Currently the deobfuscation method in ASCode is capable of reducing the complexity of a method's control flow by removing redundant checks against constant values. Therefore, the idea is to move this logic into another type that allows for the execution of static methods containing basic instructions, as this would allow for more complex methods of deobfuscation.

Consider the following AS3 class which decodes a string at runtime using a collection of integer arrays.

public class SomeClass
{
    private var field1:Array;

    // Non-Static
    public function SomeClass()
    {
        field1 = [10001, 10002, 10002, 10002, 10002];
    }

    // Non-Static 
    public function functionNeedingString() : void
    {
        var local1:* = [0, 0, 0, 0, 0];
        var local2:* = [1, 1, 1, 1, 1];
        var local2:String = getKeyValue(local1, 0)
    }

    // Static
    private static function getKeyValue(param1:Array, param2:int) : String
    {
        var value:String = "";
        for each(var local1 in param1)
        {
            for each(var local2 in local1)
            {
                value += String.fromCharCode(10000 - local2 + param2--);
            }
        }
        return value;
    }
}

Since all of the data required to generate the string is needed, we can load these values into their C# equivalent and call an emulated getKeyValue function to retrieve the string.

Dealing with 7000+ ABCFile instances

Big fan of your library, it has saved me a lot of time.
I have one issue though, which is dealing with multiple ABCFile instances.

For Habbo it is always 2/3 instances and you can easily pick out the one that contains all classes / methods.
However, I noticed if you compile the opensource habbo swf manually, you get 7000+ ABCFiles.

Opensource swf
image

Traditional swf
image

Both work fine normally, JPEXS / AS3 sorcerer shows code fine as well.

Do you have any idea how I can deal with them in such a way that it does not matter how many ABCFiles there are?

If you are open to chat about it, my discord is Mikee#0055.

A bug about Vector.<T>

I like this library,
But I found a small bug,

package
{
	import flash.display.Sprite;
	public class Main extends Sprite
	{	
	}
}
var v:Vector.<int>;

When reading the swf file generated by the above code,will crash.
Because when

_multinamesIndicesCache.Add(multiname, Multinames.Count);

GetHashCode refers to an object that has not yet been created.

Modifying GetHashCode can fix this problem:

public override int GetHashCode()
{
    var hash = new HashCode();
    hash.Add(Kind);
    hash.Add(IsRuntime);
    hash.Add(IsAttribute);
    hash.Add(IsNameNeeded);
    hash.Add(IsNamespaceNeeded);
    hash.Add(Name);
    hash.Add(QNameIndex);
    hash.Add(Namespace);
    hash.Add(NamespaceSet);
    return hash.ToHashCode();
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.