|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
STN I post too much Reputation: 42
Joined: 09 Nov 2005 Posts: 2672
|
Posted: Fri Apr 28, 2017 7:45 pm Post subject: Highlight a specific register |
|
|
Thank you Dark Byte
Just bring up lua engine and paste this in, replace rax/eax with register you wish to highlight.
Code: | function f(sender, address, LastDisassembleData, result, description)
LastDisassembleData.opcode=string.upper(LastDisassembleData.opcode)
LastDisassembleData.parameters=string.upper(LastDisassembleData.parameters)
LastDisassembleData.parameters=string.gsub(LastDisassembleData.parameters,'RAX',string.format('{C%.06x}RAX{N}',math.floor(math.random()*0xffffff)))
LastDisassembleData.parameters=string.gsub(LastDisassembleData.parameters,'EAX',string.format('{C%.07x}EAX{N}',math.floor(math.random()*0xffffff)))
return result,description
end
getVisibleDisassembler().OnPostDisassemble=f
|
I am going to start learning lua and make a menu as an exercise, should be fun.
If you don't know what this is, this image explains it. Ollydbg has this feature where you could focus on one register for quicker reading of the code, now it is in CE too except much better
_________________
|
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Sun Aug 06, 2017 6:19 am Post subject: |
|
|
Here's my implementation of this: https://www.dropbox.com/s/g4js2feemqssaim/DisassemblerHighlight.lua?dl=0
It adds a menu option to all memory viewer windows, the highlight is currently global not local to each window.
If you want a static color instead of random ones then inside the .lua file you'll see this line
Code: | --local staticColor = 0xAE33AE |
simply uncomment it and set it to whatever color value you like (packed RGB color in little endian format so BGR, and before anyone complains that's how CE has the values, not how I necessarily chose to do it and I just didn't do anything to make it match previously set expectations of how color should work).
edit: September 1, 2017 - update for memory record paste bug.
Last edited by FreeER on Thu Sep 14, 2017 10:47 am; edited 1 time in total |
|
Back to top |
|
|
FreeER Grandmaster Cheater Supreme Reputation: 53
Joined: 09 Aug 2013 Posts: 1091
|
Posted: Thu Sep 14, 2017 10:47 am Post subject: |
|
|
fixed a bug in my script that didn't use lowercase and changed lua pattern check from characters to alphanumeric. So previously using "1C" to highlight a specific offset/value would cause an error, now it won't. Dropbox so same url, just redownload. |
|
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
|
|