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 


One Troll Army, Need help with hacking this, AA usage.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Mon May 30, 2016 10:16 am    Post subject: One Troll Army, Need help with hacking this, AA usage. Reply with quote

this is a Cash script, Alright so there is the script, no changes just the originalcode:

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
mov [eax],ecx
mov eax,[ebx+30]

exit:
jmp returnhere

0611D79F:
jmp newmem
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
0611D79F:
mov [eax],ecx
mov eax,[ebx+30]
//Alt: db 89 08 8B 43 30


Ok so since I have already tried making Hack for this game, This is cash, so I tried changing this
Code:
mov [eax],ecx
to
Code:
mov [eax],(int)9999999
It does work when I activate it, but when I save the CT and re-open the game and the CT and Attaching the game again, trying to activate the Script will show the Tick mark, but the script itself just won't do anything, it will simply read the originalcode and still decrease my money value.

There is the Script after me changing it:

Code:
[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
//mov [eax],ecx
mov [eax],(int)9999999
mov eax,[ebx+30]

exit:
jmp returnhere

0611D79F:
jmp newmem
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
0611D79F:
mov [eax],ecx
mov eax,[ebx+30]
//Alt: db 89 08 8B 43 30


What could be the issue I'm dealing with, This is a unity game by the way, I discussed this with 3 people already on a different game with a different type of issue but wanted to make a new Thread and getting new info here, please let me know if my script is correct but why is it not working after I re-open the game.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon May 30, 2016 10:21 am    Post subject: Reply with quote

If you can't use reliable, module addressing, then use AOB.
Back to top
View user's profile Send private message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Mon May 30, 2016 10:24 am    Post subject: Reply with quote

Alright so using the AOB this is the new code It generated:

Code:
[ENABLE]

aobscan(Cash,89 08 8B 43 30 40 89 43 30 8D 65 F4 5E 5F 5B C9 C3 6A) // should be unique
alloc(newmem,$100)

label(code)
label(return)

newmem:

code:
  mov [eax],ecx
  mov eax,[ebx+30]
  jmp return

Cash:
  jmp code
return:
registersymbol(Cash)

[DISABLE]

Cash:
  db 89 08 8B 43 30

unregistersymbol(Cash)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: 060EC6AF

""+60EC68A: 8D 4F 01           -  lea ecx,[edi+01]
""+60EC68D: 39 70 0C           -  cmp [eax+0C],esi
""+60EC690: 0F 86 36 00 00 00  -  jbe 060EC6CC
""+60EC696: 8D 44 B0 10        -  lea eax,[eax+esi*4+10]
""+60EC69A: 89 08              -  mov [eax],ecx
""+60EC69C: 8B 43 14           -  mov eax,[ebx+14]
""+60EC69F: 39 78 0C           -  cmp [eax+0C],edi
""+60EC6A2: 0F 86 18 00 00 00  -  jbe 060EC6C0
""+60EC6A8: 8D 44 B8 10        -  lea eax,[eax+edi*4+10]
""+60EC6AC: 8B 4D 10           -  mov ecx,[ebp+10]
// ---------- INJECTING HERE ----------
""+60EC6AF: 89 08              -  mov [eax],ecx
""+60EC6B1: 8B 43 30           -  mov eax,[ebx+30]
// ---------- DONE INJECTING  ----------
""+60EC6B4: 40                 -  inc eax
""+60EC6B5: 89 43 30           -  mov [ebx+30],eax
""+60EC6B8: 8D 65 F4           -  lea esp,[ebp-0C]
""+60EC6BB: 5E                 -  pop esi
""+60EC6BC: 5F                 -  pop edi
""+60EC6BD: 5B                 -  pop ebx
""+60EC6BE: C9                 -  leave
""+60EC6BF: C3                 -  ret
""+60EC6C0: 6A 2A              -  push 2A
""+60EC6C2: 68 78 06 00 00     -  push 00000678
}


Assuming I want to change the ecx to 99999 is possible but the thing is that the script will not work when game is rebooted.

What kind of stuff I should do to fix it, I could find pointer but assuming I want to use only Scripts which is more effective in my opinion.
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Mon May 30, 2016 10:27 am    Post subject: Reply with quote

You should stop your AOB code after the "C3" byte (so don't take the "6A" into the pattern) because between the return and the push 2A there can also be some space (nops or int3s) which means your AOB won't be found after restarting the game.
Back to top
View user's profile Send private message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Mon May 30, 2016 10:31 am    Post subject: Reply with quote

So like that ?

89 08 8B 43 30 40 89 43 30 8D 65 F4 5E 5F 5B C9 C3
Back to top
View user's profile Send private message
Cake-san
Grandmaster Cheater
Reputation: 8

Joined: 18 Dec 2014
Posts: 541
Location: Semenanjung

PostPosted: Mon May 30, 2016 10:38 am    Post subject: Reply with quote

Umm, this game has its own resource capacity eg: storage.
Which means that you have to either inject code at 2 points or maybe there's some register that has value related to maximum resource. Rolling Eyes

You can use my table as reference if you want: http://forum.cheatengine.org/viewtopic.php?t=591799

Sorry, I don't make any code injection script for this game. Laughing

_________________
...


Last edited by Cake-san on Mon May 30, 2016 10:40 am; edited 2 times in total
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Mon May 30, 2016 10:38 am    Post subject: Reply with quote

Yeah, but scan if there's only one single location (your target location) which matches the AOB pattern.
Back to top
View user's profile Send private message
KalasDev
Master Cheater
Reputation: 1

Joined: 29 May 2016
Posts: 311

PostPosted: Mon May 30, 2016 11:07 am    Post subject: Reply with quote

There guys, It works for me even after booting the game again.


OTA.CT
 Description:
Infinite Resources
Infinite HP (Troll&Castle)

Download
 Filename:  OTA.CT
 Filesize:  633.59 KB
 Downloaded:  608 Time(s)

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 Gamehacking 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