| View previous topic :: View next topic |
| Author |
Message |
RaDeX_Dark Cheater
Reputation: 1
Joined: 29 Oct 2016 Posts: 25
|
Posted: Mon Oct 31, 2016 7:48 am Post subject: encodeFunction |
|
|
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
I think the decode/encode functions should rather be called compress/decompress, and add in a LZMA layer before the Base85
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 |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Oct 31, 2016 8:02 am Post subject: |
|
|
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 |
|
 |
RaDeX_Dark Cheater
Reputation: 1
Joined: 29 Oct 2016 Posts: 25
|
Posted: Mon Oct 31, 2016 8:13 am Post subject: |
|
|
| 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
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
|
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Mon Oct 31, 2016 10:08 am Post subject: |
|
|
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 |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25837 Location: The netherlands
|
Posted: Wed Nov 02, 2016 4:04 am Post subject: |
|
|
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
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 |
|
 |
|