19/02/2008
Cheat engine

CE เป็นโปรแกรมที่ใช้ดู code  ภาษา  Assembly  ของโปรแกรมต่างๆที่ run  ใน  memory ซึ่งเรา

สามารถนำไปประยุกต์ใช้และเป็นการฝึกภาษา  Assembly  ไปด้วย

สำหรับผู้ต้องการหาข้อมูลเกี่ยวกับภาษา Assembly http://cs.ssru.ac.th/satannoy/assembly11.html

www.cheatengine.org/download.php  ตัวโปรแกรมCE

ลองฝึกดูนะครับติดstep ไหนถามได้ครับ

วิธีฝึกใช้

Step1 - Introduction

First open Cheat Engine and Tutorial. Now, click the button with computer icon on it (It�s in top left corner). New window will pop up. Here, you can choose proccess that you want cheat with. Find Tutorial.exe proccess, click on it and click Ok button, or just double click on this proccess. If you done everything right, proccess name you chose(Tutorial.exe) should be written in top of Cheat Engine window. If it does, click next.

Step 2 - Exact Value scanning (Password: 090453)


In this step you have to find health value and change it to 1000.You will learn here how use Exact Value Scanning and for what is it. Let�s say that you play some game, and with each hit we lose some HP(health). Now force enemy to hit you(click �Hit me� button below your health). As you can see, your health decreased. Now go to Cheat Engine, in Scan Type choose Exact Value, in Value Type choose 4 Bytes, type number of your health in window above Scan Type and click First Scan(If you already have scanned before, cause you were curious or you wanted to click this button, you will have New Scan instead of First Scan. Click it and then do what I just said). Below computer icon(this one in top left corner) you can see �Found:�. It shows you how many addresses with value matching to one you wrote were found. If there are too many(�too many� are when addresses are not displayed in window below �found:�, in CE v5.3 there is probably no limit for displayed addresses...), click New Scan and get hurt once again(by clicking on �Hit me� in tutorial window). Type in CE new HP value and click First Scan. Do it until some addresses will be displayed in window below �found:�. Of course there are more ways to find correct value, but this tutorial heading is �Exact Value Scanning�, so we will use only this option.
Ok when you have displayed few addresses, go to tutorial (Leave CE as it is, with these addresses in the list) and click �Hit me�. Go to CE, look on found addresses list and find decreased value(previously every address was equal to number of health before this hit. So when previously your health were 96, look for value smaller than this one, but at once it have to be equal to new health number). Example: I had 96HP, and after that hit I lost 5, so now I have 91. So I have to look for 91 value, while almost every other will be 96. So our will differ from others, which makes it easy to find.
Once we found it, click on it and press red arrow pointing to left/down, or just double click on it. It will show in window on bottom of CE. There you can see 5 labels: Freeze(If it�s ticked, value of address in same line will be froze/stopped, it will not be able to change), Description(as it says, you can add it by yourself), Address(shows address), Value Type(Shows type of value stored in address in same line), Value(shows value stored in address in same line). Our objective is to change HP value to 1000, so double click on value. New window will open with current amount of value. Change it to 1000 and click OK. If everything went ok, you should be able to click Next in tutorial window to go to next step. If you can�t that means that you changed value to wrong one, or you changed wrong value(you have wrong address).

So if you made something wrong here�s one more time everything what above, but in shorter version:
1. In tutorial click hit me
2. In cheat engine write number of your health and click first scan
3. If you got too many addresses, press new scan, then hit me and write new amount of HP. Repeat it until you will find only few addresses(about 20-30 or less).
4. If you found enough few, go to tutorial and click hit me
5. Go to cheat engine, look on list of addresses on left and look there for address equal to new amount of HP(it�s easy to find it cause it differ from others)
6. If you found it, double click on it. It will move to window on bottom
7. Now double click its value(It is in vertical line under Value label). New window will show
8. Write here 1000 and click OK
9. Go to tutorial and click Next

Step 3 � Unknown Initial Value (Password: 419482)


Ok here you have to find value stored in bar and cahgne it to 5000. Same as previous, but here we do not have exact value� but bar! What could be stored in it ? One thing is sure � value from 0 to 500. It would take way too long to search for every value using exact value scan type. So here we have to look for �Unknown Initial Value�. In Scan Type choose it and click first scan. It should find a lot of addresses(it finds ALL adresses that store 4 bytes values, unless you choose other value type). So to reducethis amount a little, we have two options:

1. Easier(for beginners) � After first scan click �Hit me� in tutorial, go to cheat engine and, chagne Scan Type to Decreased value(you know why, cause we will look for decreaed values, and one of them is our helath) and click Next Scan. It should find few addresses. Our address is 0 � 500, so look for similar one. If you found more than one, and you aren�t sure which one is it, you can click �Hit me� and check which one decreased, or click �Hit me� and scan for Decreased Value once more. Your choice.

