AOB Wildcard Generator (v4)

Upload *YOUR* gamehacking tools/helpers here
User avatar
The_Podstanar
Table Makers
Table Makers
Posts: 62
Joined: Wed Sep 04, 2019 7:08 pm
Reputation: 59

Re: AOB Wildcard Generator (v4)

Post by The_Podstanar »

Glowmoss wrote:
Wed Jan 18, 2023 10:56 am
local startPoint = modules[k].Address or 0x0000000000000000
local endPoint = getModuleSize(modules[k].Name) or 0x00007fffffffffff
What's up with that?

User avatar
Glowmoss
Negan
Negan
Posts: 413
Joined: Sun Oct 17, 2021 10:14 pm
Reputation: 215

Re: AOB Wildcard Generator (v4)

Post by Glowmoss »

The_Podstanar wrote:
Sat Feb 04, 2023 10:13 am
Glowmoss wrote:
Wed Jan 18, 2023 10:56 am
local startPoint = modules[k].Address or 0x0000000000000000
local endPoint = getModuleSize(modules[k].Name) or 0x00007fffffffffff
What's up with that?
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

User avatar
The_Podstanar
Table Makers
Table Makers
Posts: 62
Joined: Wed Sep 04, 2019 7:08 pm
Reputation: 59

Re: AOB Wildcard Generator (v4)

Post by The_Podstanar »

I was referring to the redundant zeros, yeah

User avatar
plaxor
Cheater
Cheater
Posts: 27
Joined: Thu Mar 19, 2020 6:17 pm
Reputation: 36

Re: AOB Wildcard Generator (v4)

Post by plaxor »

Hello, thanks for this, 've been using this for a while now, but after I update CE to 7.5 I think it's not working anymore.. or is it just on my end? can you fix it? sorry don't know lua (yet)

User avatar
Glowmoss
Negan
Negan
Posts: 413
Joined: Sun Oct 17, 2021 10:14 pm
Reputation: 215

Re: AOB Wildcard Generator (v4)

Post by Glowmoss »

plaxor wrote:
Sun Apr 09, 2023 3:06 pm
Hello, thanks for this, 've been using this for a while now, but after I update CE to 7.5 I think it's not working anymore.. or is it just on my end? can you fix it? sorry don't know lua (yet)
It's still working for me on 7.5 just fine what issue are you having with it

User avatar
plaxor
Cheater
Cheater
Posts: 27
Joined: Thu Mar 19, 2020 6:17 pm
Reputation: 36

Re: AOB Wildcard Generator (v4)

Post by plaxor »

Glowmoss wrote:
Tue Apr 18, 2023 12:28 am
^^

It always says "Unable to find unique AOB"
Image

User avatar
Glowmoss
Negan
Negan
Posts: 413
Joined: Sun Oct 17, 2021 10:14 pm
Reputation: 215

Re: AOB Wildcard Generator (v4)

Post by Glowmoss »

plaxor wrote:
Sat Apr 22, 2023 4:50 pm
It always says "Unable to find unique AOB"
Is that when there is a module or without ie you are generating an aob from game.exe+00852584 or from just an address

Did you try my suggested fix to that error as aSwedishMagyar just made it error out if there's no module.

User avatar
plaxor
Cheater
Cheater
Posts: 27
Joined: Thu Mar 19, 2020 6:17 pm
Reputation: 36

Re: AOB Wildcard Generator (v4)

Post by plaxor »

Glowmoss wrote:
Sat Apr 22, 2023 5:08 pm
Is that when there is a module or without ie you are generating an aob from game.exe+00852584 or from just an address

Did you try my suggested fix to that error as aSwedishMagyar just made it error out if there's no module.
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 :mellow: .. thank you for the responses anyway, really appreciate it :)

User avatar
Glowmoss
Negan
Negan
Posts: 413
Joined: Sun Oct 17, 2021 10:14 pm
Reputation: 215

Re: AOB Wildcard Generator (v4)

Post by Glowmoss »

plaxor wrote:
Fri Apr 28, 2023 1:28 am
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 :mellow: .. thank you for the responses anyway, really appreciate it :)
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

User avatar
濒危物种猫咪
Expert Cheater
Expert Cheater
Posts: 203
Joined: Tue Oct 18, 2022 5:09 am
Reputation: 192

Re: AOB Wildcard Generator (v4)

Post by 濒危物种猫咪 »

It doesn't work on other languages, when I try to change the language, CE.exe won't start

User avatar
Glowmoss
Negan
Negan
Posts: 413
Joined: Sun Oct 17, 2021 10:14 pm
Reputation: 215

Re: AOB Wildcard Generator (v4)

Post by Glowmoss »

濒危物种猫咪 wrote:
Sat Feb 03, 2024 5:13 am
It doesn't work on other languages, when I try to change the language, CE.exe won't start
Try changing within the function addGenerateAOBMenu

Code: Select all

local parent = findComponentByName(getMemoryViewForm(),'Tools')
to

Code: Select all

local parent = getMemoryViewForm().Extra1
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.

User avatar
濒危物种猫咪
Expert Cheater
Expert Cheater
Posts: 203
Joined: Tue Oct 18, 2022 5:09 am
Reputation: 192

Re: AOB Wildcard Generator (v4)

Post by 濒危物种猫咪 »

Glowmoss wrote:
Fri Mar 15, 2024 5:49 am
濒危物种猫咪 wrote:
Sat Feb 03, 2024 5:13 am
It doesn't work on other languages, when I try to change the language, CE.exe won't start
Try changing within the function addGenerateAOBMenu

Code: Select all

local parent = findComponentByName(getMemoryViewForm(),'Tools')
to

Code: Select all

local parent = getMemoryViewForm().Extra1
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.
It worked, thank you

COREx
What is cheating?
What is cheating?
Posts: 2
Joined: Thu May 26, 2022 7:00 pm
Reputation: 0

Re: AOB Wildcard Generator (v4)

Post by COREx »

Cheat Engine 7.6 not responding after the message "AOB Copied to Clipboard!" appears.
AOB is generated when I paste it in Notepad.

User avatar
MBRKiNG
Table Makers
Table Makers
Posts: 338
Joined: Fri Feb 23, 2018 5:13 pm
Reputation: 590

Re: AOB Wildcard Generator (v4)

Post by MBRKiNG »

COREx wrote:
Tue Jan 21, 2025 4:04 am
Cheat Engine 7.6 not responding after the message "AOB Copied to Clipboard!" appears.
AOB is generated when I paste it in Notepad.
got the same problem here is a fix

FIX HERE

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()
Last edited by MBRKiNG on Wed Jan 22, 2025 5:57 pm, edited 1 time in total.

COREx
What is cheating?
What is cheating?
Posts: 2
Joined: Thu May 26, 2022 7:00 pm
Reputation: 0

Re: AOB Wildcard Generator (v4)

Post by COREx »

MBRKiNG wrote:
Tue Jan 21, 2025 9:52 pm
COREx wrote:
Tue Jan 21, 2025 4:04 am
Cheat Engine 7.6 not responding after the message "AOB Copied to Clipboard!" appears.
AOB is generated when I paste it in Notepad.
got the same problem here is a fix
Error on line 52, change to

Code: Select all

	--moduleStrSize = moduleStrSize and 0x7fffffffffff
	moduleStrSize = moduleStrSize and moduleStrSize or 0x7fffffffffff
now it work, thank you

Post Reply

Who is online

Users browsing this forum: No registered users