| View previous topic :: View next topic |
| Author |
Message |
NanoByte Expert Cheater
Reputation: 1
Joined: 13 Sep 2013 Posts: 222
|
Posted: Sun May 04, 2014 6:01 am Post subject: A Quicky |
|
|
is this possible?
if cmp [ebx],1E // compare to 30
jb +6 //if below 30 it should jump to line 18 where it "mov [ebx],1E"
it should only do it if ebx is below 30
| Description: |
|
| Filesize: |
10.42 KB |
| Viewed: |
6045 Time(s) |

|
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sun May 04, 2014 11:16 am Post subject: |
|
|
| Code: | cmp [ebx],2 /////////check if the value at ebx is less than 2
jb originalcode /////////if the value at ebx is less than 2, jump to originalcode...otherwise...continue to sub [ebx],0
sub [ebx],0 /////////subtract 0 from the value at ebx??? what are you trying to accomplish here?
cmp [ebx],1E /////////compare the value at ebx with 30
jb originalcode /////////if the value at ebx is less than 30, jump to originalcode...otherwise...continue to mov [ebx],1E
mov [ebx],1E /////////make the value at ebx become 30, then continue on to originalcode
originalcode:
//code
//code
//code |
With this code, if the value at ebx is ≥ 2 and < 30, then it will be changed to 30.
|
|
| Back to top |
|
 |
NanoByte Expert Cheater
Reputation: 1
Joined: 13 Sep 2013 Posts: 222
|
Posted: Sun May 04, 2014 12:00 pm Post subject: |
|
|
| ++METHOS wrote: | | Code: | cmp [ebx],2 /////////check if the value at ebx is less than 2
jb originalcode /////////if the value at ebx is less than 2, jump to originalcode...otherwise...continue to sub [ebx],0
sub [ebx],0 /////////subtract 0 from the value at ebx??? what are you trying to accomplish here?
cmp [ebx],1E /////////compare the value at ebx with 30
jb originalcode /////////if the value at ebx is less than 30, jump to originalcode...otherwise...continue to mov [ebx],1E
mov [ebx],1E /////////make the value at ebx become 30, then continue on to originalcode
originalcode:
//code
//code
//code |
With this code, if the value at ebx is ≥ 2 and < 30, then it will be changed to 30. |
Thanks man You are the best
This code dec ammo and money and etc, its because if the value is 1 and u shoot and at the same time try to increase it, the game will crash
i wanted to check if its higher then 1 then its able to increase and if lower then 30 then its probly ammo and i wanted to set it to 30 again
This Newbie Thanks You Good Sir
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sun May 04, 2014 12:25 pm Post subject: |
|
|
Actually, I am wrong...sorry, it's still early. Based on what you wrote, you should just do this:
| Code: | cmp [ebx],2
jg originalcode
mov [ebx],1E
originalcode:
//code
//code
//code |
With this code, everything will run as normal until the value at ebx becomes 2 or less. If the value at ebx becomes 2 or less, it will be changed to 30.
|
|
| Back to top |
|
 |
NanoByte Expert Cheater
Reputation: 1
Joined: 13 Sep 2013 Posts: 222
|
Posted: Sun May 04, 2014 12:35 pm Post subject: :D |
|
|
| ++METHOS wrote: | Actually, I am wrong...sorry, it's still early. Based on what you wrote, you should just do this:
| Code: | cmp [ebx],2
jg originalcode
mov [ebx],1E
originalcode:
//code
//code
//code |
With this code, everything will run as normal until the value at ebx becomes 2 or less. If the value at ebx becomes 2 or less, it will be changed to 30. |
Yeah heheh i see my mistak also sub [ebx],0 and then original code sub [ebx],1 ammo still decrease. im so stupid ahahhah
Thanks man
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sun May 04, 2014 1:13 pm Post subject: |
|
|
You realized your mistakes, so that is not stupid at all. Learning assembly is as easy as memorizing anything else, but understanding it takes time.
Regarding the sub routine...there are several ways to skin a cat, as the saying goes, and it can be fun being creative. Take, for example, your script...you could just do this:
| Code: |
newmem:
originalcode:
add [ebx],eax
mov ebx,[ebx]
mov ecx,[esp+14] |
|
|
| Back to top |
|
 |
NanoByte Expert Cheater
Reputation: 1
Joined: 13 Sep 2013 Posts: 222
|
Posted: Sun May 04, 2014 2:30 pm Post subject: |
|
|
Yeah i tried nop it crashes the game but you last script works
cmp [ebx],2
jg originalcode
mov [ebx],1E
originalcode:
//code
//code
//code
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Sun May 04, 2014 2:58 pm Post subject: |
|
|
Actually, if you look close, I did not NOP the instruction.
Either way, it probably crashes because the instruction that you are using for your injection point is accessing other addresses (in addition to your ammo and money addresses). You can dissect data structures to separate these two addresses from the rest and do even more with your script...or, use different instructions that are exclusive to your money/ammo addresses.
That being said, without changing anything, the script may work for now, but it might cause problems later.
|
|
| Back to top |
|
 |
NanoByte Expert Cheater
Reputation: 1
Joined: 13 Sep 2013 Posts: 222
|
Posted: Mon May 05, 2014 8:01 am Post subject: Fruit for thoughts |
|
|
Yeah i see what you mean the game uses q and e to turn the camera and because of scipts camera can be rotated ahhahaha and also if i spam it e or q it make the game crash
I would love to learn to do
| Quote: | | dissect data structures to separate these two addresses from the rest and do even more with your script...or, use different instructions that are exclusive to your money/ammo addresses. |
if you know a good tutorial, Link it to me
or just tell my what i should search for to find some tutorials
|
|
| Back to top |
|
 |
lamafao Expert Cheater
Reputation: 1
Joined: 17 Apr 2013 Posts: 130
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Mon May 05, 2014 12:18 pm Post subject: Re: Fruit for thoughts |
|
|
| NanoByte wrote: | if you know a good tutorial, Link it to me
or just tell my what i should search for to find some tutorials  | -Yes, follow Geri's guide above...you can use the CE tutorial that comes with Cheat Engine.
|
|
| Back to top |
|
 |
NanoByte Expert Cheater
Reputation: 1
Joined: 13 Sep 2013 Posts: 222
|
|
| Back to top |
|
 |
lamafao Expert Cheater
Reputation: 1
Joined: 17 Apr 2013 Posts: 130
|
Posted: Mon May 05, 2014 3:47 pm Post subject: |
|
|
When you find something about your player like ammo/coordinates/health or anything like that, you can dissect data/structures and see if there is anything around it. Usually you can find max health and armor + other random crap near your health, or different ammo/weapons/burst fire near your ammo.
In some cases you will find everything close, like hp/armor/ammo/coordinates in the same place.
It's usually the first thing i use after i find an address..
|
|
| Back to top |
|
 |
NanoByte Expert Cheater
Reputation: 1
Joined: 13 Sep 2013 Posts: 222
|
Posted: Mon May 05, 2014 3:57 pm Post subject: |
|
|
Ohh That makes more sense Thx Mate
|
|
| Back to top |
|
 |
++METHOS I post too much
Reputation: 92
Joined: 29 Oct 2010 Posts: 4197
|
Posted: Mon May 05, 2014 4:11 pm Post subject: |
|
|
Actually, in this case, you are not dissecting data structures to find nearby offsets for critical values. Instead, you are using it to compare against other structures (other addresses that the instruction is accessing) to find an 'ID' or value(s) to compare against...allowing you to filter out unwanted addresses.
For example:
Let's assume that your targeted instruction is accessing your money value, your ammo value and many other 'unwanted' values. If the instruction is this:
We know that the offset for your money and ammo inside their respective data structures is at +08. If we right-click on the instruction to see what addresses the instruction is accessing, we will see the money address, the ammo address and many other unwanted addresses. If we add the money address, the ammo address and a couple of unwanted addresses and compare their structures against each other, we might find that at offset +C (or something), there is a unique identifier that is exclusive to each value. For example, this value could be a string that actually says 'pistol_ammo' and 'cash' etc. With this unique 'ID', we can write a script that will only effect our ammo and money and nothing else (or whatever we want) by creating a conditional jump relative to our needs. Sometimes, finding a reliable offset to compare against can take time. Sometimes, we must dig deeper, inside pointer trees and/or compare against multiple values to narrow in on our targeted address.
|
|
| Back to top |
|
 |
|