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 


How to deal with a result not stored in a pointer?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Taibreah
Cheater
Reputation: 0

Joined: 19 Mar 2014
Posts: 35

PostPosted: Wed Feb 03, 2016 5:08 pm    Post subject: How to deal with a result not stored in a pointer? Reply with quote

For instance, I have found this as the indicator for breath (mov ecx,00000017), because when I go underwater it changes from 165 and decreased the more I stay under water. Then when I go up for air the bar returns to 165. Full breath again. I freeze this address in, thinking this has to be the address, but still lose breath. I don't think it's the breath meter's visual bar, because I tested it by increasing the number from 165 to 999, but the breath meter wasn't distorted like it usually would if I had gotten the wrong address.

This is what I get as the result, but it doesn't store a pointer. How do I deal with this? I haven't altered anything below. Thanks.

Code:

[ENABLE]
aobscanmodule(breath,trine1_32bit.exe,B9 17 00 00 00 F3)
alloc(newmem,$1000)

label(code)
label(return)

newmem:

code:
  mov ecx,00000017
  jmp return

breath:
  jmp code
return:
registersymbol(breath)

[DISABLE]
breath:
  db B9 17 00 00 00

unregistersymbol(breath)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: "trine1_32bit.exe"+B17F88

"trine1_32bit.exe"+B17F6D: 83 C4 04           -  add esp,04
"trine1_32bit.exe"+B17F70: 0B CF              -  or ecx,edi
"trine1_32bit.exe"+B17F72: 89 03              -  mov [ebx],eax
"trine1_32bit.exe"+B17F74: 89 4B 04           -  mov [ebx+04],ecx
"trine1_32bit.exe"+B17F77: 8B 55 FC           -  mov edx,[ebp-04]
"trine1_32bit.exe"+B17F7A: 0F B7 C6           -  movzx eax,si
"trine1_32bit.exe"+B17F7D: 8B 75 08           -  mov esi,[ebp+08]
"trine1_32bit.exe"+B17F80: 0F B7 FA           -  movzx edi,dx
"trine1_32bit.exe"+B17F83: 6B FF 5C           -  imul edi,edi,5C
"trine1_32bit.exe"+B17F86: 03 3B              -  add edi,[ebx]
// ---------- INJECTING HERE ----------
"trine1_32bit.exe"+B17F88: B9 17 00 00 00     -  mov ecx,00000017
// ---------- DONE INJECTING  ----------
"trine1_32bit.exe"+B17F8D: F3 A5              - repe  movsd
"trine1_32bit.exe"+B17F8F: 0F B7 C8           -  movzx ecx,ax
"trine1_32bit.exe"+B17F92: 8D 42 01           -  lea eax,[edx+01]
"trine1_32bit.exe"+B17F95: 0F B7 C0           -  movzx eax,ax
"trine1_32bit.exe"+B17F98: C1 E1 10           -  shl ecx,10
"trine1_32bit.exe"+B17F9B: 5F                 -  pop edi
"trine1_32bit.exe"+B17F9C: 0B C8              -  or ecx,eax
"trine1_32bit.exe"+B17F9E: 5E                 -  pop esi
"trine1_32bit.exe"+B17F9F: 89 4B 04           -  mov [ebx+04],ecx
"trine1_32bit.exe"+B17FA2: 5B                 -  pop ebx
}
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Feb 03, 2016 5:36 pm    Post subject: Reply with quote

If freezing or changing the value you found has no effect in game, then finding the instruction accessing that address is useless.
Keep searching for some other value. Sounds like it should be a float, not 4-byte.
Back to top
View user's profile Send private message
Taibreah
Cheater
Reputation: 0

Joined: 19 Mar 2014
Posts: 35

PostPosted: Wed Feb 03, 2016 9:52 pm    Post subject: Reply with quote

Well, I've been searching for hours to get the right result, but I'm not having any luck. I did unknown initial value, decreased value, increased value, changed value, and unchanged value and it's just not getting the right result, even when I think I got it, it turns out not to be the right one.

I searched by choosing "All" since I didn't know if it was 4-bytes, Float or something else. It's got to be one of those, but, I feel like I've tried so many times and just not getting anything right.
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Thu Feb 04, 2016 3:15 am    Post subject: Reply with quote

What game are you searching in? That may lighten things up for us.
Back to top
View user's profile Send private message
Daijobu
Master Cheater
Reputation: 13

Joined: 05 Feb 2013
Posts: 301
Location: the Netherlands

PostPosted: Thu Feb 04, 2016 5:06 am    Post subject: Reply with quote

The game is Trine looking at the top and bottom of the script: "trine1_32bit.exe".
_________________
Scripts/tables from scratch. Relation to other scripts is coincidental. Use of posted code is credited properly.
Euro Truck Simulator 2 Backwards Compatible Cheat
American Truck Simulator Backwards Compatible Cheat
Back to top
View user's profile Send private message
Taibreah
Cheater
Reputation: 0

Joined: 19 Mar 2014
Posts: 35

PostPosted: Thu Feb 04, 2016 12:04 pm    Post subject: Reply with quote

Yes, it's for Trine Enchanted Edition.
Back to top
View user's profile Send private message
hhhuut
Grandmaster Cheater
Reputation: 6

Joined: 08 Feb 2015
Posts: 607

PostPosted: Fri Feb 05, 2016 2:37 am    Post subject: Reply with quote

Hm, I think I should have seen that Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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