Code Monkey home page Code Monkey logo

rabcdasm's Introduction

Robust ABC (ActionScript Bytecode) [Dis-]Assembler

RABCDAsm is a collection of utilities including an ActionScript 3 assembler/disassembler, and a few tools to manipulate SWF files. These are:

  • rabcdasm - ABC disassembler
  • rabcasm - ABC assembler
  • abcexport - extracts ABC from SWF files
  • abcreplace - replaces ABC in SWF files
  • swfdecompress - decompresses zlib-compressed SWF files
  • swf7zcompress - (re-)compress the contents of a SWF using 7-Zip
  • swflzmacompress - compress the contents of a SWF using LZMA
  • swfbinexport / swfbinreplace - extract/replace contents of binary data tags from SWF files

abcexport and abcreplace are reimplementations of similar utilities from my swfutilsex Java package, however these work faster as they do not parse the SWF files as deeply.
swfdecompress is ancillary and is only useful for debugging and studying of the SWF file format, and not required for ABC manipulation. It is functionally equivalent to flasm's -x option. If you frequently work on compressed SWF files, you may want to decompress them to speed processing up.
swf7zcompress is an utility to further reduce the size of SWF files. It uses 7-Zip to compress the data better than the standard zlib library would. It requires that the 7z command-line program be installed and in PATH.
swflzmacompress compresses SWF files using the LZMA algorithm, support for which was introduced in Flash 11. It will only work with SWF files with version 13 or higher.
swfbinexport and swfbinreplace aid in the manipulation of DefineBinaryData tags in SWF files (some files may contain nested SWF files stored in these tags).

Motivation and goals

This package was created due to lack of similar software out there. Particularly, I needed an utility which would allow me to edit ActionScript 3 bytecode with the following properties:

  1. Speed. Less waiting means more productivity. rabcasm can assemble large projects (>200000 LOC) in under a second on modern machines.
  2. Comfortably-editable output. Each class is decompiled to its own file, with files arranged in subdirectories representing the package hierarchy. Class files are #included from the main file.
  3. Most importantly - robustness! If the Adobe AVM can load and run the file, then it must be editable - no matter if the file is obfuscated or otherwise mutilated to prevent reverse-engineering. RABCDAsm achieves this by using a textual representation closer to the ABC file format, rather than to what an ActionScript compiler would generate.

Compiling from source

RABCDAsm is written in the D programming language, version 2.

Assuming you have git and a D2 compiler, such as dmd or gdc installed, compiling should be as straight-forward as:

git clone git://github.com/CyberShadow/RABCDAsm.git
cd RABCDAsm
dmd -run build_rabcdasm.d

Substitute dmd with gdmd if you're using gdc. You can use the DC and DCFLAGS environment variables to override the detected compiler and default compilation flags (-O -inline).

To be able to manipulate SWF files packed with LZMA compression, you'll need to have the liblzma library and development files installed on your system.

Note: DMD 2.066 is required for long path support on Windows since RABCDAsm 1.16.

Pre-compiled binaries

You can find pre-compiled Windows binaries on my website. However, please don't expect them to be up-to-date with the latest source versions.

Usage

To begin hacking on a SWF file:

abcexport file.swf

This will create file-0.abc ... file-N.abc (often just file-0.abc). Each file corresponds to an ABC block inside the SWF file.

To disassemble one of the .abc files:

rabcdasm file-0.abc

This will create a file-0 directory, which will contain file-0.main.asasm (the main program file) and files for ActionScript scripts, classes, and orphan and script-level methods.

To assemble the .asasm files back, and update the SWF file:

rabcasm file-0/file-0.main.asasm
abcreplace file.swf 0 file-0/file-0.main.abc

The second abcreplace argument represents the index of the ABC block in the SWF file, and corresponds to the number in the filename created by abcexport.

swfbinexport and swfbinreplace are used in the same manner as abcexport and abcreplace.

Syntax

The syntax of the disassembly was designed to be very simple and allow fast and easy parsing. It is a close representation of the .abc file format, and thus it is somewhat verbose. All constant pool elements (signed/unsigned integers, doubles, strings, namespaces, namespace sets, multinames) are always expanded inline, for ease of editing. Similarly, classes, instances, methods and method bodies are also defined inline, in the context of their "parent" object. By-index references of classes and methods (used in the newclass, newfunction and callstatic instructions) are represented via automatically-generated unique "reference strings", declared as refid fields.

If you haven't yet, I strongly recommend that you look through Adobe's ActionScript Virtual Machine 2 (AVM2) Overview. You will most likely need to consult it for the instruction reference anyway (although you can also use this handy list as well). You will find it difficult to understand the disassembly without good understanding of concepts such as namespaces and multinames.

Overview

In order to guarantee unambiguity and data preservation, all strings read from the input file - including identifiers (variable/function/class names) - are represented as string literals. Thus, the syntax does not have any "reserved words" or such - an unrecognized word is treated as an error, not as an identifier.

