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 


Need help with Encrypted Values

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
DeletedUser412833
How do I cheat?
Reputation: 1

Joined: 09 Feb 2017
Posts: 0

PostPosted: Mon Dec 07, 2015 2:21 am    Post subject: Need help with Encrypted Values Reply with quote

Hello. I'm having troubles with finding encrypted values for Empyrion - Galactic Survival. I really didn't understand why they introduced encryption for PVE game, but here we are now.

Here's encryption example (gif):

http://i.imgur.com/tSTcRtB.gifv

Most encrypted values (that was 4 byte before encryption patch) have the same pattern: * * 59 0E (as you can see on gif above) where 59 0E never changes.
I've been told that encryption stuff are stored somewhere in XOR, but I'm not experienced enough to figure it on my own. So I'm asking for help here. Here is cetrace from the opcode that reads "Current ammo" address ( http://i.imgur.com/05KJyro.png )

https://gist.githubusercontent.com/AlexWTF/7a9c5d948fa51cdbbb01/raw/c3d90f400ca95284bf79bc448da4cb9df0638afc/Empyrion_10000.cetrace

Empyrion is a Unity based game, but we can't do much using Mono Features:

http://imgur.com/AcRCDb6

(For some reason Health named as "lastWindow", "Sessionmap" is Stamina and so with everything)
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Mon Dec 07, 2015 8:20 am    Post subject: This post has 1 review(s) Reply with quote

Here's your custom type based on your gif. (Next time please provide the correspondences in text form).
Incase the key would change, know that 0 XOR TheKey=TheKey, so get 0 of something, and see the corresponding value in CE as 4 byte hex, that's your key.


Code:
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
define(XOR_KEY,0e59d3a5)

TypeName:
db 'XOR Algoritm',0

ByteSize:
dd 4  //4 byte real value and 4 byte encryption key right after it

//stdcall int ConvertRoutine(unsigned char *input);
ConvertRoutine:
[64-bit]
//rcx=address of input
mov eax,dword [rcx] //eax now contains the bytes 'input' pointed to
xor eax,XOR_KEY
ret
[/64-bit]

[32-bit]
mov eax,dword [esp+4]
mov eax,dword [eax]
xor eax,XOR_KEY
ret 4
[/32-bit]

//stdcall void ConvertBackRoutine(int i, unsigned char *output);
ConvertBackRoutine:
[64-bit]
//ecx=input
//rdx=address of output

xor ecx,XOR_KEY
mov [rdx],ecx
ret
[/64-bit]

[32-bit]
//[ebp+8]=input
//[ebp+c]=address of output
push eax
push edi
mov eax,dword [esp+C]
mov edi,dword [esp+10]
xor eax,XOR_KEY
mov dword [edi],eax
pop edi
pop eax
ret 8
[/32-bit]

_________________
DO NOT PM me if you want help on making/fixing/using a hack.
Back to top
View user's profile Send private message
DeletedUser412833
How do I cheat?
Reputation: 1

Joined: 09 Feb 2017
Posts: 0

PostPosted: Mon Dec 07, 2015 11:54 am    Post subject: Reply with quote

Thank you. Can you please post more details how to use your script in order to find stuff like XP, Health (float), Stamina (float), item count etc?

Should I remove [32-bit] and [64-bit], because I can't enable the script with it?
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Mon Dec 07, 2015 12:01 pm    Post subject: Reply with quote

Ah I see you're not familiar with custom types. On CE's main window, right click on the value type drop down list (were you select float, 4 bytes, double, etc...)->"define new custom type (auto assembler)"->paste my script. Validate and use the new XOR Algoritm type for your scans instead of the usual 4 bytes.
_________________
DO NOT PM me if you want help on making/fixing/using a hack.
Back to top
View user's profile Send private message
DeletedUser412833
How do I cheat?
Reputation: 1

Joined: 09 Feb 2017
Posts: 0

PostPosted: Mon Dec 07, 2015 3:44 pm    Post subject: Reply with quote

Thank you again. I managed to find some of 4byte values. But I have some more questions

1) How I can find float values? Searching for 1140457472 (500(float) is the starting amount of my HP) is not giving me any results (I use XOR Algorithm value type).
2) How do I write a script that can write certain 4byte number into encrypted value?

