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 


encodeFunction

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

Joined: 29 Oct 2016
Posts: 25

PostPosted: Mon Oct 31, 2016 7:48 am    Post subject: encodeFunction Reply with quote

http://forum.cheatengine.org/viewtopic.php?t=595142

Honestly, in my opinion, if you want to create a "super secret game hack" don't release it to the public, or don't be lazy and use a backend like cheat-engine.

LUA bytecode is pretty easy to decompile. Hell there are multiple opensource decompilers out there, even themida and the like are relatively straight-forward to circumvent if you know what you are doing and are determined. Hell if all else fails just hook WriteProcessMemory and the like hahahah Embarassed

I think the decode/encode functions should rather be called compress/decompress, and add in a LZMA layer before the Base85 Laughing

I'm still trying to work my way around lazarus (its an incredibly messy IDE), but I've been adding compression functions to things like the data dissector and I have had massive space savings when leaving the structures intact. Take a 5MB structure down to ~110kb.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Mon Oct 31, 2016 8:02 am    Post subject: Reply with quote

For data dissector I also made simple RLE compression. Even such simple compression can make a huge difference.


My cheatengine GitHub fork has such modification.

_________________
Back to top
View user's profile Send private message MSN Messenger
RaDeX_Dark
Cheater
Reputation: 1

Joined: 29 Oct 2016
Posts: 25

PostPosted: Mon Oct 31, 2016 8:13 am    Post subject: Reply with quote

mgr.inz.Player wrote:
For data dissector I also made simple RLE compression. Even such simple compression can make a huge difference.


My cheatengine GitHub fork has such modification.


I just tried using bzip2lib (built in pascal library - bzip2lib, check the FPC wiki. I can't post links). 99% compression ratio. Better than LZMA Embarassed

5 181 331 bytes to 79 711 bytes. I'll attempt to do a push later, and try to not stuff up the repo hahaha Cool
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 222

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Mon Oct 31, 2016 10:08 am    Post subject: Reply with quote

Great, but, I prefer human readable compression. For example, this has 256 pointers (64bit) and it is saved like this:
Code:
<Structures>
  <Structure Name="test" AutoFill="0" AutoCreate="1" DefaultHex="0" AutoDestroy="0" DoNotSaveLocal="0" RLECompression="1" AutoCreateStructsize="4096">
    <Elements>
      <Element Offset="0" Vartype="Pointer" Bytesize="8" RLECount="256" PointerSize="8" DisplayMethod="Unsigned Integer" BackgroundColor="80000005"/>
    </Elements>
  </Structure>
</Structures>


381 bytes (RLECompression) versus 31578 bytes (without compression).

But, this is off-topic, could someone move our posts to other new thread, maybe "Cheat Engine" forum section?

_________________
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25836
Location: The netherlands

PostPosted: Wed Nov 02, 2016 4:04 am    Post subject: Reply with quote

of course you can use a lua decompiler to figure it out, but at least this stops the dumb people that only scan for a string in your script and then copy/paste the memory

and you can always wrap encodeFunction/decodeFunction in your own encryption engine if you like

also, try to decompile the script i posted in that topic, it's not something you do in one step

as for compression, if you really care about a MB more or less, turn on compression in the folder you save your cheat tables Wink
but i'll add mgr. inz. player's compression method, assuming it won't break weird situations (e. g 50 times the same offset with the same type should be valid and reconstructable) havn't had a chance to test it yet

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
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