Announcing: RABCDAsm

by on May.05, 2010, under Code

RABCDAsm (Robust ABC (ActionScript Bytecode) [Dis-]Assembler) is a collection of utilities including an ActionScript 3 assembler/disassembler, and a few tools to manipulate SWF files.

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 (used in Flash 9 and newer) with the following properties:

  • Speed. Less waiting means more productivity. rabcasm can assemble large projects (>200000 LOC) in under a second on modern machines.
  • 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.
  • 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.

Read more on the project’s homepage on GitHub.

:, , , , ,

33 Comments for this entry

  • Sirmabus

    Hey CyberShadow!

    I went’a googling for something useful in brower game stuff and ended up here with the right search words.
    Great work, and something truly useful for once.

    Email or come by IRC (it changed recently from “.com” to “.info”).
    And ask Viru to send me an email damn it.

  • Celtic

    When running the tool abcexport.exe on a .swf file, I get the error “Range Violation”. Any idea what might be causing this?

  • Geo

    Hi CyberShadow !!!
    Great project !!!

    I have a little problem after successfully disassemble / assemble some swfs without errors and without even change the bytecode, when i load them back i get some errors from the flash debugger like :

    Variable _ZBlackJackModule_mx_core_FlexModuleFactory is not defined.

    Why this happens .. Is there any way to fix this ?

    Thx in advance.

  • Lopus

    Hey,

    really cool stuff, u helped me a lot! Is there any way to get abc code into readable as3? I cant decompile it from tools, its flex code and Trillix and stuff like that are crashing.

    Thanks

    • CyberShadow

      That’s what decompilers are for. Decompilation is outside the scope of the RABCDAsm project, and it’s easily possible to write AVM bytecode that is impossible to represent using ActionScript 3 source code. Commercial decompilers exist, but they are often fragile and usually easily defeated by obfuscators.

  • Lopus

    Thanks for your answer. I just need it for easier decompilation, writing functions in ABC is bad :S

  • x

    rabcdasm crashes on this file: (link removed)

  • x

    rabcdasm gives me core.exception.OutOfMemoryError on this one which is the same file but the original compressed version
    (link removed)

  • x

    this proggie is SWEET :)
    I love how it converts jumps to labels and vice versa. This is so much easier to follow than switching windows in SWFReader and also compiles SO much faster. Thx very much.

  • uzumaki19

    need help i geting error on compiling the swf i edit

    std.file.fileexeption@std\file.d game-0.swf:The system cannot find the file specified.

  • uzumaki19

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

    i just follow the instruction

  • uzumaki19

    can you give me the right instruction tnx in advance

  • curiousone

    @CyberShadow: you rock!

    @CyberShadow readership:
    RABCDAsm is meant to make life easier.

    For fast error free disassembling/reassembling, use bat files:
    >> Create 2 text files in your RABCDAsm folder, change extension from “.txt” to “.bat”

    >> You can call your bat files:
    disassemble.bat
    reassemble.bat

    >> inside your “disassemble.bat” type:
    abcexport name.swf
    rabcdasm name-0.abc
    pause

    >> inside your “reassemble.bat” type:
    rabcasm name-0\name-0.main.asasm
    pause
    abcreplace name.swf 0 name-0\name-0.main.abc
    pause
    del /q /f name-0.abc
    pause

    >> You just double click “disassemble.bat” to extract your asasm files, after editing your files double click “reassemble.bat” to update your SWF.

    Note: Your RABCDAsm folder should include 2 bat files, your SWF, abcexport.exe, rabcdasm.exe, abcreplace.exe, rabcasm.exe. You need to put the right SWF name in the bat file. When reassembling: your folder name-0 will remain there, and the file name-0.abc will disappear.

  • curiousone

    *Oh yeah, credits for the bat method to MorpheusJo

Leave a Reply

Looking for something?

Use the form below to search the blog: