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 


Cheat Engine Forum Index
PostGo back to topic
ParkourPenguin
I post too much
Reputation: 143
Joined: 06 Jul 2014
Posts: 4382

PostPosted: Tue Feb 16, 2016 11:27 am    Post subject:

You could use Lua for only doing an AoB scan once:
Code:
[ENABLE]
{$lua}
local function cmpBytes(table1,table2)
  if #table1 ~= #table2 then return false end
  for i,v in pairs(table1) do
    if table2[i] ~= v then
      return false
    end
  end
  return true
end

if myAoBAddy == nil or not cmpBytes({0x12, 0x34, 0xAB, 0xDC, 0x77},readBytes(myAoBAddy,5,true)) then
  local list = AOBScan("12 34 AB DC 77")
  if list ~= nil and list.Count == 1 then
    myAoBAddy = tonumber(list[0])
    list.destroy()
  else
    list.destroy()
    return nil
  end
end
registerSymbol("myAoBAddy",myAoBAddy)
{$asm}
...
[DISABLE]
unregisterSymbol(myAoBAddy)
...

If you want it to stop crashing, then stop constantly writing to it. Hook some instruction that accesses (preferably writes to) that address instead and write your value to it there.

fuzzayboy wrote:
Maybe someone can shed some light as of why this float: 00 00 00 78 actually starts a byte after. Is it because of al? 00 00 78 This really throws me off.
I don't know what you mean by this. I'm pretty sure it's not even executable code, as it doesn't make sense regardless of where you start disassembling it.
While both ASM and data are stored in memory as bytes, they are hardly interchangeable. Try to jump into a block of memory that stores data and see how many instructions it takes for the application to crash.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Post reviews:   Approve 1
Author Review
fuzzayboy
Review: Approve
Post reference:
ReviewPosted: Wed Feb 24, 2016 10:46 pm

Very helpful! Thanks!
Back to top
View user's profile Send private message
Display:  
Cheat Engine Forum Index


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites