 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
pharaon Advanced Cheater
Reputation: 1
Joined: 29 Jun 2012 Posts: 81
|
Posted: Fri Nov 13, 2015 2:37 pm Post subject: Farm Frenzy 4 money |
|
|
this is the code for money
i want it to increase bu not decrees
hope any one can help me
00407FA6 - 3B C1 - cmp eax,ecx
00407FA8 - 0F46 C1 - cmovbe eax,ecx
00407FAB - 89 8E 9C060000 - mov [esi+0000069C],ecx <<
00407FB1 - 8B CE - mov ecx,esi
00407FB3 - 89 86 B40E0000 - mov [esi+00000EB4],eax
EAX=00002710
EBX=1F6D6008
ECX=000026AC
EDX=FFFFFFFF
ESI=025D4460
EDI=FFFFFF9C
ESP=0019F5F0
EBP=0019F5F0
EIP=00407FB1
i tried
mov esi,0
mov ecx,esi
mov [esi+00000EB4],eax
jmp return
but it crash the game
|
|
Back to top |
|
 |
Betcha Expert Cheater
Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Fri Nov 13, 2015 2:47 pm Post subject: Re: Farm Frenzy 4 money |
|
|
Do an injection of AOB, Or simple code injection and post that code here..
|
|
Back to top |
|
 |
pharaon Advanced Cheater
Reputation: 1
Joined: 29 Jun 2012 Posts: 81
|
Posted: Fri Nov 13, 2015 5:29 pm Post subject: |
|
|
{ Game : wrapper.bin
Version:
Date : 2015-11-13
Author : BS
This script does blah blah blah
}
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
aobscanmodule(INJECT,wrapper.bin,8B CE 89 86 B4 0E 00 00) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
newmem:
code:
mov esi,0
mov ecx,esi
mov [esi+00000EB4],eax
jmp return
INJECT:
jmp code
nop
nop
nop
return:
registersymbol(INJECT)
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
INJECT:
db 8B CE 89 86 B4 0E 00 00
unregistersymbol(INJECT)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: "wrapper.bin"+7FB1
"wrapper.bin"+7F8E: 57 - push edi
"wrapper.bin"+7F8F: E8 13 25 24 00 - call wrapper.bin+24A4A7
"wrapper.bin"+7F94: 59 - pop ecx
"wrapper.bin"+7F95: 39 86 9C 06 00 00 - cmp [esi+0000069C],eax
"wrapper.bin"+7F9B: 72 E9 - jb wrapper.bin+7F86
"wrapper.bin"+7F9D: 8B 86 9C 06 00 00 - mov eax,[esi+0000069C]
"wrapper.bin"+7FA3: 8D 0C 38 - lea ecx,[eax+edi]
"wrapper.bin"+7FA6: 3B C1 - cmp eax,ecx
"wrapper.bin"+7FA8: 0F 46 C1 - cmovbe eax,ecx
"wrapper.bin"+7FAB: 89 8E 9C 06 00 00 - mov [esi+0000069C],ecx
// ---------- INJECTING HERE ----------
"wrapper.bin"+7FB1: 8B CE - mov ecx,esi
"wrapper.bin"+7FB3: 89 86 B4 0E 00 00 - mov [esi+00000EB4],eax
// ---------- DONE INJECTING ----------
"wrapper.bin"+7FB9: E8 7B 0A 00 00 - call wrapper.bin+8A39
"wrapper.bin"+7FBE: 8B 4E 4C - mov ecx,[esi+4C]
"wrapper.bin"+7FC1: FF B6 9C 06 00 00 - push [esi+0000069C]
"wrapper.bin"+7FC7: 8B 01 - mov eax,[ecx]
"wrapper.bin"+7FC9: FF 50 28 - call dword ptr [eax+28]
"wrapper.bin"+7FCC: B0 01 - mov al,01
"wrapper.bin"+7FCE: 5D - pop ebp
"wrapper.bin"+7FCF: C2 08 00 - ret 0008
"wrapper.bin"+7FD2: 89 48 4C - mov [eax+4C],ecx
"wrapper.bin"+7FD5: C3 - ret
}
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4699
|
Posted: Fri Nov 13, 2015 10:07 pm Post subject: |
|
|
I think this will work.
Code: | [ENABLE]
aobscanmodule(INJECT,wrapper.bin,8D 0C 38 3B C1 0F 46 C1)
alloc(newmem,1024)
label(originalcode)
label(return)
registersymbol(INJECT)
newmem:
cmp edi,0
jg originalcode
xor edi,edi
originalcode:
lea ecx,[eax+edi]
cmp eax,ecx
jmp return
INJECT:
jmp newmem
return:
[DISABLE]
INJECT:
db 8D 0C 38 3B C1
unregistersymbol(INJECT)
dealloc(newmem) |
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
pharaon Advanced Cheater
Reputation: 1
Joined: 29 Jun 2012 Posts: 81
|
Posted: Sat Nov 14, 2015 3:36 am Post subject: |
|
|
it work very well
could you please explain to me the code so i can learn
because i did it wrong and didn't know where in the code to modify
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4699
|
Posted: Sat Nov 14, 2015 3:30 pm Post subject: |
|
|
Code: | "wrapper.bin"+7F9D: 8B 86 9C 06 00 00 - mov eax,[esi+0000069C]
"wrapper.bin"+7FA3: 8D 0C 38 - lea ecx,[eax+edi]
"wrapper.bin"+7FA6: 3B C1 - cmp eax,ecx
"wrapper.bin"+7FA8: 0F 46 C1 - cmovbe eax,ecx
"wrapper.bin"+7FAB: 89 8E 9C 06 00 00 - mov [esi+0000069C],ecx |
From what you had in your first post, the instruction mov [esi+0000069C],ecx accessed your address. Since ecx doesn't look like a valid address, I assumed esi+69C was your address.
With that information, we can translate the above assembly like so:
- mov eax,[esi+0000069C] - moves money into eax
- lea ecx,[eax+edi] - adds edi to your money and stores that in ecx
- cmp eax,ecx - some stuff with eax and ecx (not important)
- cmovbe eax,ecx - some stuff with eax and ecx (not important)
- mov [esi+0000069C],ecx - moves ecx back into your money address
The value of edi in your first post (FFFFFF9C) as a signed value would be -100. This seems like a reasonable amount to deduct your health by, considering your health was originally 0x2710, or 10,000 in decimal. So I concluded that edi was the amount by which your health should change.
After you understand the assembly, you can start writing your script. A good injection point would be at "wrapper.bin"+7FA3, mostly since that's where edi is being used (it's also good for the AoB scan signature, but that's more advanced, less important stuff). Then, you want to set edi to 0 if edi is less than 0 so that you can still gain health, but you can't lose any health. Here's what I did:
- cmp edi,0 - Compares edi to 0 and sets flags
- jg originalcode - If edi is greater than 0, skip setting edi to 0
- xor edi,edi - sets edi to 0
- originalcode: - label for start of original code
- ...executes the original code, then jumps back to where it left off
If you have any more questions, feel free to ask.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
 |
pharaon Advanced Cheater
Reputation: 1
Joined: 29 Jun 2012 Posts: 81
|
Posted: Sat Nov 14, 2015 4:16 pm Post subject: |
|
|
im grateful for your replay
i got the concept but since im not aware of the assembly its useless for me to modifies code or understand it
i want if you can guide me to where i can learn assembly
im vb.net programmer so i think it's time to start leaning assembly
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4699
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|