This is one of the official MMOVision tutorials.
We will lead you through some beginner-level stuff in ASM(Assembly) but first I would like you to read through the below quote from
wikipedia Quote:
| An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture. This representation is usually defined by the hardware manufacturer, and is based on abbreviations (called mnemonics) that help the programmer remember individual instructions, registers, etc. An assembly language is thus specific to a certain physical or virtual computer architecture (as opposed to most high-level languages, which are portable). |
Okay, so now you know what Assembly is, no need to question that, right?
Opcodes, what are they?
I'm not going to bring up every single opcode, but this is basically the most important ones. (at least in hacking)
MOV = Move
Move something from one point to another, it's self-explainable but let me show you.
This will move "cells" to the "brain", it's a
humortastical example, but you get it.
CMP = Compare
Simple as it is, it compares the affected stuff.
(compares two registers or a register + a value)
Would compare what is stored at address with the value
JMP = Jump (conditional)
This is a very simple instruction, as I usually call them.
This would make the it jump to the address 0x00400000(0x is an indicator that it is HEX and not DECIMAL, however it is not necessary to write out in ASM.)
As the following is pretty much the same type of memory altering as above, we will just take up what they mean and you will be able to figure it out without any examples really, you'll see why after reading them.
- JE(JZ) = Jump to if equal
The reason why JZ is there, is because it does the same thing as JE but with ONE exception, and that is - it will only jump if the
Zero Flag is applicated at the destination.
- JNE = Jump to if not equal
JG = Jump to if greater than
JL = Jump to if less than
JNG = Jump to if not greater than
JNL = Jump to if not less than
JGE = Jump to if greater than or equal to
JLE = Jump to if less than or equal to
Okay, so now you know all the basic jumps, off to some other..
INC = Increment
Let's think (hypothetically of course) that the value at EAX is equal to 1.
And now we "INC" that, it would be something like this.
The value stored in EAX is now increased to 2.
A little more advanced example:
Code:
inc dword ptr [00400000]
This would mean that the value at 00400000 will be increased by 1.
DEC = Decrement
Same as above, but the other way.
EAX = 1
EAX = 0
A little more advanced example:
Code:
dec dword ptr [00400000]
This would mean that the value at 004000 will be decreased by 1.
PUSH = pushes a value, point in memory, or register onto the stack.
(Push puts a value
ON THE TOP OF THE STACK AND INCREASES THE SIZE OF THE STACK BY 1)
The syntax for this would be PUSH then either value/register or any memory reference.
More about stacks at wikipedia, click here. POP = pops a value off the stack into a point in memory or register.
This is the opposite of PUSH (by this I mean that it takes from the stack instead of adding up), and it is usually likely to work with PUSH, since often if a registry is preserved with PUSH EBX you can find POP EBX later in the memory.
Example of the POP syntax:
(Remember: Pop takes the value
ON THE TOP OF THE STACK.)
See here that the syntax of POP is the same as PUSH?
Good!
We've decided to not bring these things up more than this, as it would probably not profit you anyways, but we will bring up what they are.
ALLOC = Reserves space for you to use in the memory
Registersymbol = Makes a symbol you can use for reading / editing values by adding it as a address in your cheat table.
Dealloc = Releases space you reserved.
Unregistersymbol = Reversed of Registersymbol.
Label - Hmm, this is just a label
If you would like to look further into Jumps, I would recommend googling up the following jumps, some which are described above, but anyways.
JMP, JE, JZ, JNE, JNZ, JA, JG, JNA, JNG, JB, JL, JNB, JNL, JAE, JGE, JNAE, JNGE
And incase you did'nt know [] acts like a pointer. Here is a example assumming eax is 0x00400000.
Code:
[eax] is saying whatever is stored at 0x400000
A tutorial by
spawnfestis and edited / cleaned up by
Losplagos.
additional thanks to the
mmovision community for making it of any worth to write up.