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 


Preventing player.ini file being written with best lap time

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
crutchlow
How do I cheat?
Reputation: 0

Joined: 04 May 2022
Posts: 5

PostPosted: Wed May 04, 2022 11:22 pm    Post subject: Preventing player.ini file being written with best lap time Reply with quote

Hello everyone, I use Cheat Engine to look at live memory values all the time, but I hope this is an acceptable question to ask by posting a screenshot from Ollydbg as it is easier to read.

This is code from a racing game. If your laptime is faster than the lap record, it writes it to an INI file which is then displayed in the Best Laps screen. In the screenshot, I have highlighted a key section of the code which shows how it is written in the INI file - "CarName = %Unix date% %lap time in seconds% ; Best lap time"

If I mess with this line at all, it breaks the code, and lap times are not written, however some other line of code is also wiping the Best Laps section of the INI file entirely. What I would like to do is allow reading of the player.ini file, but prevent writing OR deleting of the existing data.

Can anyone actually see anything in my code that I could NOP out to prevent that from happening?



Capture.JPG
 Description:
 Filesize:  180.15 KB
 Viewed:  1756 Time(s)

Capture.JPG


Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Thu May 05, 2022 1:50 am    Post subject: Reply with quote

Based on how that code seems to function on a quick look, you may just want to jump over/skip that entire loop block since it looks like it's writing the section and entries for each valid entry.

From that dump, looks like you can patch the following line to be a full JMP and skip the entire thing:

Code:
00982456 JLE 0098253C

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
crutchlow
How do I cheat?
Reputation: 0

Joined: 04 May 2022
Posts: 5

PostPosted: Thu May 05, 2022 5:25 am    Post subject: Reply with quote

atom0s wrote:
Based on how that code seems to function on a quick look, you may just want to jump over/skip that entire loop block since it looks like it's writing the section and entries for each valid entry.

From that dump, looks like you can patch the following line to be a full JMP and skip the entire thing:

Code:
00982456 JLE 0098253C


Thank you so much! I will give it a go Smile
Back to top
View user's profile Send private message
crutchlow
How do I cheat?
Reputation: 0

Joined: 04 May 2022
Posts: 5

PostPosted: Mon Jun 13, 2022 9:02 pm    Post subject: Reply with quote

I finally had a chance to do the above. Unfortunately it still wiped the original data.
Back to top
View user's profile Send private message
TsTg
Master Cheater
Reputation: 5

Joined: 12 Dec 2012
Posts: 334
Location: Somewhere....

PostPosted: Mon Jun 13, 2022 9:36 pm    Post subject: Reply with quote

does this routine do both writing and reading of the file ?
if it only writes the data, you can try:
Code:
00982413   RET

this will kill the entire work there, but again, use this only if the code only writes the ini.
another thing to try force jumping this one:
Code:
009824C5     JPE 0098250B   ---> make it into JMP 0098250B

if it still wipe out everything, this would mean it deletes/clears the file itself at somewhere else.
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