nop Tutorial

Started by Igglyboo, October 22, 2008, 01:45:19 AM

Previous topic - Next topic

Igglyboo

I know for most hackers this is basic stuff but a few people have been asking for ASM examples/tutorials so I'm here to offer my two cents.
Feel free to comment/question or correct me.

First off, What is nop?
It stands for "no operation".
If an address is set to nop it basically does nothing, will not add subtract or anything.
It is very useful for codes that get overwritten by the game.

Say I want my coins to be set to 999 and stay at 999 no matter what happens.
I found my coin address at 8012F6D0(these addresses are made up).
I set it to 999 but it does not stay there OR the game does not even set it at all.
You poke the value at 999(000003E7) and the game says " Hey thats not right!" and it sets it back to its original value.
You would then have to nop the value that is writing to it.

Put the value 8012F6D0 in the breakpoint tab and set it to a Write Breakpoint.
Get the value to break(lose or gain coins or both, sometimes there is one value writing up and one writing down) and go to the disassembly tab.
The top address, lets say 815467FD, is the address that is writing to your value(usually).
Poke the value at 60000000 to nop it.
Assuming both addresses are 32bit your code would look like this

145467FD 60000000 ( this line would nop it and stop it from writing to your value)
1412F6D0 000003E7 ( this line would set the value to 999)

Hope this helps, Happy Hacking!

Black_Wolf

great tutorial, you did actually explain a bit of breakpoints here to which will help those figuring out what the hell they do lol.

Just one quick correction, when you used the example, it ended with D, just make sure that when setting breakpoints, or writing 32bit codes, the address is a FULL WORD (i.e ending with 0,4,8 or C) because when the value is accessed, the asm will generally access the full 32bit address. I do understand this is just an example address though so its no big at all. Overall well done, should clear up some simple breakpoint-nopping for a lot of people =)

g6flavor

#2
Quote from: Igglyboo on October 22, 2008, 01:45:19 AM
145467FD 60000000 ( this line would nop it and stop it from writing to your value)
1412F6D0 000003E7 ( this line would set the value to 999)

Hope this helps, Happy Hacking!

Take this example as HP address 1412F6D0 000003E7 (999 HP)
What if the address changes on every stage, ex. 1412F6D0 (stage1 ) > 14126A80 (stage2)
Would the breakpoint 145467FD 60000000 still works for the next stage?

Quote from: Igglyboo on October 22, 2008, 01:45:19 AM
Put the value 8012F6D0 in the breakpoint tab and set it to a Write Breakpoint.
Get the value to break(lose or gain coins or both, sometimes there is one value writing up and one writing down) and go to the disassembly tab.
The top address, lets say 815467FD, is the address that is writing to your value(usually).
Poke the value at 60000000 to nop it.

By top address, do you mean the top address inside the disassembly box where the address is the same address as the one said on the top "Do not break on this address" or the address on the left side outside the disassembly box?

Dr.Pepper

assembler location does not change between stage, so first line would work, but second line would not, you would need to replace it with pointer in pointer code if wanting to set the value for 999, (although usually when you nop asm, then you usually dont need to set value to anything.)