15
"Enable "
0000FF
Auto Assembler Script
{ Game : APT2_WinStore.x64.Submission.exe
Version:
Date : 2022-10-18
Author : cfe
This script does blah blah blah
}
[ENABLE]
alloc(WindowThread,$1000,$process)
registersymbol(WindowThread)
WindowThread:
sub rsp,28
mov edi,ecx
xor ecx,ecx
mov rdx,szName
call FindWindowA
mov rcx,rax
mov edx,edi
call ShowWindow
add rsp,28
ret
szName:
db 'Console'
db 0
//
aobscanmodule(aop_pAmiciaUpdate,$process,48 89 74 24 18 48 89 7C 24 20 41 56 48 83 EC 20 80 3D ** ** ** ** 00) // should be unique
registersymbol(aop_pAmiciaUpdate)
label(pDebug)
registersymbol(pDebug)
aop_pAmiciaUpdate+10+(DWORD)[aop_pAmiciaUpdate+12]+7:
pDebug:
//
aobscanmodule(aob_UseItems,$process,48 89 5C 24 10 57 48 83 EC 30 80 3D ** ** ** ** 00 48 8B FA) // should be unique
registersymbol(aop_pAmiciaUpdate)
label(bUnlimitedAmmo)
registersymbol(bUnlimitedAmmo)
aob_UseItems+A+(DWORD)[aob_UseItems+C]+7:
bUnlimitedAmmo:
[DISABLE]
unregistersymbol(*)
deAlloc(WindowThread)
17
"God? ( set to 1 )"
0
Byte
pDebug-1
16
"Undetectable? ( set to 1 )"
0
Byte
pDebug
32
"Unlimited Ammo? ( set to 1 )"
0
Byte
bUnlimitedAmmo
88229
"Bypass Inventory Maxes"
Auto Assembler Script
{$STRICT}
{$lua}
if syntaxcheck then return end
function stopExec( s )
error( print( string.format( "\r\n>> %s <<", s ) ) )
end
function aobScanEx( aob )
-- thanks panraven for this function!
-- https://forum.cheatengine.org/viewtopic.php?t=577536
-- simplified for my needs
-- scan the entire memory space: e = nil or '*X*W'
-- scan only executable code: e = nil or '+X'
local p, a, n, s, e = nil or '+X', nil or fsmNotAligned, nil or '0', getAddress( process ) or 0x0, ( getAddress( process ) + getModuleSize( process ) ) or 0xffffffffffffffff
local ms = pb and createMemScan( pb ) or createMemScan()
local fl = createFoundList( ms )
ms.firstScan( soExactValue, vtByteArray, nil, aob, nil, s, e, p, a, n, true, false, false, false )
ms.waitTillDone()
fl.initialize()
local result = nil
if fl ~= nil and fl.getCount() > 0 then
result = createStringlist()
for i = 1, fl.getCount() do result.add( fl.getAddress( i - 1 ) ) end
end
fl.destroy()
ms.destroy()
return result
end
local _script = [[
define( Trampoline, Trampolines+600 )
]]..[[[ENABLE]
alloc( CheckInventoryMax_hook, 0x1000 )
registersymbol( CheckInventoryMax_hook )
label( CheckInventoryMax_orig )
registersymbol( CheckInventoryMax_orig )
CheckInventoryMax_hook:
xor al,al
ret
align 10 CC
CheckInventoryMax_orig:
readmem( CheckInventoryMax, 5 )
align 10 CC
Trampoline:
jmp far CheckInventoryMax_hook
align 10 CC
CheckInventoryMax:
jmp Trampoline
]]..[[[DISABLE]
CheckInventoryMax:
readmem( CheckInventoryMax_orig, 5 )
unregistersymbol( CheckInventoryMax_orig )
dealloc( CheckInventoryMax_hook )
unregistersymbol( CheckInventoryMax_hook )
]]
[ENABLE]
local sl, t = 0, 0
local aob_to_CheckInventoryMax = "E8????????488BD3488BCF0FB6F0E8????????85C048 "
sl = aobScanEx( aob_to_CheckInventoryMax )
if not sl or sl.Count < 1 then stopExec( "'aob_to_CheckInventoryMax' not found." ) end
t = tonumber( sl[0], 16 )
t = t + readInteger( t + 0x1, true ) + 0x5
unregisterSymbol( "CheckInventoryMax" )
registerSymbol( "CheckInventoryMax", t, true )
-- let's use trampolines: jumping via 5-to-14 bytes traversals
local gameModule = getAddressSafe( process )
local offset = 0x500
t = gameModule + offset
fullAccess( t, 0x1000 - offset )
unregisterSymbol( "Trampolines" )
registerSymbol( "Trampolines", t, true )
result, disableinfo = autoAssemble( _script )
[DISABLE]
autoAssemble( _script, disableinfo )
unregisterSymbol( "Trampolines" )
unregisterSymbol( "CheckInventoryMax" )
27
"Toggle Console"
Auto Assembler Script
{$lua}
if syntaxcheck then return end
[ENABLE]
executeCodeEx(0,nil,getAddress("WindowThread"),1)
[DISABLE]
executeCodeEx(0,nil,getAddress("WindowThread"),0)