|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Osedax Newbie cheater Reputation: 0
Joined: 19 Jul 2016 Posts: 14
|
Posted: Sat Jun 30, 2018 9:20 pm Post subject: Unknown Hex Values for Current Clip Ammo? |
|
|
I'm using CE on a game and for Clip Ammo it's displaying the values oddly. Not sure how the game is converting the values to the correct in-game values :/
For my Sniper I have 12 shots per clip, these are the values CE is displaying:
AMMO:DECIMAL- HEX
12:21894 - 5586
11:21889 - 5581
10:21888 - 5580
9:21891 - 5583
8:21890 - 5582
7:21901 - 558D
6:21900 - 558C
5:21903 - 558F
4:21902 - 558E
3:21897 - 5589
2:21896 - 5588
1:21899 - 558B
0:21898 - 558A
Anyone know how these values can equal what they do in-game?
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4300
|
Posted: Sat Jun 30, 2018 9:57 pm Post subject: |
|
|
Looks like a standard xor cipher. Key = 0x558A.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
Osedax Newbie cheater Reputation: 0
Joined: 19 Jul 2016 Posts: 14
|
Posted: Sat Jun 30, 2018 10:04 pm Post subject: |
|
|
ParkourPenguin wrote: | Looks like a standard xor cipher. Key = 0x558A. |
Do you know how I'd decrypt it? I found the XOR info in CE:
imgur*com/gZ9vFfI
|
|
Back to top |
|
|
ParkourPenguin I post too much Reputation: 140
Joined: 06 Jul 2014 Posts: 4300
|
Posted: Sat Jun 30, 2018 11:10 pm Post subject: |
|
|
xor the encrypted/decrypted value to get the other.
Code: | 12 ~ 0x558A = 21894
21894 ~ 0x558A = 12 |
Here's a custom type that should work:
Code: | alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(UsesFloat,1)
alloc(CallMethod,1)
TypeName:
db 'word xor cipher 558a',0
ByteSize:
dd 2
UsesFloat:
db 0
CallMethod:
db 1
// cdecl int ConvertRoutine(unsigned char *input, PTR_UINT address);
ConvertRoutine:
[64-bit]
movzx eax,word ptr[rcx]
[/64-bit]
[32-bit]
mov eax,[esp+4]
movzx eax,word ptr[eax]
[/32-bit]
xor ax,558a
ret
// cdecl void ConvertBackRoutine(int i, PTR_UINT address, unsigned char *output);
ConvertBackRoutine:
[64-bit]
xor cx,558a
mov [r8],cx
[/64-bit]
[32-bit]
movzx eax,word ptr[esp+4]
mov edx,[esp+C]
xor ax,558a
mov word ptr[edx],ax
[/32-bit]
ret
|
Right click the "Value type" drop down list, select "Define new custom type (Auto Assembler)", delete everything, and copy/paste the above code into there.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
Back to top |
|
|
Osedax Newbie cheater Reputation: 0
Joined: 19 Jul 2016 Posts: 14
|
Posted: Sat Jun 30, 2018 11:30 pm Post subject: |
|
|
ParkourPenguin wrote: | xor the encrypted/decrypted value to get the other.
Code: | 12 ~ 0x558A = 21894
21894 ~ 0x558A = 12 |
Here's a custom type that should work:
Code: | alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(UsesFloat,1)
alloc(CallMethod,1)
TypeName:
db 'word xor cipher 558a',0
ByteSize:
dd 2
UsesFloat:
db 0
CallMethod:
db 1
// cdecl int ConvertRoutine(unsigned char *input, PTR_UINT address);
ConvertRoutine:
[64-bit]
movzx eax,word ptr[rcx]
[/64-bit]
[32-bit]
mov eax,[esp+4]
movzx eax,word ptr[eax]
[/32-bit]
xor ax,558a
ret
// cdecl void ConvertBackRoutine(int i, PTR_UINT address, unsigned char *output);
ConvertBackRoutine:
[64-bit]
xor cx,558a
mov [r8],cx
[/64-bit]
[32-bit]
movzx eax,word ptr[esp+4]
mov edx,[esp+C]
xor ax,558a
mov word ptr[edx],ax
[/32-bit]
ret
|
Right click the "Value type" drop down list, select "Define new custom type (Auto Assembler)", delete everything, and copy/paste the above code into there. |
Thanks that worked perfectly
|
|
Back to top |
|
|
|
|
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
|
|