Announcing: RABCDAsm
by CyberShadow 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.
May 9th, 2010 on 8:49 pm
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.
March 29th, 2011 on 11:08 pm
When running the tool abcexport.exe on a .swf file, I get the error “Range Violation”. Any idea what might be causing this?
April 14th, 2011 on 2:18 am
Sorry, I can’t tell just from the error message. Can you send me the .swf file?
September 9th, 2011 on 7:57 am
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.
September 9th, 2011 on 9:32 am
If you send me the SWF, I can look into it. Make sure you’re using the latest version first, though.
September 10th, 2011 on 12:12 am
thx for the quick response!!
Here is the swf it can not be run alone only for their main interface …
http://swfs.zoo.gr/zmodules/games/multi/blackjack/ZBlackJackModule_163.swf
y ll need to visit http://www.lazyland.com and choose multiplayer and then blackjack!!
September 10th, 2011 on 12:53 am
I’m seeing the same errors when I try to run the original SWF in the stand-alone Flash player. It probably can’t be ran by itself (which would be explained by the “Module” part of the filename).
September 10th, 2011 on 2:34 am
I am not running the swf from the standalone player, i m running it via their main interface which loads their original swf successfully (not the one from their server I use a tool like fiddler), then if I disassemble/reassemble the SWF the debugger shows me only this one error.
Variable _ZBlackJackModule_mx_core_FlexModuleFactory is not defined.
Is this any kind of protection or something?
September 11th, 2011 on 11:55 am
I can’t reproduce the behavior you’re describing.
September 9th, 2011 on 7:49 pm
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
September 10th, 2011 on 12:21 am
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.
September 11th, 2011 on 4:17 pm
Thanks for your answer. I just need it for easier decompilation, writing functions in ABC is bad :S
September 11th, 2011 on 7:53 pm
rabcdasm crashes on this file: (link removed)
September 11th, 2011 on 8:05 pm
Works for me. Did you remember to enclose the file name (which contains a space) in quotes? (The error message should have made that clear.)
September 11th, 2011 on 9:36 pm
yes, I hit tab in cmd so it auto-typed the name with quotes
September 11th, 2011 on 7:57 pm
rabcdasm gives me core.exception.OutOfMemoryError on this one which is the same file but the original compressed version
(link removed)
September 11th, 2011 on 7:58 pm
btw, I used precompiled 1.8.7 for both of the above
September 11th, 2011 on 8:06 pm
There is no such version. The latest version is 1.8.
September 11th, 2011 on 8:07 pm
Works for me.
September 11th, 2011 on 9:27 pm
LOL 1.8.7z <–
both worked for you?
what could I be doing wrong?
I extracted rabcdasm.exe and rabcasm.exe to my path, I opened a command prompt in the dir with the swf
(links removed)
Win7 Pro x64 with 4GB ram
rabc exe's are located in F:\_bin\
September 11th, 2011 on 9:39 pm
Kindly refer to the usage instructions. You must first extract the ActionScript ByteCode to .abc files using the abcexport program before attempting to disassemble it.
September 11th, 2011 on 9:45 pm
so sorry… I feel like a genuine n00b…
September 11th, 2011 on 9:33 pm
just tried again with all rabc contents + both swf’s in c:\rab and got same errors
September 12th, 2011 on 5:11 am
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.
October 23rd, 2011 on 3:36 pm
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.
October 23rd, 2011 on 3:36 pm
You’re doing it wrong.
October 23rd, 2011 on 10:47 pm
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
October 23rd, 2011 on 10:49 pm
Yeah. You’re doing it wrong.
October 24th, 2011 on 2:03 pm
can you give me the right instruction tnx in advance
October 24th, 2011 on 2:04 pm
Please consult the included documentation.
October 24th, 2011 on 2:17 pm
ok tnx
November 9th, 2011 on 10:39 am
@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.
November 9th, 2011 on 2:34 pm
*Oh yeah, credits for the bat method to MorpheusJo
March 6th, 2012 on 10:00 pm
Is that possible I have a swf file without DoABC tags?
And in that case, how could I disassemble it?
March 6th, 2012 on 10:01 pm
Yes, if it doesn’t contain any ActionScript 3 code.
Use another tool. For ActionScript 1/2, you may want to look at flasm or SWiX.
March 6th, 2012 on 10:09 pm
Is there a pratical way to recognize which language is the swf written in?
And maybe it’s a bit off-topic, but I need the help of an expert like you: do you know if it’s possible to decompile/disassemble Shockwave too?
March 6th, 2012 on 10:11 pm
If it’s not ActionScript 3, it’s almost surely ActionScript 2.
Look at the file with SWiX or other SWF editor. DoABC / DoABC2 tags mean ActionScript3, DoAction tags mean ActionScript 1/2.
Sorry, I’ve never looked at Shockwave.
March 6th, 2012 on 10:15 pm
Thank you. For your hard work, and your rapid replies
April 15th, 2012 on 12:47 pm
This one app is a gift from allah, thank you for all your efforts and time.
Do you have a donate button?
August 6th, 2012 on 8:55 am
Good job,it is a perfect app!
November 1st, 2012 on 11:52 pm
Hey CyberShadow,
I’ve created a GUI front end for RABCDAsm:
https://sourceforge.net/projects/winrabcdasm/
Check it out
November 3rd, 2012 on 8:45 am
Ohad
November 1st, 2012 on 11:52 pm
Hey CyberShadow,
I’ve created a GUI front end for RABCDAsm:
https://sourceforge.net/projects/winrabcdasm/
Check it out
Reply
it does not work
you can explain its activities do not?
November 5th, 2012 on 10:15 am
this is file log :
http://www.mediafire.com/download.php?5x7ndibnxslkxyg
help me thank you
November 12th, 2012 on 10:34 pm
Waaoooooooooooooooo
Great Great Great Great Great Great Great Great Great Great work,
January 22nd, 2013 on 4:47 am
Thank you for your work. I’m downloading now. I’m disassembling and re-assembling A-S 2. This is the only such program for the more recent versions of A-S.
There is another for A-S version 2 but support has dropped. It appears to work well for older A-S versions.
Disassembler/Compiler
See: http://www.nowrap.de/flasm.html
Just disassemble to readable text, useful:
http://www.nowrap.de/flare.html
Open Source A-S 2 Compiler, “it’s the source Luke”:
http://www.mtasc.org/ maybe support
…then a wild idea, one language compiles to any target platforms bytecodes including FlashVM:
http://haxe.org/
http://en.wikipedia.org/wiki/Haxe