[ASM] The Definitive FE Assembly Hacking Tutorial


#1

Foreward: These posts are a WIP (Work in Progress), and are WIKI’d for all wizards to edit and refine them.

Episode 1: MEMORY
What is memory and why should I care?
Memory is a crucial component of assembly hacking and programming as a whole and will show up
damn near everywhere in your hacking career, so it’s best to go over it first, even if you don’t start an
illustrious hacking career making something incredible, understanding memory and seeing how to deal with it
could be really useful in itself. Memory is exactly what it sounds like, it remembers stuff as the program
(game) runs. Say for instance, say a unit levels up and gets +1 Max HP, or you get a new item. The game
updates its memory to reflect values that change over time, but where is it? Compare the game to real life
and think about your own memory; you remember, for instance, how old you are, what you had for breakfast,
etc(I hope), but you don’t know where in your brain those pieces of information exist, so they can only be
changed if “Life”, or the program, changes them. This I think is a very fundamental concept, but I see it
looked over in most assembly tutorials. From here on I’ll show you how to find specific values and edit
them effectively.
That’s cool and all, but what is it?
Well if you’ve ever used a hex editor, you’ve seen how everything within a file is arranged in a particular
order, essentially and superifically, its a bunch of data all next to each other in a single block; when you
edit something in a hex editor you’re actually editing memory. “BUT WAIT A MINUTE! You said memory was stuff
that changed over time!”, you may say, that’s half true. See there are two types of memory, random access and
read only. Random access memory(or RAM), is that type of memory, the kind that can be read and written to
throughout the program cycle whereas read only memory(ROM) is constant and usually consists of code or other
resources. The long and short of it? If you have experience with a hex editor, editing memory shouldn’t be
such a foreign concept when you put it into practice.
Okay so memory edits sound simple enough, but what do I change and what do I change it to?
Now we get our get our hands dirty crack open VBA. From tools, you can select Memory Viewer and you’ll get a
thing like this.
PICTURE1
Because what I’m going over is universal and not FE specific I’m going to be using A Link to the Past as an
example.
PICTURE2
But here’s a little something for you guys so you don’t feel totally out of place
PICTURE3
Okay so let’s say we want to find out where rupees are in memory. To find it, we’re going to have to do a
cheat search.


Assembly Tutorial
#2

Reserved


#3

Reserved


#4

Reserved


#5

Reserved


#6

Reserved


#7

Reserved


#8