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 


Auto assembler doesn't recognize the SET instruction

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
gir489
Grandmaster Cheater
Reputation: 14

Joined: 03 Jan 2012
Posts: 835
Location: Maryland, United States

PostPosted: Thu Nov 20, 2014 11:16 pm    Post subject: Auto assembler doesn't recognize the SET instruction Reply with quote

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.


SheatEngine.png
 Description:
 Filesize:  69.16 KB
 Viewed:  5456 Time(s)

SheatEngine.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25284
Location: The netherlands

PostPosted: Fri Nov 21, 2014 12:14 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sat Nov 22, 2014 8:43 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 458

Joined: 09 May 2003
Posts: 25284
Location: The netherlands

PostPosted: Sat Nov 22, 2014 9:28 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
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