Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Adding a AOB Injection to a trainer

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Octopus3535
How do I cheat?
Reputation: 0

Joined: 12 Mar 2016
Posts: 4
Location: the void

PostPosted: Wed Dec 14, 2022 12:42 am    Post subject: Adding a AOB Injection to a trainer Reply with quote

I was trying to add a back up to a trainer i was making that grabs a pointer with this aob injection script. This is probably all heaps of wrong but if someone would be so kind to point out why this isn't working and possible fixes I'd be greatful.

Code:

function ButtonLastResortClick(sender)
 autoAssemble(script)
 local script = [[
[ENABLE]

aobscanmodule(tst,game.exe,C3 F3 0F 10 40 20 C3)
alloc(newmem,$1000,tst)
globalalloc(pntr,100)
label(code)
label(return)

newmem:

code:
  push rax
  mov rax,pntr
  mov [rax],rdx
  pop rax
  movss xmm0,[rax+18]
  jmp return

tst+01:
  jmp newmem
return:
registersymbol(tst)

[DISABLE]

tst+01:
  db F3 0F 10 40 20

unregistersymbol(tst)
dealloc(newmem)

]]
 setProperty(UDF1.LastResortText,"Text", readQword([pntr])

Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4291

PostPosted: Wed Dec 14, 2022 2:22 am    Post subject: Reply with quote

Octopus3535 wrote:
Code:
autoAssemble(script)
local script = ...
You put the definition of script after the call to autoAssemble. There's also the issue of not handling the disableInfo at all and therefore not being able to disable the script.

Just assign the AA script to the address list and use it there. If you insist on releasing a trainer (tables are always better IMO), I think the address list might still work even if it's not visible. I don't know as I haven't used trainers in forever.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites