AOB signature on a repeating memory pattern

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
Mr. Alien
Cheater
Cheater
Posts: 39
Joined: Mon Jul 08, 2019 8:31 am
Reputation: 0

AOB signature on a repeating memory pattern

Post by Mr. Alien »

I can't find a unique AOB even after adding hundreds of arrays. There are always three results. The whole section is most likely repeated two times more.

And that revelation came after spending two hours wildcarding the changing values... :o

DrummerIX
ViP
ViP
Posts: 3227
Joined: Wed Mar 22, 2017 6:15 pm
Reputation: 3740

Re: AOB signature on a repeating memory pattern

Post by DrummerIX »

Someone else wrote this (I got it from one of Cielos scripts), but it deals with multiple results of the same AOB:

Put this in the LUA code section of your table:

Code: Select all

function lua_aobscan(name,module,bytes,index)
  index = index - 1
  if(module == "") then
    local resultSet = AOBScan(bytes)
      if(resultSet == nil) then
        unregisterSymbol(name)
        print(name.." not found")
      else
        unregisterSymbol(name)
        registerSymbol(name,resultSet[index])
        resultSet.destroy()
      end
  else
    if(getModuleSize(module) == nil) then
      print("Module "..module.." not found")
    else
      local memScanner = createMemScan()
      local memFoundList = createFoundList(memScanner)
      memScanner.firstScan(
        soExactValue,vtByteArray,rtRounded,bytes,nil,
        getAddress(module),(getAddress(module)+getModuleSize(module)),"",
        fsmNotAligned,"",true,false,false,false)
      memScanner.waitTillDone()
      memFoundList.initialize()
        if(memFoundList.Count == 0) then
          unregisterSymbol(name)
          print(name.." in module "..module.." not found")
        else
          unregisterSymbol(name)
          registerSymbol(name,memFoundList.Address[index])
        end
      memScanner.destroy()
      memFoundList.destroy()
    end
  end
end
It is called with something like the following:

luaCall(lua_aobscan("BaseHeroStatsReadAOB","DQH2.exe","0F B7 41 08 66 85 C0 78 11",2))

This gets the second result of the AOB and assigns and registers it to BaseHeroStatsReadAOB in the DQH2.exe module.

Mr. Alien
Cheater
Cheater
Posts: 39
Joined: Mon Jul 08, 2019 8:31 am
Reputation: 0

Re: AOB signature on a repeating memory pattern

Post by Mr. Alien »

Unfortunately, the order of the proper value I want to change keeps changing as well. It's not always the second or the third.

MartaLabieniec
Expert Cheater
Expert Cheater
Posts: 312
Joined: Sat Oct 06, 2018 3:19 pm
Reputation: 137

Re: AOB signature on a repeating memory pattern

Post by MartaLabieniec »

make longer aob

Post Reply

Who is online

Users browsing this forum: No registered users