| View previous topic :: View next topic |
| Author |
Message |
dEagle Expert Cheater
Reputation: 0
Joined: 17 Jun 2006 Posts: 225 Location: CheatEngine Forum
|
Posted: Fri Apr 04, 2008 8:55 am Post subject: If Then statement? |
|
|
Like Visual Basic,
I wonder if i could use it here too? If so,
How?
Example,
If 04010000 eax = 100 Then
Mov eax, 99999
..or something samiliar.
Or isit just simply impossible?
Maybe using the C script?
|
|
| Back to top |
|
 |
Psy Grandmaster Cheater Supreme
Reputation: 1
Joined: 27 Mar 2008 Posts: 1366
|
Posted: Fri Apr 04, 2008 11:29 am Post subject: |
|
|
In assembly for CE's script it would be roughly:
4010000:
cmp eax,100
jne <next>
mov eax,99999 (<-- but that would want to be converted to hex)
<next>
You see we can use the compare to see if it equals 100, and if it does if will skip the jump and mov 99999 into eax. If it didn't equal 100, it would execute the jump and therefore miss the moving of 99999 into the eax register.
Find what CE pokes into memory (it'll convert it to bytes for you), then just use the bytes in visual basic as normal
|
|
| Back to top |
|
 |
dEagle Expert Cheater
Reputation: 0
Joined: 17 Jun 2006 Posts: 225 Location: CheatEngine Forum
|
Posted: Fri Apr 04, 2008 11:45 am Post subject: |
|
|
But that's a code injection
in other word's
it'll replace the code at 401000 with the code u injected?
|
|
| Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6300
|
Posted: Fri Apr 04, 2008 12:02 pm Post subject: |
|
|
Yes it is a injection. If you want alter the value of eax thats what it is all about.
If you used the script engine instead it would also be an injection.
But you need to write that to a cave and jump to it.
You cant just write it at the address you found, the target will crash.
Basically replace code @ 4010000: with a jmp to a cave.
Write your code in the cave and jmp back.
|
|
| Back to top |
|
 |
dEagle Expert Cheater
Reputation: 0
Joined: 17 Jun 2006 Posts: 225 Location: CheatEngine Forum
|
Posted: Fri Apr 04, 2008 1:19 pm Post subject: |
|
|
Oh yeah,
i never really got into code caving.
ima read some tutorial's on this forum.
|
|
| Back to top |
|
 |
Labyrnth Moderator
Reputation: 10
Joined: 28 Nov 2006 Posts: 6300
|
Posted: Fri Apr 04, 2008 1:24 pm Post subject: |
|
|
Here is a template of what you need to learn with pretty much.
| Code: |
[ENABLE]
label(yep)
codecaveaddress:
write your code
jmp yep
originaladdress:
jmp codecave
nop
yep:
[DISABLE]
originaladdress:
original code
|
|
|
| Back to top |
|
 |
|