View previous topic :: View next topic |
Author |
Message |
gir489 Grandmaster Cheater Reputation: 14
Joined: 03 Jan 2012 Posts: 835 Location: Maryland, United States
|
Posted: Thu Nov 20, 2014 11:16 pm Post subject: Auto assembler doesn't recognize the SET instruction |
|
|
I am working on Far Cry 4 at the moment and I ran in to a weird operation I've never used before. The dissassembler recongizes it as a legit command and knows what it means, but if I try to change it, it gives me an error.
Description: |
|
Filesize: |
69.16 KB |
Viewed: |
5458 Time(s) |
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Fri Nov 21, 2014 12:14 am Post subject: |
|
|
it's an disassembler error. it forgets to specify it's a byte specific instruction
these will work:
Code: |
setae byte [rbp+000002D0]
setbe byte [rbp+000002D0]
|
_________________
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 |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Sat Nov 22, 2014 8:43 am Post subject: |
|
|
You can use
Code: | registerGlobalDisassembleOverride(function(sender: Disassembler, address: integer, LastDisassembleData: Table): opcode, description) |
Code: |
function myDisassembleOverride(sender, address, ldd)
if (somechecks) then
...
...
return ldd.opcode, ldd.description
end
return nil,nil
end
registerGlobalDisassembleOverride(myDisassembleOverride) |
then add to lua file in autorun folder, or append it in main.lua file
EDIT:
here, it should fix all "Set Byte on Condition"
(maybe DB can optimize it better)
Code: | myDis=createDisassembler()
skipMyDisassembleOverride = false
function myDisassembleOverride(sender, address, ldd)
if skipMyDisassembleOverride or sender==nil then return nil,nil end
local bytes=readBytes(address,2,true)
if bytes~=nil and (bytes[1]==0xF) and (bytes[2]>=0x90 and bytes[2]<=0x9F) then
skipMyDisassembleOverride=true
myDis.syntaxhighlighting=sender.syntaxhighlighting
myDis.disassemble(address)
local lldd=myDis.getLastDisassembleData()
for k,v in pairs(lldd) do ldd[k]=v end
skipMyDisassembleOverride=false
ldd.parameters='byte ptr '..ldd.parameters
return ldd.opcode , ldd.description
end
return nil,nil
end
registerGlobalDisassembleOverride(myDisassembleOverride) |
@DB
Is there easier method to populate LastDisassembleData record in OnDisassembleOverride function?
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25288 Location: The netherlands
|
Posted: Sat Nov 22, 2014 9:28 am Post subject: |
|
|
there is no easier method. I guess you could write a function but a lot of the fields would still have to be passed in with the function, so not sure if that'd be an improvement
_________________
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 |
|
|
|