2. Faster(You have to remember decreased value if you want to use this one) - After first scan click �Hit me� in tutorial, go to cheat engine and, chagne Scan Type to Decreased value by� and write here amount of lost HP(if you clicked �Hit me� more times, you have to sum up every decreased amount ) and click Next Scan(example: I clicked Hit me and I lost 5hp, so I write 5). It should find only 1, at least ONLY few values.

Ok now we have value stored in bar, change it to 5000(if you got to this step by yourself, I assume that you can do it). After that, click Next in tutorial window to go to 4th step.

Step 4 � Floating Points (Password: 890124)

Here we have to find value for HP and ammo and change them to 5000 or higher. Do it same as previous, but instead of 4 bytes Value Type look for Float(if you scan for HP) or Double(if you scan for ammo). If you need explanation, here it is:
Change Value Type to Float, Scan Type to Exact Value and look for [amount of HP]. Use exact value with floats and doubles ONLY if value you look for do not have numbers behind dot(91.56). If it has, use some other options like Value Between� and write here� you know what. If somehow you don�t know, here is example(I have 56.81321384321964 HP, so I will write in Value Between� 56 and 57, or 56.8 and 56.9 for more precise scanning). Of course you can use others if you want.
Once you found HP value, double click on it to add it to bottom list(let�s call this list Cheat List). Now do the same but change scan type to Double and look for ammo(you can use Values Between too if you want).
If you will find both addresses, change their values to 5000 or higher, go to tutorial and click Next.

Step 5 � Code Finder (Password: 888899)


Ok scan for value that is in tutorial. If you got this far by yourself, you have to be able to find it. Once you found correct one, add it to Cheat List. Now right click on it and choose �Find out what writes to this address�. Confirmation window will pop up, click YES. Now you can see empty window with some unclickable buttons. Ok go to tutorial and click Change Value. Return to blank window. Some strange line of letters will appear in it. Click on it once and then press Replace(button to the right). Choose any name you want, you won�t need it now and click OK. Click Stop and then Close to return to Cheat Engine main window. Ok I�m explaining what you just did:
You replaced code that was responsible for changing value with nothing, so now Change Value button in tutorial window will NOT work. Want to see? Go ahead to tutorial and click Change value. See? Once you did it, Next button should be available. Click it to proceed to 6th step.

Step 6 � Pointers (Password: 098712)


Pointers are wonderful. They posses great power. They are very useful. Like I said, VERY useful. Pointer is like arrow/line/finger that points specific address�s value. It will point it always, even if value will change its location. Most games now uses values changing addresses, so pointers are really important.
First, scan for value shown on the bottom of tutorial window. If you will find it, find out what writes to it, go to tutorial and change value. Now return to window that appeared after clicking �find out what writes to this address�. There should be some code. Click on it and select �More information� or just double click it. See code with red arrows on its left? If it points to code that�s between [ and ], look what is written under �The value of the pointer needed to find this address is probably� and Remember it. Now go to CE main window, and tick �Hex� box near window where you write value that you want to scan for. If you ticked it, in window next to this box should appear 00000000. Change it with remembered value and click First Scan. It should find one/few addresses. Now, look at left and down. You will see �Add address manually� button. Press it. New window should pop up. In it, tick �Pointer� box. After this, window should get longer. In Address of pointer write address(Address, no value! Address is this one on left, under �Address� label)which you found when you were scanning for hex value. In Offset (hex) write 0(yea, just zero). Click OK. In bottom window you should see new address, like P->xxxxxxxx, and next to it its value. If value is ??, you made something wrong. Here is shorter version for this, if you failed:

1. Find value(this one in tutorial window)
2. Find out what writes to it
3. Change value and double click on just shown code in �Find out what�� window
4. Remember what is written under � The value of the pointer needed to find this address is probably�
5. In Cheat engine tick �Hex� box(it�s under New Scan/First Scan)
6. Write remembered code and scan for it
7. If it found 1 address, remember it. If it found few, correct one is probably this one at the top. NOTE. Remember Address, no value! This is important!
8. Click �Add address manually� button
9. Tick �Pointer� box
10. In Address of pointer write remembered address
11. In Offset(Hex) leave 0
12. Click Ok
13. in bottom window look on new address(it should be P->xxxxxxxx)
14. If its value is ??, repeat step from 1-14

Go to tutorial window and click Change Pointer. Now you have 3 seconds to change our pointer(address with P->xxxxxxxx) to 5000. Don�t worry if you missed. Just once more click Change Pointer and once more try to change it in time. If you will, click Next.


