LeFiXER Grandmaster Cheater Supreme Reputation: 20 Joined: 02 Sep 2011 Posts: 1066 Location: 0x90
|
Posted: Sun Jul 23, 2023 9:46 pm Post subject: |
|
|
I've compacted it a little bit for this specific scenario. The function I posted can be used more globally
To use Lua in the same script just use {$LUA}/{$ASM} pre-processors:
Code: |
[ENABLE]
{$LUA}
if syntaxcheck then return end
local as = AOBScan('8B 42 20 48 8D 54 24 20 48 49 4c 24 48 48 83 C1 50', '*newmem*W*C')
if as.Count > 0 then
registerSymbol('cash-items', as[1], true)
else
error('AOB not found')
end
as.destroy()
{$ASM}
alloc(newmem, $1000)
label(cash)
label(items)
label(code)
label(return)
newmem:
cmp [rcx+0238],00280008
je cash
cmp [rcx+0238],FFFFFFFF
je items
jmp code
cash:
mov [rdx+20],#9999999
mov eax,[rdx+20]
lea rdx,[rsp+20]
mov [rsp+48],rcx
add rcx,50
jmp return
items:
mov [rdx+20],63
mov eax,[rdx+20]
lea rdx,[rsp+20]
mov [rsp+48],rcx
add rcx,50
jmp return
code:
mov eax,[rdx+20]
lea rdx,[rsp+20]
mov [rsp+48],rcx
add rcx,50
jmp return
cash-items:
jmp far newmem
nop 3
return:
[DISABLE]
cash-tems:
db 8B 42 20 48 8D 54 24 20 48 49 4c 24 48 48 83 C1 50
unregistersymbol(cash-items)
unregistersymbol(newmem)
dealloc(cash-items)
dealloc(newmem)
|
Last edited by LeFiXER on Mon Jul 24, 2023 8:10 pm; edited 1 time in total
|
|