For example I found "Current XP address" and I want to create a script that write 250000 (4byte) to this address. But I'm not sure how to start. Or better is there any way to create a script that automatically register XOR Algorithm symbol and I can write here any amount of XP that I want.
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Mon Dec 07, 2015 4:33 pm    Post subject: Reply with quote

Phokz wrote:
1) How I can find float values? Searching for 1140457472 (500(float) is the starting amount of my HP) is not giving me any results (I use XOR Algorithm value type).
You'll need a new custom type for that. Simply make a copy of XOR Algorithm, give it a new name, and add:
Code:
alloc(UsesFloat,1)
UsesFloat:
db 1
at the beginning.

As for not finding 500(float) with 1140457472, I'll assume that you actually have 499.9999695 (1140457471) or 500.0000305 (1140457473) or something like that. If not using the custom float type, you'd better scan for a value between 1140424704 (499.0) and 1140490240 (501.0)

Phokz wrote:
2) How do I write a script that can write certain 4byte number into encrypted value?
Normally the custom type I provided can already write values back, simply change the value in CE and the same value should appear ingame. If not there is a bug in my script, please specify what value you wanted, what you got ingame, and if you're using the 32 or 64 bit version of CE.

Phokz wrote:
Or better is there any way to create a script that automatically register XOR Algorithm symbol and I can write here any amount of XP that I want.
Normally custom types manually added via right click->define new custom type are still present when you restart CE, but if you want your cheat table to register the custom type (ex: for a trainer), you can add this to the table's lua script:
Code:
Local MyCustomType=[[
Insert the whole custom type script there.
]]
registerCustomTypeAutoAssembler(MyCustomType)
Didn't check but it should be something like that.
Custom types added via lua script are deleted when closing CE.

_________________
DO NOT PM me if you want help on making/fixing/using a hack.
Back to top
View user's profile Send private message
DeletedUser412833
How do I cheat?
Reputation: 1

Joined: 09 Feb 2017
Posts: 0

PostPosted: Thu Dec 10, 2015 8:10 pm    Post subject: Reply with quote

Gniarf

I'm having some some issues with the custom type script:



I added your script as "Lua", but for some unknown reason I cannot edit any "XOR Algoritm" value. But if I change value type back to 4 byte then I can able to edit it without any issues. Could you please check the table I attached and tell me where I have messed up?

Note: I don't have this problem when I'm adding the custom type script directly to the "Value Type":



Last edited by DeletedUser412833 on Fri Dec 11, 2015 8:48 pm; edited 2 times in total
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Fri Dec 11, 2015 2:00 am    Post subject: Reply with quote

I couldn't reproduce the issue on my end, but I get a warning when opening your table that means you're using the beta version of cheat engine, so see if the issue is also present with the release version of CE.
_________________
DO NOT PM me if you want help on making/fixing/using a hack.
Back to top
View user's profile Send private message
DeletedUser412833
How do I cheat?
Reputation: 1

Joined: 09 Feb 2017
Posts: 0

PostPosted: Fri Dec 11, 2015 8:19 pm    Post subject: Reply with quote

Gniarf wrote:
I couldn't reproduce the issue on my end, but I get a warning when opening your table that means you're using the beta version of cheat engine, so see if the issue is also present with the release version of CE.


Thank you. It was issue with the SVN build (19.10.15).
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: Fri Dec 11, 2015 8:29 pm    Post subject: Reply with quote

Phokz wrote:
Thank you. It was issue with the SVN build (19.10.15).

If you play with customTypes (CE6.4 old customTypes), use builds newer than 03.11.2015 (fix1)

If you want to play with new (CE6.5) customTypes, use builds newer than 28.11.2015 (fix2)

_________________
Back to top
View user's profile Send private message MSN Messenger
DeletedUser412833
How do I cheat?
Reputation: 1

Joined: 09 Feb 2017
Posts: 0

PostPosted: Fri Dec 11, 2015 8:46 pm    Post subject: Reply with quote

mgr.inz.Player wrote:

If you play with customTypes (CE6.4 old customTypes), use builds newer than 03.11.2015 (fix1)

If you want to play with new (CE6.5) customTypes, use builds newer than 28.11.2015 (fix2)


Thank you.
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