| View previous topic :: View next topic |
| Author |
Message |
M-Z Advanced Cheater
Reputation: 1
Joined: 08 Nov 2014 Posts: 77 Location: Poland
|
Posted: Thu Dec 08, 2022 1:32 pm Post subject: AutoAssembly opcodes |
|
|
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 |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4716
|
Posted: Thu Dec 08, 2022 1:41 pm Post subject: |
|
|
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 |
|
 |
M-Z Advanced Cheater
Reputation: 1
Joined: 08 Nov 2014 Posts: 77 Location: Poland
|
Posted: Thu Dec 08, 2022 2:13 pm Post subject: |
|
|
| 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 |
|
 |
LeFiXER Grandmaster Cheater Supreme
Reputation: 20
Joined: 02 Sep 2011 Posts: 1069 Location: 0x90
|
Posted: Thu Dec 08, 2022 2:16 pm Post subject: |
|
|
| 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.:
|
|
| Back to top |
|
 |
M-Z Advanced Cheater
Reputation: 1
Joined: 08 Nov 2014 Posts: 77 Location: Poland
|
Posted: Thu Dec 08, 2022 2:28 pm Post subject: |
|
|
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 |
|
 |
|