View previous topic :: View next topic |
Author |
Message |
DrStalker How do I cheat?
Reputation: 0
Joined: 10 Jan 2015 Posts: 4
|
Posted: Sat Jan 10, 2015 9:50 pm Post subject: Same command, different bytecode get generated |
|
|
I've traced down a problem in a script to the DISABLE section generating different bytecode for the same commands. Specifically:
Code: | == Original Code==
crawl.exe+4B21B5- A3 10470F01 - mov [crawl.pcre_malloc+25504C],eax
== After Enabling ==
_takedamage - E9 46DEF502 - jmp 03810000
= After Disabling ==
crawl.exe+4B21B5 - 89 05 10470F01 - mov [crawl.pcre_malloc+25504C],eax
|
This causes two problems; the replacement code is one byte longer so partially overwrites the next code, and the AOB scan can not re-enable the cheat because the code is now different.
The relevant disable code is
Code: |
_takedamage:
mov [crawl.pcre_malloc+25504C],eax
unregistersymbol(_takedamage) |
So my questions are
Why is different bytecode bing generated; is A3 some legacy MOV command that inplies eax?
Is there a way to have the disable section just apply the original bytes instead of compiling instructions, so I can just feed it "A3 10470F01" instead of "mov [crawl.pcre_malloc+25504C],eax"?
|
|
Back to top |
|
 |
Geri Moderator
Reputation: 111
Joined: 05 Feb 2010 Posts: 5636
|
Posted: Sat Jan 10, 2015 10:06 pm Post subject: |
|
|
Delete the code and use the commented (alt) DB version. It's added to the template by default.
_________________
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 467
Joined: 09 May 2003 Posts: 25704 Location: The netherlands
|
Posted: Sun Jan 11, 2015 4:27 am Post subject: |
|
|
db a3 10 47 0f 01
what ce version do you use?
_________________
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 |
|
 |
DrStalker How do I cheat?
Reputation: 0
Joined: 10 Jan 2015 Posts: 4
|
Posted: Sun Jan 11, 2015 5:04 am Post subject: |
|
|
Dark Byte wrote: | db a3 10 47 0f 01
what ce version do you use? |
6.4 64Bit.
Geri wrote: | Delete the code and use the commented (alt) DB version. It's added to the template by default. |
Perfect; exact syntax needed was
Code: | [DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
_takedamage:
//mov [crawl.pcre_malloc+25504C],eax
db A3 10 47 0F 01
unregistersymbol(_takedamage) |
I'd previously tried and left the "alt:" in, but db is actually the assembler command to declare a static byte so it all makes sense now.
|
|
Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 221
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
|
Back to top |
|
 |
|