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 


Help with CMP

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

Joined: 02 Sep 2018
Posts: 44
Location: Rhode Island, USA

PostPosted: Mon Jan 21, 2019 11:48 am    Post subject: Help with CMP Reply with quote

Game: Wreckfest (x64)

When you attempt to enter a race, there is a compare between my vehicle class, and another to check if my vehicle is eligible for the race or not - I have found the compares (265+ Class A, 165-264 Class B, 100-164 Class C, etc), but when I try to modify them so I can race any car class, it either has no effect, or crashes the game - I am still 'learning', so I am assuming I am missing something very simple that anyone else could figure out in seconds Shocked

Code:
Wreckfest_x64.exe+17BE0D - 89 8B 84000000        - mov [rbx+00000084],ecx
Wreckfest_x64.exe+17BE13 - 81 F9 EB000000        - cmp ecx,000000EB { 235 }
Wreckfest_x64.exe+17BE19 - 7D 15                 - jnl Wreckfest_x64.exe+17BE30
Wreckfest_x64.exe+17BE1B - 81 F9 A5000000        - cmp ecx,000000A5 { 165 }
Wreckfest_x64.exe+17BE21 - 7C 04                 - jl Wreckfest_x64.exe+17BE27
Wreckfest_x64.exe+17BE23 - 8B C6                 - mov eax,esi
Wreckfest_x64.exe+17BE25 - EB 09                 - jmp Wreckfest_x64.exe+17BE30
Wreckfest_x64.exe+17BE27 - 83 F9 64              - cmp ecx,64 { 100 }
Wreckfest_x64.exe+17BE2A - 0F9C C0               - setl al
Wreckfest_x64.exe+17BE2D - 83 C0 02              - add eax,02 { 2 }
Wreckfest_x64.exe+17BE30 - 48 8B CF              - mov rcx,rdi
Wreckfest_x64.exe+17BE33 - 89 83 88000000        - mov [rbx+00000088],eax
Wreckfest_x64.exe+17BE39 - E8 E2B30300           - call Wreckfest_x64.exe+1B7220
Wreckfest_x64.exe+17BE3E - 48 8B CF              - mov rcx,rdi

_________________
.: Cheat Engine N00b in Progress :.

I'll earn my avatar someday ...
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Mon Jan 21, 2019 2:57 pm    Post subject: Reply with quote

relentlesstech wrote:
265+ Class A, 165-264 Class B, 100-164 Class C

probably something wrong with your numbers, or possible wrong function.

Class A, greater than or equal to 235:
Code:
Wreckfest_x64.exe+17BE13 - 81 F9 EB000000        - cmp ecx,000000EB { 235 }
Wreckfest_x64.exe+17BE19 - 7D 15                 - jnl Wreckfest_x64.exe+17BE30
; ...
Wreckfest_x64.exe+17BE30 - 48 8B CF              - mov rcx,rdi
Wreckfest_x64.exe+17BE33 - 89 83 88000000        - mov [rbx+00000088],eax
Wreckfest_x64.exe+17BE39 - E8 E2B30300           - call Wreckfest_x64.exe+1B7220


Class B, 165 to 234:
Code:
Wreckfest_x64.exe+17BE1B - 81 F9 A5000000        - cmp ecx,000000A5 { 165 }
Wreckfest_x64.exe+17BE21 - 7C 04                 - jl Wreckfest_x64.exe+17BE27
Wreckfest_x64.exe+17BE23 - 8B C6                 - mov eax,esi
Wreckfest_x64.exe+17BE25 - EB 09                 - jmp Wreckfest_x64.exe+17BE30
; ...
Wreckfest_x64.exe+17BE30 - 48 8B CF              - mov rcx,rdi
Wreckfest_x64.exe+17BE33 - 89 83 88000000        - mov [rbx+00000088],eax
Wreckfest_x64.exe+17BE39 - E8 E2B30300           - call Wreckfest_x64.exe+1B7220


Class C, 100 to 164:
Code:
Wreckfest_x64.exe+17BE27 - 83 F9 64              - cmp ecx,64 { 100 }
Wreckfest_x64.exe+17BE2A - 0F9C C0               - setl al
Wreckfest_x64.exe+17BE2D - 83 C0 02              - add eax,02 { 2 }
Wreckfest_x64.exe+17BE30 - 48 8B CF              - mov rcx,rdi
Wreckfest_x64.exe+17BE33 - 89 83 88000000        - mov [rbx+00000088],eax
Wreckfest_x64.exe+17BE39 - E8 E2B30300           - call Wreckfest_x64.exe+1B7220


note:
beware of setl al and mov rcx,rdi as well as mov [rbx+00000088],eax as they may contain something important.

Class D, 0 to 99 but in this case setl is TRUE.
and if Class D then setl al will modify al to 1 and then it add 2 more by add eax,02, so you must keep an eye on register contents.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
relentlesstech
Cheater
Reputation: 1

Joined: 02 Sep 2018
Posts: 44
Location: Rhode Island, USA

PostPosted: Tue Jan 22, 2019 11:05 am    Post subject: Reply with quote

I have 'kind of' figured it out - Class is held by [rbx+88] - I can change this value in my address list, and will allow me to use any car in any race, but every time I attempt to mov word ptr [rbx+88],02 (Where 2 = C Class), all it does is instantly crash the game :-/
_________________
.: Cheat Engine N00b in Progress :.

I'll earn my avatar someday ...
Back to top
View user's profile Send private message
salumor
Advanced Cheater
Reputation: 0

Joined: 14 Jan 2019
Posts: 87

PostPosted: Tue Jan 22, 2019 7:15 pm    Post subject: Reply with quote

Just wondering as you are obv. playing with a 64bit game. Are you sure there is nothing else in the upper bits when you only use word?
Back to top
View user's profile Send private message
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Wed Jan 23, 2019 7:25 am    Post subject: Reply with quote

salumor wrote:
Just wondering as you are obv. playing with a 64bit game. Are you sure there is nothing else in the upper bits when you only use word?

a misconception here, in long mode:

differences, from protected mode:

- modifying a 32-bit register, clears the upper part of a 64-bit register
- default operand size 32-bit
- default address size 64-bit

all else, same. (not really)

so mov word ptr [rbx+88],02 dont clear the upper 16-bit nor the upper 48-bit of a memory location, and remember modifying eax zero-extends rax in long mode but not ax, or ah-al nor a memory location.

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
relentlesstech
Cheater
Reputation: 1

Joined: 02 Sep 2018
Posts: 44
Location: Rhode Island, USA

PostPosted: Wed Jan 23, 2019 12:07 pm    Post subject: Reply with quote

In the end I found it easier to script something to make the cars appear to be a lower class - I gave up on trying to find how to make the game not even check the car class ...
_________________
.: Cheat Engine N00b in Progress :.

I'll earn my avatar someday ...
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