Making An AoB Hack

This is a tutorial about how to find an array of bytes hack. This is only about what to do when you have the function right in front of you only. I won't write a tutorial about how to find specific functions because every author stores it differently (by using different variables).

1. Finding the Important Folders/Scripts
Finding the right function can range from easy to hard. To find the right place to hack in a non-obfuscated code, just search for obvious variables like "lives" or "money"/"cash" or whatever it's called when you load the swf.

For this example, we'll be using Bloons Monkey City SWF: You will see that most of these folders are useless, and in order to filter out the useful areas, we will search for keywords like "lives" or "money". A quick search for things like that makes sure that the important scripts are in that folder.

2. Locating the Function
In order to locate what controls what, you have to look in the right function. Once you press inside the function, the P-source code will come out. Now we just press the 0xFF push button and all the arrays will come out!

Let's pretend that this is your array:

//25 ac 32

pushshort 300

//d1

getlocal1

//91

Increment

//24 05

Pushbyte 5

//a2

Mutiply

//a0

Addthe

Confused? This translates to:

300+(_loc1_ + 1) *5

Let's just say that this is your lives formula (it's not), so to mod it you want to change the multiplier (*5) right?

But... if you're a beginner, you won't know what the hex arrays stand for, so you'll need to edit the code. Press "Edit Actionscript" and try changing the code above to "300 + (_loc1_ + 1) * 100.

(Click edit button and save)

Click on the 100, and you should see that the corresponding hex array is 24 64 (pushbyte 100)

What to change:

25 ac 32 d1 91 24 05 a2 a0

25 ac 32 d1 9a 24 64 a2 a0

Congrats, you have made your first AoB hack!

Note: Do not submit this hack, this is NOT the actual AoB.

A Little Note on Some SWFS
Some swfs, instead of having straight on variables, have variables named o1235 or like t_fefb. This is known as obfuscation and is meant to challenge users who try to crack their code. To hack these require some more time than usual because you'll need to know what the variables do first. The best way to hack these kind of files is to rule out the assets and the useless functions, and then try to guess what the obfuscated functions mean.