Re: AOB Wildcard Generator (v4)
Posted: Sat Feb 04, 2023 10:13 am
Community Cheat Tables of Cheat Engine
https://fearlessrevolution.com/
Thats just telling it to either use the start and end point of a module or if there is no module it will just search all memory. You could probably remove the redundent 0s I was just lazily copying from cheat engine lol
It's still working for me on 7.5 just fine what issue are you having with it
Is that when there is a module or without ie you are generating an aob from game.exe+00852584 or from just an address
I did and still does not work.. well, now I've reformatted/refreshed my PC and it strangely fixed my issue.. unfortunately can't track the cause now
I must of been dreaming when I read that error as that's a different error to what I thought it was lol it wasn't able to find a unique aob. You could of tried increasing the Max length as I increased mine so that it will generally find an aob as sometimes there are a few places with similar code up to the default limit but idk what the issue you had though if it was every game you tried. It's good you got it sorted out whatever it was
Try changing within the function addGenerateAOBMenu
Code: Select all
local parent = findComponentByName(getMemoryViewForm(),'Tools')
Code: Select all
local parent = getMemoryViewForm().Extra1
It worked, thank youGlowmoss wrote: ↑Fri Mar 15, 2024 5:49 amTry changing within the function addGenerateAOBMenu
toCode: Select all
local parent = findComponentByName(getMemoryViewForm(),'Tools')
Let me know if that sorts the issue as it would be looking for the string 'Tools' which obviously isn't there when your in another language.Code: Select all
local parent = getMemoryViewForm().Extra1
got the same problem here is a fix
Code: Select all
function generateSymbolListDef()
local sList = getMemoryViewForm().frmSymbolhandler.ListView1.Items
local numSymbols = sList.Count - 1
local symbolList = createStringList()
for i = 0,numSymbols do
local name = sList[i].Caption
local base = getAddressSafe(name)
local addrName = getNameFromAddress(base,true,false)
local AOB = generateWildcardAOB(base)
symbolList.add("local "..name.."AOB = {\'"..AOB[1].."\'")
end
print(symbolList.text)
symbolList.destroy()
end
function generateSymbolListRet()
local sList = getMemoryViewForm().frmSymbolhandler.ListView1.Items
local numSymbols = sList.Count - 1
local symbolList = createStringList()
symbolList.add("local AOBList = {")
for i = 0,numSymbols do
local name = sList[i].Caption
local base = getAddressSafe(name)
local addrName = getModuleName(base)
if i == numSymbols then name = name.."AOB }"
else name = "{"..name.."AOB,\'"..name.."\',\'"..addrName.."\'}" end
symbolList.add(name)
end
symbolList.add("return AOBList")
print(symbolList.text)
symbolList.destroy()
end
function getModuleName(base)
local name = getNameFromAddress(base,true,false)
local modules = enumModules()
local currentModule = nil
local i
for k = 1,#modules do
local startPoint = modules[k].Address
local endPoint = getModuleSize(modules[k].Name)
if base > startPoint and base < startPoint+endPoint then
currentModule = modules[k]
break
end
end
if currentModule then return currentModule.Name end
return nil
end
function checkAOB(bytes,curModule)
local base = nil
if curModule then base = curModule.Address else base = 0x0 end
local moduleStrSize = getModuleSize(curModule)
--moduleStrSize = moduleStrSize and 0x7fffffffffff
moduleStrSize = moduleStrSize and moduleStrSize or 0x7fffffffffff
local memScanner = createMemScan()
local memFoundList = createFoundList(memScanner)
memScanner.firstScan(
soExactValue,vtByteArray,rtRounded,bytes,nil,
base,base+moduleStrSize,"",
fsmNotAligned,"",true,false,false,false)
memScanner.waitTillDone()
memFoundList.initialize()
local foundAdder = nil
if memFoundList.Count == 1 then
foundAdder = true
end
memScanner.destroy()
memFoundList.destroy()
return foundAdder
end
-------------MESSAGEBOX-------------
function MessageBox(title,text,uType)
return executeCodeLocalEx("user32.MessageBoxA", MainForm.Handle, text, title, uType)
end
-------------
function generateWildcardAOB(base)
local name = getNameFromAddress(base,true,false)
local modules = enumModules()
local currentModule = nil
local i
for k = 1,#modules do
local startPoint = modules[k].Address
local endPoint = getModuleSize(modules[k].Name)
if base > startPoint and base < startPoint+endPoint then
currentModule = modules[k]
break
end
end
if currentModule == nil then MessageBox("Generate AOB", "Unable to find unique AOB", 0);return end
local minLen = 2
local maxLen = 120
local wCardFormat = '??'
local addSpace = true
local AOB = createStringList()
local AOBWildCard
local current = 0
local isX64
if currentModule then isX64 = currentModule.Is64Bit else isX64 = targetIs64Bit() end
local done = false
maxLen = maxLen + minLen
for i = 1,maxLen do
local size = getInstructionSize(base+current)
local byteVal = readBytes(base+current,1)
local byte = string.format('%02X',byteVal)
byte = byte=='CC' and wCardFormat or byte
AOB.add(byte)
if isX64 and checkOpCode(byteVal) then
current = current + 1
size = size - 1
byte = string.format('%02X',readBytes(base+current,1))
if addSpace then AOB.add(' ') end
AOB.add(byte)
end
AOBWildCard = string.gsub(AOB.text, "%c", "")
if i > minLen then if checkAOB(AOBWildCard,currentModule) then done = true;break end end
current = current + size
if addSpace then AOB.add(' ') end
for j = 1,size-1 do AOB.add(wCardFormat);if addSpace then AOB.add(' ') end end
end
AOBWildCard = string.gsub(AOB.text, "%c", "")
AOB.destroy()
-- if not done then print("Unable to find unique AOB");return nil end
if not done then MessageBox("Generate AOB", "Unable to find unique AOB", 0);return nil end
if currentModule == nil then name = nil
else name = currentModule.Name end
writeToClipboard(AOBWildCard)
--print(AOBWildCard)
MessageBox("Generate AOB", "AOB SCAN DONE", 0)
return {AOBWildCard,name}
end
function checkOpCode(byteVal)
if byteVal >= 0x40 and byteVal <=0x49 then return true end
if byteVal == 0x0F then return true end
return false
end
function findComponentByName(parent,name)
local count = parent.ComponentCount
for i = 0,count do if parent.Component[i].Caption == name then return parent.Component[i] end end
return nil
end
function addGenerateAOBMenu()
local parent = findComponentByName(getMemoryViewForm(),'Tools')
generateAOBmenuitem = createMenuItem(parent)
parent.add(generateAOBmenuitem)
generateAOBmenuitem.Caption = 'Generate AOB'
generateAOBmenuitem.OnClick = function() createThread( function(th) generateWildcardAOB(getMemoryViewForm().DisassemblerView.SelectedAddress) end) end
generateAOBmenuitem.Shortcut = 'Ctrl+NumPlus'
generateAOBmenuitem.ImageIndex = 9
end
addGenerateAOBMenu()
Error on line 52, change to
Code: Select all
--moduleStrSize = moduleStrSize and 0x7fffffffffff
moduleStrSize = moduleStrSize and moduleStrSize or 0x7fffffffffff