Step 7 - Code Injection: (Password: 013370)

Ok now you are in 7th step, you can�t call yourself n00b anymore(If you got here by yourself). So, code injection, as it says, is when you inject code/piece of code into the process. Like in this tutorial, we have HP and it decrease by 1 every time you click �Hit me�. We have to inject our code to change Hit me button operation. It has to increase(yea, increase, never heard about Hit me increasing health�) HP by 2 every time we will click it. So let�s do it.
Find that value and find out what writes to that address. Then decrease HP(by clicking Hit me). In �find out what�� window some code will appear. It�s responsible for HP decrement by 1. Click it and then press �Show Disassembler�. Big window with 3 sub windows will appear. At the top of upper left window you will see code that decrease HP by 1. Click it to see its comment(Comment is shown between top and bottom window, in this narrow bar).
It should be �Decrement by 1�. Ok that was unnecessary. Now go to tools -> Auto Assemble, or just click Ctrl + A. White window will pop up, in which click Template -> Code Injection. Write here address of health decrement(It should be already filled in with correct code. To ensure, write there address with �Decrement by 1� comment). Some assembler strings will appear. It�s . Whatever it is, I call it template. Now, you see �// Place your code here� under �newmem�(every phrase in assembler started with �//� is comment and they are not entertain when compiling/writing code). According to tutorial, you have to write your code there, but there are 3 options(I have no idea what assembler rules are or whatever, so I have no idea if there is any difference between these options. If someone know and there IS difference, PM me and i will eventally change it).

Important!: Remember, that �Your code� is this one wrote in Memory Viewer after second dash in line where is your address(this address with �Decrement by 1� comment). We call it "your code" but realy it's just code that we want to cheat/change/inject into it code.

By the way: I gathered some info about few assembler instructions by myself, for now I haven�t asked anyone if it�s true, but I will write it here:
- �inc� instruction increases address�s value by 1(I can�t set it to increase more, I don�t even know if it�s possible)
- �dec� instruction decreases address�s value by 1(See: what is above in brackets)
- �add� instruction adds to address�s value, value that is after the code, after coma.

Ok back to tutorial. 3 options: (Remember that [aaa+xxxxxxxx] is our code, I hope you know what our code is, if you do not, once more read starting with �Important!�)

1. Like it�s in tutorial, write your code(with �[aaa+xxxxxxxx]� format) in place of �// Place your code here� comment, and at the beginning of this code place �add�(with space between �add� and code). Now, after this code, write �,3�(�coma three�, no spaces. In total it should look like this: �add [aaa+xxxxxxxx],3 ). Do you know why 3(we want to increase value by 2, not 3!)? Because few lines under newmem there is orginalcode, which decrease this value by 1. Our code increase by 3, so in total(decrease by 1 and increase by 3) these codes increase value by 2.

2. If you don't want that orginalcode to decrease our value(so we could write 2 after code under newmem, not 3), delete "orginalcode:" and "label(orgianlcode)"(this label is in third line from top). Now, change value after your code(under newmem) from 3 to 2, because there is no orginalcode now, which was decreasing our value by 1. I hope you understand.

2. I made some mistake in third option, i will edit it in minute...

Now if you done one of written options, click �Write Code� button at the bottom of Auto Assemble window. If it shows some error, unfortunately you have to repeat. If it shows confirmation window, click OK. Now every time you will click Hit me in tutorial window, your HP should increase by 2. If they does, that�s mean that you made everything correct and Next button will be clickable. Click it to go to last step in Cheat Engine 5.3.

If they doesn't... well... reapeating it would be boring and useless, so i created 3 ready codes for every option:

1. Version according to tutorial:

Code:
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

00455D7F:
jmp newmem
nop
returnhere:

newmem:
add [ebx+0000030c],3

originalcode:
dec [ebx+0000030c]

exit:
jmp returnhere



2. Version without orginalcode:

Code:
alloc(newmem,2048)
label(returnhere)
label(exit)

00455D7F:
jmp newmem
nop
returnhere:

newmem:
add [ebx+0000030c],2


exit:
jmp returnhere



3. Version with no use of newmem, just changing orginal code:

Code:
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

00455D7F:
jmp newmem
nop
returnhere:

newmem:


originalcode:
add [ebx+0000030c],2

exit:
jmp returnhere

tags : Cheat   engine  
posted by Shevchengoal : 2008-02-19 13:36:06
username :
password :
 

ชื่อ
รายละเอียด
  • hi ! : Guest ?


  • เจ้าของ blog : Shevchengoal
  • วันที่สร้าง : 2008-02-18
  • จำนวนผู้ชม : 1321
  • จำนวนผู้โหวต : 1