Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Farm Frenzy 4 money

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
pharaon
Advanced Cheater
Reputation: 1

Joined: 29 Jun 2012
Posts: 81

PostPosted: Fri Nov 13, 2015 2:37 pm    Post subject: Farm Frenzy 4 money Reply with quote

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
View user's profile Send private message
Betcha
Expert Cheater
Reputation: 4

Joined: 13 Aug 2015
Posts: 232
Location: Somewhere In Space

PostPosted: Fri Nov 13, 2015 2:47 pm    Post subject: Re: Farm Frenzy 4 money Reply with quote

Do an injection of AOB, Or simple code injection and post that code here..
Back to top
View user's profile Send private message
pharaon
Advanced Cheater
Reputation: 1

Joined: 29 Jun 2012
Posts: 81

PostPosted: Fri Nov 13, 2015 5:29 pm    Post subject: Reply with quote

{ 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
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4699

PostPosted: Fri Nov 13, 2015 10:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
pharaon
Advanced Cheater
Reputation: 1

Joined: 29 Jun 2012
Posts: 81

PostPosted: Sat Nov 14, 2015 3:36 am    Post subject: Reply with quote

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
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4699

PostPosted: Sat Nov 14, 2015 3:30 pm    Post subject: Reply with quote

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:
  1. mov eax,[esi+0000069C] - moves money into eax
  2. lea ecx,[eax+edi] - adds edi to your money and stores that in ecx
  3. cmp eax,ecx - some stuff with eax and ecx (not important)
  4. cmovbe eax,ecx - some stuff with eax and ecx (not important)
  5. 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:
  1. cmp edi,0 - Compares edi to 0 and sets flags
  2. jg originalcode - If edi is greater than 0, skip setting edi to 0
  3. xor edi,edi - sets edi to 0
  4. originalcode: - label for start of original code
  5. ...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
View user's profile Send private message
pharaon
Advanced Cheater
Reputation: 1

Joined: 29 Jun 2012
Posts: 81

PostPosted: Sat Nov 14, 2015 4:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4699

PostPosted: Sat Nov 14, 2015 4:31 pm    Post subject: Reply with quote

Besides trial and error, this is a YouTube playlist I used to learn the basics:
https://www.youtube.com/playlist?list=PL038BE01D3BAEFDB0

They've also done intermediate x86, advanced x86, and basic x86-64 stuff, but not all of them have videos. You can see everything here:
http://opensecuritytraining.info/Training.html

Beyond that, Google is probably your best resource.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites