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 


File encryption

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

Joined: 11 Jul 2009
Posts: 75

PostPosted: Mon Dec 20, 2010 6:09 am    Post subject: File encryption Reply with quote

As i know, some games have files like *.dat, *.bl, or any custom filetypes which are encrypted( cannot be viewed with notepad ). i found out that when the game starts, it loads those files into memory with ReadFile and this is as far as i got , it is still encrypted at this point

after all of the loaded memory have been decrypted by the client, it shows the normal viewable text and stuff ( item infos etc )

so, i just want to confirm, are there any easier ways than to trace slowly after ReadFile? and does any/all decryption method use rep to decrypt one byte at a time?

any help is appreciated, thanks!
Back to top
View user's profile Send private message
tombana
Master Cheater
Reputation: 2

Joined: 14 Jun 2007
Posts: 456
Location: The Netherlands

PostPosted: Mon Dec 20, 2010 8:17 am    Post subject: Reply with quote

It depends on the data in the file: if its a list of integers for example then its not really 'encrypted' but its not viewable with notepad either.
If you're sure that its actually encrypted then you'll have to trace the data after ReadFile. You could place breakpoint on the buffer for example and then let it run.
Back to top
View user's profile Send private message
zile
Advanced Cheater
Reputation: 0

Joined: 11 Jul 2009
Posts: 75

PostPosted: Mon Dec 20, 2010 8:58 am    Post subject: Reply with quote

I followed readfile of a file called Talk.dat, its a list of everything an npc would say. i managed to get this one decrypted by codecaving and writing to a dump. the sad part is it doesnt use the same decryption function as other files as this decrypts directly and doesnt unload from memory. it also doesnt show the npc's id so its useless ( im trying to make a privateserver emu )

but if its in integers and its encrypted ,would they also first use readfile into the memory? it doesnt break eventhough ive put a bp on the buffer
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Mon Dec 20, 2010 4:15 pm    Post subject: Reply with quote

Depends on the encryption. There are tons of possibilities of how they can be decrypting each file, whether it be inside the file headers (if they have one), a lookup table, per-folder, per-file type, etc. which you wont be able to tell without debugging the decryption method.

You will have to trace from the ReadFile point, as you mentioned, and follow the flow to see what is being used to decrypt the files. You will want to do it for different files as well to compare the routine and variables used per-file to find the pattern of whats being used and so on.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
zile
Advanced Cheater
Reputation: 0

Joined: 11 Jul 2009
Posts: 75

PostPosted: Mon Dec 20, 2010 11:56 pm    Post subject: Reply with quote

alright, thanks for helping
Back to top
View user's profile Send private message
AhMunRa
Grandmaster Cheater Supreme
Reputation: 27

Joined: 06 Aug 2010
Posts: 1117

PostPosted: Wed Dec 22, 2010 4:03 pm    Post subject: Reply with quote

Also some files like this may not actually be encrypted, I've seen instances where obfuscation was used IE a simple zip file. Check the first 3 or 4 bytes of the dat file to see if it matches a known file type.
_________________
<Wiccaan> Bah that was supposed to say 'not saying its dead' lol. Fixing >.>
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 programming 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