Whitespace (outside string literals, of course) is completely ignored, except where required to separate words. Comments are Intel-assembler-style: a single ; demarks a comment until the next end-of-line. Control directives (such as #include) are allowed anywhere where whitespace is allowed.

The syntax is comprised of hierarchical blocks. Each block contains a number of fields - starting with a keyword specifying the field type. A block is terminated with the end keyword. Some fields contain a limited number of parameters, and others are, or contain blocks.

Hierarchy

The topmost block in the hierarchy is the program block. This must be the first block in the file (thus, program must be the first word in the file as well). The program block contains script fields, and class / method fields for "orphan" classes and methods (not owned by other objects in the hierarchy). Orphan methods are usually anonymous functions. The file version is also specified in the program block, using the minorversion and majorversion fields (both unsigned integers).

script blocks have one mandatory sinit field (the script initialization method) and trait fields.

A "trait" can be one of several kinds. The kind is specified right after the trait keyword, followed by the trait name (a multiname). Following the name are the trait fields, varying by trait kind:

  • slot / const : slotid (unsigned integer), type (multiname), value
  • class : slotid, class (the actual class block)
  • function : slotid, method (the actual method block)
  • method / getter / setter : dispid (unsigned integer), method

Additionally, all traits may have flag fields, describing the trait's attributes (FINAL / OVERRIDE / METADATA), and metadata blocks.

metadata blocks (which are ignored by the AVM) consist of a name string, and a series of item fields - each item having a key and value string.

class blocks have mandatory instance and cinit fields, defining the class instance and the class initializer method respectively. They may also have trait fields and a refid field (the refid field is not part of the file format - it's an unique string to allow referencing the class, see above).

instance blocks - always declared inline of their class block - must contain one iinit field (the instance initializer method), and may contain one extends field (multiname), implements fields (multinames), flag fields (SEALED / FINAL / INTERFACE / PROTECTEDNS), one protectedns field (namespace), and trait fields.

method blocks may contain one name field (multiname), a refid field, param fields (multinames - this represents the parameter types), one returns field (multiname), flag fields (NEED_ARGUMENTS / NEED_ACTIVATION / NEED_REST / HAS_OPTIONAL / SET_DXNS / HAS_PARAM_NAMES), optional fields (values), paramname fields (strings), and a body field (method body).

body blocks - always declared inline of their method block - must contain the maxstack, localcount, initscopedepth and maxscopedepth fields (unsigned integers), and a code field. It may also contain try and trait fields.

code blocks - always declared inline of their body block - are somewhat different in syntax from other blocks - mostly in that they may contain labels. Labels follow the most common syntax - a word followed by a : character, optionally followed by a relative byte offset (in case of pointers inside instructions). Multiple instruction arguments are comma-separated. Instruction arguments' types depend on the instruction - see the OpcodeInfo array in abcfile.d for a reference.

try blocks - always declared inline of their body block - represent an "exception" (try/catch) block. They contain five mandatory fields: from, to and target (names of labels representing start and end of the "try" block, and start of the "catch" block respectively), and type and name (multinames), representing the type and name of the exception variable.

Values have the syntax type ( value ) . type can be one of Integer, UInteger, Double, Utf8, Namespace, PackageNamespace, PackageInternalNs, ProtectedNamespace, ExplicitNamespace, StaticProtectedNs, PrivateNamespace, True, False, Null or Undefined. The type of the value depends on type. Types True, False, Null and Undefined have no value.

Constants

Multinames have the syntax type ( parameters ) . type can be one of QName / QNameA, RTQName / RTQNameA, RTQNameL / RTQNameLA, Multiname / MultinameA, MultinameL / MultinameLA, or TypeName. parameters depends on type:

  • QName / QNameA ( namespace , string )
  • RTQName / RTQNameA ( string )
  • RTQNameL / RTQNameLA ( )
  • Multiname / MultinameA ( string , namespace-set )
  • MultinameL / MultinameLA ( namespace-set )
  • TypeName ( multiname < multiname [ , multiname ... ] > )

Namespace sets have the syntax [ [ namespace [ , namespace ... ] ] ] (that is, a comma-separated list of namespaces in square brackets). Empty namespace sets can be specified using [].

Namespaces have the syntax type ( string [ , string ] ) . The first string indicates the namespace name. In the case that there are multiple distinct namespaces with the same type and name (as PrivateNamespace namespaces usually are), a second parameter may be present to uniquely distinguish them. Internally (the ABC file format), namespaces are distinguished by their numerical index. When disassembling, rabcdasm will attempt to assign descriptive labels to homonym namespaces based on their context.

Strings have a syntax similar to C string literals. Strings start and end with a ". Supported escape sequences (a backslash followed by a letter) are \n (generates ASCII 0x0A), \r (ASCII 0x0D), and \x followed by two hexadecimal digits, which inserts the ASCII character with that code. Any other characters following a backslash generate that character - thus, you can escape backslashes using \\ and double quotes using \". When decompiling, high-ASCII characters (usually UTF-8) are not escaped - if you see gibberish instead of international text, configure your editor to open the files in UTF-8 encoding.

Additionally, constant pool types (signed/unsigned integers, doubles, strings, namespaces, namespace sets and multinames) may also have the value null (which represents the index 0 in the ABC file). Note that null is conceptually different from zero, an empty string or empty namespace set.

Macros

RABCDAsm has some basic macro-like capabilities, controlled by directives and variables. These bear some similarity to the C preprocessor, however these are processed in-loop rather than as a separate pre-processing step.

Directives

Directives start with a #, followed by a word identifying the directive:

  • #include string - inserts the contents of the file by the specified filename inline. Functionally equivalent to #mixin #get string , but faster.
  • #mixin string - inserts the contents of the specified string inline. Not very useful on its own.
  • #call string ( [ string [ , string ... ] ] ) - same as #mixin, however it additionally sets the special variables $1, $2 etc. to the contents of the specified arguments. When the end of the inserted string is reached, the old values of $1, $2 etc. are restored.
  • #get string - inserts a string containing the contents of the file by the specified filename inline. Similar to #include, but it inserts a string (surrounded by " etc.) instead.
  • #set word string - assigns the contents of the string to the variable word.
  • #unset word - deletes the variable word.
  • #privatens number string - deprecated, currently ignored.
  • #version specifies the syntax version of the disassembly. Newer RABCDAsm versions may emit disassembly output that is not backwards-compatible, but should still understand older disassemblies. The versions are:
    1. The first version.
    2. Introduced in v1.11 to work around error in ABC format specification.
    3. Introduced in v1.12 to support multiple non-private namespaces with the same name. This is the current version.

Variables

Variables are manipulated with the #set and #unset directives, and can be instantiated in two ways:

  1. $name - this inserts the contents of the variable inline. Note that although variables are defined using a string syntax, they are not inserted as a string using this syntax. Thus, the code:

    #set str "Hello, world!" ... pushstring $str

    will expand to pushstring Hello, world!, which will result in an error. To correct the problem, add escaped quotes around the variable contents ( #set str "\"Hello, world!\"" ), or use the second syntax:

  2. $"name" - this inserts a string containing the contents of the variable inline. This syntax also works for #call arguments (e.g. $"1").

Example

Here's an example of how to use the above features to create a macro which logs a string literal and the contents of a register:

#set log "
    findpropstrict      QName(PackageNamespace(\"\"), \"log\")
    pushstring          $\"1\"
    getlocal            $2
    callpropvoid        QName(PackageNamespace(\"\"), \"log\"), 2
"

; ...

pushbyte 2
pushbyte 2
add_i
setlocal1
#call $"log"("two plus two equals", "1")

Highlighting

Included with the project is the file asasm.hrc, a simple syntax definition for the Colorer take5 syntax highlighting library. It should be straight-forward to adapt it to other syntax highlighting systems.

Hacking

ABC is internally represented in two forms. The ABCFile class stores the raw data structures, as they appear in the binary file. ASProgram uses pointers instead of indexes, allowing easy manipulation without having to worry about record order or constant pools. Conversion between various states is done as follows:

                             file.abc
                               |  ^
              ------ ABCReader |  | ABCWriter ----
             /                 v  |               \
            /                ABCFile               \
           /                   |  ^                 \
    rabcdasm---------- ABCtoAS |  | AStoABC --------rabcasm
           \                   v  |                 /
            \               ASProgram              /
             \                 |  ^               /
              --- Disassembler |  | Assembler ----
                               v  |
                            file.asasm

AStoABC will rebuild the constant pools, in a manner similar to Adobe's compilers (reverse-sorted by reference count). The exact order will almost surely be different, however.

Should you need to write an utility to manipulate ABC, you can use the existing code to load the file to either an ABCFile or ASProgram instance, and perform the necessary manipulations using those classes.

Tips

The following tips come from the author's experience and may be useful for RABCDAsm users.

  1. Once you have disassembled a SWF file you intend to modify, you should immediately add the directory to a distributed source control system, such as Git or Mercurial. This will allow you to easily track and undo your changes, and easily merge your changes with new versions of SWF files.
  1. If you plan on making non-trivial changes to SWF files, you should install the debug Flash Player. This will allow you to see validation and run-time error messages, instead of simply getting an empty window.
  1. The Fiddler Web Debugging Proxy can be very useful for analyzing websites with SWF content. The following script fragment (which is to be placed in the OnBeforeResponse function) will automatically save all SWF files while preserving the directory structure.

     if (oSession.oResponse.headers.ExistsAndContains("Content-Type",
             "application/x-shockwave-flash")) {
         // Set desired path here
         var path:String = "C:\\Temp\\FiddlerCapture\\" +
             oSession.host + oSession.PathAndQuery;
         if (path.Contains('?'))
             path = path.Substring(0, path.IndexOf('?'));
         var dir:String = Path.GetDirectoryName(path);
         if (!Directory.Exists(dir))
             Directory.CreateDirectory(dir);
         oSession.utilDecodeResponse();
         oSession.SaveResponseBody(path);
     }
    

    A more robust version of the above snippet is available as a Fiddler plugin here.

    Once you have edited a SWF file, you can use Fiddler's AutoResponder to replace the original file with your modified version.

Limitations

  • None known.

License

RABCDAsm is distributed under the terms of the GPL v3 or later, with the exception of murmurhash2a.d, zlibx.d and LZMA components, which are in the public domain, and asasm.hrc, which is tri-licensed under the MPL 1.1/GPL 2.0/LGPL 2.1. The full text of the GNU General Public License can be found in the file COPYING.

rabcdasm's People

Contributors

aaron1011 avatar cybershadow avatar graham-g 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  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  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  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

rabcdasm's Issues

Errors building latest revision

Hi, I tried to compile RABCDAsm here with dmd2 and gdmd. Well, gdmd isn't supported (gdc (Ubuntu/Linaro 4.4.5-15ubuntu4) 4.4.5) as it says it's not version 2.

With dmd I get lot's of errors, most of them are related to cast from ulong to uint which I fixed, but these errors I could not fix as I doesn't know D and D "templates".

Thank you!

fungos@darkbrain:~/dev/foss/RABCDAsm$ dmd -run build_rabcdasm.d
autodata.d(96): Error: function murmurhash2a.MurmurHash2A.Add (const(void)* vdata, int len) is not callable using argument types (immutable(char),ulong)
autodata.d(96): Error: expected 1 arguments, not 2 for non-variadic function type void(ubyte[] s)
autodata.d(96): Error: cannot implicitly convert expression (cast(immutable(char)
)this.name) of type immutable(char)* to ubyte[]
autodata.d(96): Error: cannot evaluate addAutoField("privateIndex"c,false) at compile time
autodata.d(96): Error: argument to mixin must be a string, not (addAutoField("privateIndex"c,false))
autodata.d(96): Error: cannot evaluate addAutoField("privateIndex"c,false) at compile time
autodata.d(96): Error: argument to mixin must be a string, not (addAutoField("privateIndex"c,false))
autodata.d(55): Error: template instance asprogram.ASProgram.Namespace.ProcessAllData!().processData!(void,"","",HashDataHandler) error instantiating

Errors when compiling rabcdasm on mac ox?

Hi, I got errors when compiling it with dmd on mac ox:

ndefined symbols for architecture x86_64:
"_D12disassembler12Disassembler6__initZ", referenced from:
__Dmain in rabcdasm.o
"_D9asprogram12__ModuleInfoZ", referenced from:
_D8rabcdasm12__ModuleInfoZ in rabcdasm.o
"_D7abcfile7ABCFile4readFAhZC7abcfile7ABCFile", referenced from:
__Dmain in rabcdasm.o
"_D12disassembler12Disassembler11disassembleMFZv", referenced from:
__Dmain in rabcdasm.o
"_D12disassembler12Disassembler6__ctorMFC9asprogram9ASProgramAyaAyaZC12disassembler12Disassembler", referenced from:
__Dmain in rabcdasm.o
"_D7abcfile12__ModuleInfoZ", referenced from:
_D8rabcdasm12__ModuleInfoZ in rabcdasm.o
"_D12disassembler12__ModuleInfoZ", referenced from:
_D8rabcdasm12__ModuleInfoZ in rabcdasm.o
_D12disassembler10RefBuilder11ContextItem229__T11processDataTbVAyaa36_6175746f205f4175746f446174614f74686572203d2068616e646c65722e6f746865723bVAyaa12_72657475726e20747275653bTS8autodata66__T17EqualsDataHandlerTxPS12disassembler10RefBuilder11ContextItemZ17EqualsDataHandlerZ11processDataMxFKS8autodata66__T17EqualsDataHandlerTxPS12disassembler10RefBuilder11ContextItemZ17EqualsDataHandlerZb in rabcdasm.o
"_D9asprogram9ASProgram7fromABCFC7abcfile7ABCFileZC9asprogram9ASProgram", referenced from:
__Dmain in rabcdasm.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
--- errorlevel 1

could you please tell me how to fix it? thank your very much.

Failing to build on ubuntu 18.04

~/Downloads/RABCDAsm_v1.18$ dmd -run build_rabcdasm.d
build_rabcdasm.d(51): Error: undefined identifier system
build_rabcdasm.d(60): Error: undefined identifier system
build_rabcdasm.d(80): Error: undefined identifier getenv
build_rabcdasm.d(84): Error: undefined identifier getenv

Getting this error atm when go to build on my ubuntu 18.04 box

Unable to compile RABCDAsm under GNU/Linux x86_64

I have a working DMD compiler:

$ cat hello.d
import std.stdio;
void main() {
    writeln("Hello world!");
}
$ dmd hello
$ ./hello
Hello world!

However I can't build RABCDAsm:

$ git clone https://github.com/CyberShadow/RABCDAsm
...
$ cd RABCDAsm
$ dmd -run build_rabcdasm.d
* Checking for working compiler...
Error: Test failed

It seems like rdmd is returning an unusual status code, causing build_rabcdasm.d to fail. I've narrowed it to failure on line 59 by running the same commands external to build_rabcdasm.d:

$ cat test.d
void main() {}
$ rdmd --force --compiler=dmd -O -inline test.d
$ echo $?
255

I can get a working version built if I hack build_rabcdasm.d and change line 59 to accept an exit code of 255, but somehow it doesn't seem right ;)

Any suggestions what could be happening? Here is the output of uname -a, let me know if you need any more info.

$ uname -a
Linux rob 2.6.32-5-amd64 #1 SMP Mon Feb 25 00:26:11 UTC 2013 x86_64 GNU/Linux

Issue with Rabcasm

Ubuntu 14.04 x64

Rabcdasm v 1.17 compiled from source "dmd -run build_rabcdasm.d"
dmd x64 v 2.066

Works fine under windows, issue with ubuntu

Feel free to ask more information

[Stderr] object.Error@(0): Array lengths don't match for copy: 6 != 22
[Stderr] ----------------
[Stderr] ./rabcasm(_d_arraycopy+0x71) [0x562649]
[Stderr] ./rabcasm(assembler.Assembler.File assembler.Assembler.File.__ctor(immutable(char)[], immutable(char)[], immutable(char)[][])+0x1a4) [0x55262c]
[Stderr] ./rabcasm(void assembler.Assembler.handleVar()+0x519) [0x554599]
[Stderr] ./rabcasm(void assembler.Assembler.skipWhitespace()+0x294) [0x5538f4]
[Stderr] ./rabcasm(const(char)[] assembler.Assembler.readString()+0x64) [0x555eac]
[Stderr] ./rabcasm(asprogram.ASProgram.Multiname assembler.Assembler.readMultiname()+0x13b) [0x556bdb]
[Stderr] ./rabcasm(asprogram.ASProgram.Instruction[] assembler.Assembler.readInstructions(ref uint[immutable(char)[]])+0x829) [0x5597b1]
[Stderr] ./rabcasm(asprogram.ASProgram.MethodBody assembler.Assembler.readMethodBody()+0xed) [0x558bf5]
[Stderr] ./rabcasm(asprogram.ASProgram.Method assembler.Assembler.readMethod()+0x44b) [0x557f3b]
[Stderr] ./rabcasm(asprogram.ASProgram.Trait assembler.Assembler.readTrait()+0x7c5) [0x55758d]
[Stderr] ./rabcasm(asprogram.ASProgram.Class assembler.Assembler.readClass()+0x274) [0x558674]
[Stderr] ./rabcasm(asprogram.ASProgram.Trait assembler.Assembler.readTrait()+0x41f) [0x5571e7]
[Stderr] ./rabcasm(asprogram.ASProgram.Script assembler.Assembler.readScript()+0xeb) [0x55895b]
[Stderr] ./rabcasm(void assembler.Assembler.readProgram()+0xac) [0x55aa1c]
[Stderr] ./rabcasm(void assembler.Assembler.assemble(immutable(char)[])+0xf6) [0x55adce]
[Stderr] ./rabcasm(_Dmain+0x109) [0x4feab9]
[Stderr] ./rabcasm(_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+0x1f) [0x562ffb]
[Stderr] ./rabcasm(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x562f4e]
[Stderr] ./rabcasm(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()+0x30) [0x562fb4]
[Stderr] ./rabcasm(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x562f4e]
[Stderr] ./rabcasm(_d_run_main+0x193) [0x562ecf]
[Stderr] ./rabcasm(main+0x17) [0x531fef]
[Stderr] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fe836826ec5]

Void keyword instead of Undefined

Hello,
I recently found out that there is no Undefined keyword - it is mentioned in readme,
but in reality - a Void is used.
It is used in optional parameters and also for trait slot/const value kinds.
Or is Undefined used for something else?

Could you please update the readme?

It is not a big problem, but it is a little confusing.

rabcasm disassembly errror

using 64 branch.

./rabcasm field-0.abc
std.utf.UTFException@std/utf.d(644): Invalid UTF-8 sequence (at index 1)
----------------
./rabcasm(pure @trusted dchar std.utf.decode!(immutable(char)[]).decode(const(immutable(char)[]), ref ulong)+0xa7) [0x47d4f3]
./rabcasm(immutable(char)[][] std.string.splitLines!(immutable(char)[]).splitLines(immutable(char)[], std.string.KeepTerminator)+0x5b) [0x4b0753]
./rabcasm(immutable(char)[] assembler.Assembler.File.positionStr()+0x48) [0x4aa37c]
./rabcasm(void assembler.Assembler.assemble(immutable(char)[])+0x8c7) [0x4b03ab]
./rabcasm(_Dmain+0x117) [0x47ad5b]
./rabcasm(extern (C) int rt.dmain2.main(int, char**).void runMain()+0x17) [0x4b669b]
./rabcasm(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate())+0x2a) [0x4b6242]
./rabcasm(extern (C) int rt.dmain2.main(int, char**).void runAll()+0x42) [0x4b66ee]
./rabcasm(extern (C) int rt.dmain2.main(int, char**).void tryExec(scope void delegate())+0x2a) [0x4b6242]
./rabcasm(main+0xd3) [0x4b61d3]
/lib/libc.so.6(__libc_start_main+0xfd) [0x7f4d3b4bec4d]
----------------

rabcdasm.exe doesn't export a file properly

When a file name is extremely long, rabcdasm will not export a file correctly

ss 2014-04-21 at 10 47 26

(ignore the last command, I know that's incorrect)

I compiled the latest version of RABCDAsm with LMZA support. I have uploaded the file here: da.viddiaz.com/mod_man.dat

This error doesn't occur in 1.12.

Thanks,
David

LZMA not detected, dmd doesn't link to liblzma

I just tried to build on a fresh Ubuntu 16.04 install with the latest DMD compiler .deb grabbed from dlang.org, and it failed to detect LZMA. (output)

Packages liblzma5 and liblzma-dev are installed, but for some reason it's not linking to the library. I had to manually edit build_rabcdasm.d and add the linker flag:

@@ -35,7 +35,7 @@ else
        const DEFAULT_COMPILER = "gdmd";
 
 const DEFAULT_FLAGS = "-O -inline";
-const LZMA_FLAGS = ["-version=HAVE_LZMA"];
+const LZMA_FLAGS = ["-version=HAVE_LZMA", "-L-llzma"];
 
 import std.exception;
 import std.file;

This solved the problem for me...

Cannot build on windows

After the latest update (2014.01.11.) I cannot build the library on windows x64 with DMD 2.063.2.

Error message:

dmd -run build_rabcdasm.d

  • Checking for working compiler...

    OK

  • Checking for LZMA...

    OK

  • Building rabcasm
  • Building rabcdasm
    c:\Work\sdks\dmd\2.063\windows\bin....\src\phobos\std\range.d(611): Error: static assert "Cannot
    put a char[] into a StaticBuf!(char, 64)"
    c:\Work\sdks\dmd\2.063\windows\bin....\src\phobos\std\format.d(1584): instantiated from her
    e: put!(StaticBuf!(char, 64)
    , char[])
    c:\Work\sdks\dmd\2.063\windows\bin....\src\phobos\std\format.d(2950): instantiated from her
    e: formatValue!(StaticBuf!(char, 64), double, char)
    c:\Work\sdks\dmd\2.063\windows\bin....\src\phobos\std\format.d(413): instantiated from here
    : formatGeneric!(StaticBuf!(char, 64)
    , double, char)
    disassembler.d(1142): instantiated from here: formattedWrite!(StaticBuf!(char, 64)*, char, do
    uble)
    Error: Compilation of rabcdasm failed

Range violation error

Hi!
Got this error:
core.exception.RangeError@swffile(134): Range violation

0x0042BE30
0x0042BCBB
0x00413A48
0x0040DEB1
0x0040BE51
0x0040BD9F
0x004135C4
0x004100BF

With this swf file:
http://www.sendspace.com/file/u1qu9k

AFAIK this swf uses Alchemy.
If this is a known issue, could be nice to see something
"RABCDAsm doesn't support alchemy yet" instead of this error.

Thanks!

Compiling fails (Linux x86_64), linking error for libphobos

I'm experimenting with the AVM on Linux, and used this pretty awesome project in Windows with the precompiled binaries. However, when trying to build on Linux I got some linking error. I'm not familiar with compiling D programs, so I didn't immediately see how I could fix this (tried simply passing -fPIC but didn't work), sorry if it's trivial.

Compiling on Ubuntu 16.10, out-of-the box install.
Here's the last part for STDERR (most lines are the same, included Gist file) :

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(primitives_3288_11c4.o): relocation R_X86_64_32 against symbol '__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(conv_24a_329.o): relocation R_X86_64_32 against symbol '__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(conv_24b_6a3.o): relocation R_X86_64_32 against symbol '__dmd_personality_v0' can not be used when making a shared object; recompile with -fPIC

/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Error: linker exited with status 1

gistfile

as3 deobfuscation

you know how to deobfuscate classnames etc..? example _-0nQ etc.. i not find anything in the asm code with the real classnames >S

How to append a new MovieClip class ?

I know how to introduce a new class to a swf file, but since MovieClip is a type of symbol class, I'm wondering how to add a new image along with it?

ABC file size question

Hey again!

Is it OK if ABC file size after assembling is smaller then original extracted ABC file size, even if nothing was changed in the disassembled files?

If not, I'll send a swf where I see this issue.

Unknown flag HAS

Hi Vlad, I'm seeing a bizarre error.

I'm using the latest version of RABCDAsm (4251e40) and D compiler version v2.064.

On the surface it manifests as the error message in the title (Unknown flag HAS). It occurs when examining the line flag HAS_ACTIVATION. Digging deeper into assembler.d, I can see that it occurs because isWordChar('_') returns 0.

Bizarrely, it seems to somehow be related to the number of times the OrOr operator is chained. See for example this block of code, a modified version of isWordChar:

static bool isWordChar(char c)
{
    if (c=='_')
    {
        writefln("Result of %s: %d", "(cast(int)c)", (cast(int)c));
        writefln("Result of %s: %b", "(c == '_' || c == '-' || c == '+' || c == '.')", (c == '_' || c == '-' || c == '+' || c == '.'));
        writefln("Result of %s: %b", "(c == '.' || c == '-' || c == '+' || c == '_')", (c == '.' || c == '-' || c == '+' || c == '_'));
        writefln("Result of %s: %b", "(c == '_' || c == '-' || c == '+')", (c == '_' || c == '-' || c == '+'));
        writefln("Result of %s: %b", "(c == '_' || c == '+' || c == '.')", (c == '_' || c == '+' || c == '.'));
        writefln("Result of %s: %b", "(c == '_' || c == '.' || c == '-')", (c == '_' || c == '.' || c == '-'));
        writefln("Result of %s: %b", "(c == '_' || c == '.')", (c == '_' || c == '.'));
        writefln("Result of %s: %b", "(c == '_' || c == '-')", (c == '_' || c == '-'));
        writefln("Result of %s: %b", "(c == '.' || c == '-')", (c == '.' || c == '-'));
    }
    return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_' || c == '-' || c == '+' || c == '.';
}

which produces the following output:

$ rabcasm test/input-0/input-0.main.asasm
Result of (cast(int)c): 95
Result of (c == '_' || c == '-' || c == '+' || c == '.'): 0
Result of (c == '.' || c == '-' || c == '+' || c == '_'): 0
Result of (c == '_' || c == '-' || c == '+'): 1
Result of (c == '_' || c == '+' || c == '.'): 1
Result of (c == '_' || c == '.' || c == '-'): 1
Result of (c == '_' || c == '.'): 1
Result of (c == '_' || c == '-'): 1
Result of (c == '.' || c == '-'): 0
<Exception>

and, even more bizarre, a freshly built program char_error.d:

import std.stdio;

void main(string[] args)
{
    char c = '_';
    print(c);
}

void print(char c)
{
    writefln("c as int: %d", c);
    writefln("Result of %s: %b", "(c == '_' || c == '-' || c == '+' || c == '.')", (c == '_' || c == '-' || c == '+' || c == '.'));
}

which produces the following output:

c as int: 95
Result of (c == '_' || c == '-' || c == '+' || c == '.'): 1

[email protected](39): Too little data in stream

Hey,

I got such error while trying to disassemble swf (I use WinRABCDAsm GUI with latest RABCDAsm version):

2016-03-23 12:06:40.5856|ERROR|WinRABCDAsm|Error disassembling SWF file|System.Exception: CommandLine: D:\Soft\Reversing\Flash\RABCDAsm\abcexport.exe "as3simple_no_options.swf", StandardOutput: Error while processing as3simple_no_options.swf: [email protected](39): Too little data in stream


0x00408A11
0x0040D628
0x006B19A0

, StandardError:
, ExitCode: 0, Exception: System.InvalidOperationException: No ABC folders created! ---> System.InvalidOperationException: No ABC folders created!

https://mega.co.nz/#!JIFTUDYb!7KXvdgyyz1e3mar7SJOIaQBTADGOV8g1kTEJcM_q3Ts

RABCDA and webassembly

Is RABCDA will be useful with the near future webassembly to
allow developers to convert all the swf in assembler and continue to enjoy to develop in actionscript?
Also any chance to allow RABCDA to convert as1/as2 too?

No more int as #variable ?

previously i used in my code some macro like that

set barBackgroundColor "5526612"

and in my method

pushint $"barBackgroundColor"

Now i upgraded RABCDASM to the last binaries available (1.17) and of course i had to change the syntax (did the same for other variables, worked fine)

set barBackgroundColor "5526612"

pushint $barBackgroundColor

The compiler is saying "barBackgroundColor" is not a variable. Did i do something wrong in the syntax? Is it still possible to use a variable for pushint?

In fact , if i put the #set outside the method, i got the variable not found error.
If the #set is right before the pushint, i have an "Array length dont match for copy 7!=23"

I tried in an empty method, with no compile error. when i put the pushint, the Array length error pops..
What's going on?

escaping flash package names

some obfuscated flash packages have space %20 in their names and this causes an exception (v1.4)
can you fix this?
thanks

iOS and ABC code

Hey there,

Thanks for this cool stuff. I'm trying to use this project in a particular way:

  • on iOS we can't reload a SWF which has ABC code.
  • so all my SWFs (art assets from a FLA) don't have ABC code so I can load/unload etc.
  • I've an issue with a specific one, it seems to have ABC code. I checked the library and the main timeline, no code apparently. I exported ABC code thanks to abcexport & rabcdasm.
  • I can't use abcexport on my others SWFs since they don't have ABC Code.
  • So I'm not sure what I've to search in the exported ABC code to find the intruder.

Any ideas? Thanks.

Cannot recompile certain swf

Hello Rabcdasm creator thanks for this awesome tools, i used it for years ! Sometime i encounter error such as [email protected](979): Duplicate class name kind specially on certain game, unable to recompile and it's really sad :(

Is it possible to recompile the client even if there is "somehow" duplicated class ?

Conversion positive overflow issue

Hello! I'm new to using RABCDAsm, and while compiling, i got this error:

std.conv.ConvOverflowException@C:\Soft\dmd2d\windows\bin\..\..\src\phobos\std\co
nv.d(1328):
client-1\_-tl\_-17R.class.asasm(972,30):
        (included from client-1\_-tl/_-17R.script.asasm(27,31))
        (included from client-1/client-1.main.asasm(27,36))
Conversion positive overflow
----------------
0x0041456C
0x0043170E
0x0045C8DD
0x00454C9D
0x0042D367
0x00433C98
0x0042D367
0x0042E7CE
0xD28411B6
0xD2840474
0xC38B0FEB
0xFFF2C0E8
0x244B8BFF
0x8411B60F
0x245488D2
0xA7850F20
0x8B000000
0x1197E8C6
0xF6850000
0xF1B93075
0xBF004A1C

please help me fix this issue

[email protected](42): Wrong uncompressed file length

I have build rabcdasm from the master with the current master branch (efdde92).

Everytime i use rabcdasm on this .swf file abcexport crashes:

abcexport consumer_main_scene.swf
Error while processing consumer_main_scene.swf: [email protected](42): Wrong uncompressed file length
----------------
0x0040B4FD
0x0040AD2E
0x7783E97A in LdrGetProcedureAddressForCaller
0x7783E9B0 in LdrGetProcedureAddressForCaller
0x2E656C69
0x57460064
0x57430053
0x575A0053
0x6E490053
0x696C6176
0x69662064
0x7320656C
0x616E6769
0x65727574
0x61725400
0x6E696C69
0x61642067
0x69206174
0x5A4C206E
0x632D414D
0x72706D6F
0x65737365
0x57532064
0x69662046

The JPEX decompiler can cope with the file, so i assume it is not corrupted. If i can do anything to help you, let me know.

AssertError when attempting to recompile asm: Predicate for isSorted is not antisymmetric.

RABCDAsm seems to be fine extracting the abc code and then decompiling the extracted abc from the following SWF file available at: https://play.spotify.edgekey.net/client/d102aaf/flash/player.swf, however when attempting to recompile the main asasm file, the following assert error occurs:

core.exception.AssertError@/usr/local/Cellar/dmd/2.066.1/include/d2/std/algorithm.d(10709): Predicate for isSorted is not antisymmetric. Both pred(a, b) and pred(b, a) are true for certain values.
----------------
5   rabcasm                             0x000000010b4f275c pure nothrow @nogc bool std.algorithm.isSorted!(_D9asprogram7AStoABC19__T4PoolTdVbi0Vbi1Z4Pool8finalizeMFZ8sortPredFNaNbNiPS9asprogram7AStoABC19__T4PoolTdVbi0Vbi1Z4Pool5EntryPS9asprogram7AStoABC19__T4PoolTdVbi0Vbi1Z4Pool5EntryZb, asprogram.AStoABC.Pool!(double, false, true).Pool.Entry*[]).isSorted(asprogram.AStoABC.Pool!(double, false, true).Pool.Entry*[]) + 276
6   rabcasm                             0x000000010b52b39d pure void asprogram.AStoABC.Pool!(double, false, true).Pool.finalize() + 205
7   rabcasm                             0x000000010b5279eb asprogram.AStoABC asprogram.AStoABC.__ctor(asprogram.ASProgram) + 131
8   rabcasm                             0x000000010b4e3dd0 _Dmain + 368
9   rabcasm                             0x000000010b557a98 D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv + 40
10  rabcasm                             0x000000010b5579dd void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) + 45
11  rabcasm                             0x000000010b557a3d void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() + 45
12  rabcasm                             0x000000010b5579dd void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) + 45
13  rabcasm                             0x000000010b557959 _d_run_main + 433
14  rabcasm                             0x000000010b4e3e94 main + 20
15  rabcasm                             0x000000010b4e3c58 start + 52
16  ???                                 0x0000000000000002 0x0 + 2

Weird instructions

When inspecting some disassembled code, I see things like:

findpropstrict      Multiname("Vector", [...])
getproperty         Multiname("Vector", [...])
pushnull
applytype           1
construct           0

How shall I interpret this sequence? Different things here:

  1. I can't find applytype in the AVM overview (listed in README).
    What does it mean?
  2. Doesn't findpropstrict already put Vector in the stack?
    Why then get the property Vector of that object?

Should we add documentation for that?

variable ... not defined

I put

#set logstring "
findpropstrict QName(PackageNamespace(\"\"), \"trace\")
pushstring $\"1\"
callpropvoid QName(PackageNamespace(\"\"),\"trace\"), 1
"

on top of a .class.asasm file and tried to call it like this:

#call $"logstring"("constructor")

which just says:

variable logstring is not defined

.
Am I doing something wrong or is the documentation outdated?

Implement swfimageexport & swfimagereplace

Hey CyberShadow,
there are many SWFs which have attached images.

Would be cool (and very useful) if you could make a tool to extract those images from the SWFs and replace it (like swfbinexport & swfbinreplace).

Can't print precise representation of double

Here's my error:


> $ rabcdasm ../main-1.abc
> 
> [email protected](1170): Can't print precise representation of double: 00 00 A0 7F 4A 35 E9 41 (3383383039) => 0x1.9354a7fe00000p+31 => 00 00 E0 7F 4A 35 E9 41 (3383383039)
> ----------------
> 0x0045E5C1
> 0x00468007

Seems like there was a closed issue for this which said "compiler error" was the problem. Is there any recent solution to this problem? Is there a way I can ignore this error? It's erroring on one of the thousands of classes in the file, but I only need to edit one class (which disassembles fine)

I sent the abc file to: [email protected]

If you can give me a way to only replace a single .asasm file into the abc file, then that will resolve my issue just fine.

Thanks a ton for the awesome project.

Compatibility errors with SWF Encrypt...

Compatibility errors with A$m!a"y~e.t,a SWF Encrypt...

method
refid "orphan_method_0"
; Error while disassembling method: Don't know how to decode OP_subtract_p
; body
; maxstack 52
; localcount 1
; initscopedepth 1
; maxscopedepth 9
; code
; 0xB6 0x15 0xA6 0xC6 0x21 0x29 0x44 0xA8 0x27 0x41 0x47 0x05 0x72 0x70 0xDB 0x88
; 0x52 0x95 0x7D 0xE1 0x39 0xC8 0xF6 0x60 0x44 0x68 0x99 0xCD 0x06 0x0A 0xE9 0x67
; 0xB7 0xCD 0x1B 0x04 0x7D 0xC0 0x14 0xD0 0x73 0x65 0xDA 0x36 0x9C 0x82 0xA7 0xC1
; 0xF7 0xC2 0xF3 0x41 0x4E 0xE0 0x43 0x4B 0x7E 0x5A 0x88 0xF6 0x54 0xDF 0x5A 0x7C
; 0x42 0x0B 0x56 0xF3 0x76 0x06 0x72 0x81 0x24 0x30 0x13 0x8A 0x0E 0xF2 0x27 0xD5
; 0x93 0x42 0x9F 0xB3 0xD7 0x8C 0x08 0x7D 0xCB 0x0C 0x0C 0x1C 0x1B 0xBD 0x3F 0x5B
; 0x64 0x71 0x66 0x3B 0x1F 0xBD 0x0F 0x8A 0x2D 0xBD 0x5B 0x76 0xEF 0xEC 0x17 0xD4
; 0x5B 0x88 0xAA 0x5F 0x72 0x41 0x6E 0x2A 0x09 0x2D 0x68 0xF5 0xCE 0x41 0x8F 0x38
; 0xFD 0xC6 0x0B 0x00 0x20 0x8D 0x0F 0x01 0xD2 0xCD 0x50 0x74 0x7E 0x01 0x29 0x94
; 0x5C 0x2F 0xEE 0xEF 0x51 0x58 0x15 0xC8 0x66 0x0D 0x14 0x3E 0xF4 0x6C 0x35 0x09
; 0xC5 0xF5 0xBA 0xEE 0xB5 0x02 0x0A 0x3D 0xB1 0xC2 0xC6 0xFE 0x0B 0x24 0x02 0xAF
; 0x75 0xF2 0xFB 0x91 0x38 0x0E 0x0F 0x11 0x69 0xA2 0xBD 0xB4 0x29 0xA5 0x10 0x8B
; 0x44 0x0E 0x9E 0x38 0xAD 0x89 0x0C 0xDA
; end ; code
; end ; body
end ; method

Errors disassembling obfuscated SWF

Disassembling this obfuscated SWF fails with about 17000 errors, most of them 'Out-of-bounds constant index'. The SWF works fine in Adobe Flash Player (tested on 26.0.0.151).

All errors (click to expand)
  16322    Out-of-bounds constant index
    100    Don't know how to decode OP_add_p
     94    Don't know how to decode OP_multiply_p
     92    Don't know how to decode OP_0xBA
     79    Don't know how to decode OP_0xBD
     77    Don't know how to decode OP_subtract_p
     75    Don't know how to decode OP_divide_p
     71    Don't know how to decode OP_0xBC
     68    Don't know how to decode OP_0xBB
     63    Don't know how to decode OP_modulo_p
     63    Don't know how to decode OP_0xBE
     58    Don't know how to decode OP_0xBF
     47    Don't know how to decode OP_0xC8
     41    Don't know how to decode OP_0xC9
     36    Don't know how to decode OP_0xCB
     33    Don't know how to decode OP_0xCA
     29    Don't know how to decode OP_0xCD
     25    Don't know how to decode OP_0xCC
     18    Don't know how to decode OP_0xCE
     13    Don't know how to decode OP_0xCF
     11    Don't know how to decode OP_0xFF
     10    Don't know how to decode OP_0xE6
     10    Don't know how to decode OP_0x98
      8    Don't know how to decode OP_0xEC
      8    Don't know how to decode OP_0xDB
      7    Don't know how to decode OP_declocal_p
      7    Don't know how to decode OP_0xF7
      7    Don't know how to decode OP_0xED
      7    Don't know how to decode OP_0xDD
      7    Don't know how to decode OP_0xDC
      6    Don't know how to decode OP_coerce_u
      6    Don't know how to decode OP_coerce_o
      6    Don't know how to decode OP_0xFA
      6    Don't know how to decode OP_0xD8
      5    Don't know how to decode OP_increment_p
      5    Don't know how to decode OP_concat
      5    Don't know how to decode OP_bkptline
      5    Don't know how to decode OP_0xFC
      5    Don't know how to decode OP_0xEE
      5    Don't know how to decode OP_0xD9
      4    Don't know how to decode OP_negate_p
      4    Don't know how to decode OP_inclocal_p
      4    Don't know how to decode OP_0xFD
      4    Don't know how to decode OP_0xF6
      4    Don't know how to decode OP_0xE4
      4    Don't know how to decode OP_0xE3
      4    Don't know how to decode OP_0xE1
      4    Don't know how to decode OP_0xDF
      4    Don't know how to decode OP_0xDA
      3    Don't know how to decode OP_0xE9
      3    Don't know how to decode OP_0xDE
      3    Don't know how to decode OP_0x99
      3    Don't know how to decode OP_0x8E
      3    Don't know how to decode OP_0x8B
      3    Don't know how to decode OP_0x8A
      2    Don't know how to decode OP_timestamp
      2    Don't know how to decode OP_0xFB
      2    Don't know how to decode OP_0xF9
      2    Don't know how to decode OP_0xF5
      2    Don't know how to decode OP_0xF4
      2    Don't know how to decode OP_0xEB
      2    Don't know how to decode OP_0xE8
      2    Don't know how to decode OP_0xE5
      2    Don't know how to decode OP_0xE2
      2    Don't know how to decode OP_0x8D
      2    Don't know how to decode OP_0x8C
      1    Don't know how to decode OP_decrement_p
      1    Don't know how to decode OP_add_d
      1    Don't know how to decode OP_0xFE
      1    Don't know how to decode OP_0xF8
      1    Don't know how to decode OP_0xEA
      1    Don't know how to decode OP_0xE0

Inline method

What are these? There also seems to be obfuscated code thought there are others which are not.

I don't mind lost filenames but secureSWF files when decoded with this seems to have this behaviour.

method
 refid "pool.network:NetworkHandler/instance/init/inline_method"
 returns QName(PackageNamespace("", "pool.network:NetworkHandler/instance/init/inline_method"), "void")
 body
  maxstack 20
  localcount 20
  initscopedepth 10
  maxscopedepth 20
  code
L0:
   newfunction         "pool.network:NetworkHandler/instance/init"
   pop
   ; Error: Out-of-bounds constant index
   ; 0x40
L3:
   ; 0xC5
L4:
   decrement
   ; Error: Don't know how to decode OP_bkpt
   ; 0x01
   ; 0x29
   ; 0x58
   ; 0xFF
   ; 0xFF
   ; 0xFF
   ; 0xFF
   ; 0x0F
   ; 0x29
  end ; code
  try from L0+1 to L3 target L4 type null name null end
 end ; body
end ; method

cannot recompile certain swf (another issue ?)

Hello CyberShadow, the fix you made recently made the recompilation with duplicated class working however there is another issue now i integrated a new package "com" (monsterDebugger) and it's throwing up an error "std.conv.ConvOverflowException@C:\D\dmd2\windows\bin....\src\phobos\std\conv.d(1350):"

"Conversion positive overflow"

I made you a nice .rar where it's already integrated and unpacked, you can just try to "recompile" and the error should pop up, It's the exact same SWF as last time.

I know those error sux, but in a way resolving them make your software much better ๐Ÿ‘
Thanks for the time taken, hope you can solve the next part of the issue ! (lol).

Regards.

DL: http://www.mediafire.com/file/sl25f008c8xsa53/Sample.rar

Is RABCDAsm supposed to leak?

I tried to use the disassembler class in a D project. After disassembling a few files in one run, I noticed it allocates but never frees, causing my program to throw out of memory after some time.
Is this supposed to happen?

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.