arachish / flazzy Goto Github PK
View Code? Open in Web Editor NEW.NET library for [dis]assembling Shockwave Flash binaries.
License: MIT License
.NET library for [dis]assembling Shockwave Flash binaries.
License: MIT License
Allow for the execution of instructions that only utilize the stack for arithmetic, and when instructions are comparing constant values caused by obfuscation.
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.
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+ ABCFile
s.
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 ABCFile
s there are?
If you are open to chat about it, my discord is Mikee#0055
.
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();
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.