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 


AutoAssembly opcodes

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

Joined: 08 Nov 2014
Posts: 77
Location: Poland

PostPosted: Thu Dec 08, 2022 1:32 pm    Post subject: AutoAssembly opcodes Reply with quote

I don't know if it is a bug or a feature, but lately I noticed that multiple opcodes produce the same instructions. For example when I ENABLE and DISABLE AA script changing instructions in this address:
eu4.exe+C2AFC1:
// - 44 3B C6 - 1.34.5.6
cmp r8d,esi
// - 7D 4B -
jnl eu4.exe+C2B011

the code in disassembler window now says:
eu4.exe+C2AFC1 - 41 39 F0 - cmp r8d,esi

Opcodes are different, so my ASSERT fails next time I try to ENABLE AutoAssembly script.

PS. Can I get ability to "double-post", because I wanted to add something to previous topic, where I am the last person, who posted there - so I am unable to do so.
Back to top
View user's profile Send private message Send e-mail
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4716

PostPosted: Thu Dec 08, 2022 1:41 pm    Post subject: Reply with quote

It's a consequence of redundant encodings in x86 architectures. CE has to pick one to follow. The assembler that made the game happened to pick another one.

That's why you should follow the "Full injection" template and use `db` to rewrite the original code.

As for double posting, there's an edit button you can use to amend your posts.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
M-Z
Advanced Cheater
Reputation: 1

Joined: 08 Nov 2014
Posts: 77
Location: Poland

PostPosted: Thu Dec 08, 2022 2:13 pm    Post subject: Reply with quote

It will be most annoying, but yes - I will have to use db xx xx xx instead of clean instructions based input...
Back to top
View user's profile Send private message Send e-mail
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1069
Location: 0x90

PostPosted: Thu Dec 08, 2022 2:16 pm    Post subject: Reply with quote

M-Z wrote:
It will be most annoying, but yes - I will have to use db xx xx xx instead of clean instructions based input...


Why not put the intended instructions in a comment as a reminder what the bytes do?

e.g.:
Code:

// nop
db 90
Back to top
View user's profile Send private message
M-Z
Advanced Cheater
Reputation: 1

Joined: 08 Nov 2014
Posts: 77
Location: Poland

PostPosted: Thu Dec 08, 2022 2:28 pm    Post subject: Reply with quote

Yes, I will be switching to it.
Code:
eu4.exe+C2AE4B:
// - 48 8D 0D 7A317801     -      1.34.5.6
// - E8 39104DFF           -
// - 84 C0                 -
// - 0F85 AF030000         -
//lea rcx,[eu4.exe+23ADFCC] { (16777473) }
db 48 8D 0D 7A 31 78 01
call eu4.exe+FBE90
test al,al
jne eu4.exe+C2B20E


Although jumps seem not to be affected, so perhaps making ASSERTs on JMP/JE type of stuff is also a solution...
Back to top
View user's profile Send private message Send e-mail
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