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 


AAmaker [Lua plugin]
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
GH*master
Expert Cheater
Reputation: 8

Joined: 10 Jan 2008
Posts: 159

PostPosted: Sun Jan 31, 2016 4:08 am    Post subject: AAmaker [Lua plugin] This post has 2 review(s) Reply with quote

Plugin: AA Maker
Authors: SnedS91, MasterGH, ++METHOS
Repository: link

This is CE Lua plugin for Cheat Engine 6.5 or heighter.

AAmaker will help you to create autoassembler scripts.

How to use:

1. Pastle the aamaker.lua in "Autorun" directory
2. Run the Cheat Engine.
3. Attach game Process
4. Go to "Memory View" window
5. Select an address of code
6. Right-click to bring up the context menu
7. Go to items "*Quick AA Maker" menu and use it

Also you can to edit tamplates

Code:
SimpleCodeTemplate = [[
{ Game   : {$ProcessName}
  Version: 1.0
  Date   : {$Date}
  Author : [edit aamaker.lua and pastle Author]

  This script does blah blah blah
 
  Make by aamaker Lua plagin ;)
}

[ENABLE]

{$AddressInjection}:
{$CheatCode}

[DISABLE]

{$AddressInjection}:
{$OriginalCode}

{$PrintLog}
]]

//....



screen1.jpg
 Description:
 Filesize:  21.44 KB
 Viewed:  69774 Time(s)

screen1.jpg



screen0.jpg
 Description:
 Filesize:  227.99 KB
 Viewed:  69774 Time(s)

screen0.jpg



aamaker.lua
 Description:
Ver. 2.4.2
+ fixes
+ directives
+ tamplates
+ remove aobscan, change aobscanmodule

Download
 Filename:  aamaker.lua
 Filesize:  25.39 KB
 Downloaded:  3852 Time(s)


aamaker.lua
 Description:
Ver. 2.4.1

Download
 Filename:  aamaker.lua
 Filesize:  24.08 KB
 Downloaded:  2017 Time(s)


aamaker.lua
 Description:
Ver. 2.3.1

Download
 Filename:  aamaker.lua
 Filesize:  20.28 KB
 Downloaded:  2241 Time(s)



Last edited by GH*master on Sun Feb 21, 2016 7:39 pm; edited 7 times in total
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Jan 31, 2016 8:36 am    Post subject: Reply with quote

YES!!!!! This is awesome! Thank you!

I am clueless when it comes to LUA...I apologize for any errors.


Modified aobscan for multi-script purposes:





Added aobscanmodule option:





Added stealthedit option:




EDIT::
See OP for latest table.


Last edited by ++METHOS on Mon Feb 01, 2016 11:37 am; edited 6 times in total
Back to top
View user's profile Send private message
danrevella
Master Cheater
Reputation: 2

Joined: 11 Jun 2008
Posts: 290

PostPosted: Sun Jan 31, 2016 11:44 am    Post subject: Reply with quote

Many thanks to all!!!
I have try both versions, and they works 100%
These scripts are pure gold!!!!!
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sun Jan 31, 2016 12:30 pm    Post subject: Reply with quote

I achieved something similar (OP script + ++METHOS modifications) without Lua. Just compiled my own CE version, with different template and additional input queries. I planned to make Lua version too. Now I don't have to Cool



Note: hotkeys CTRL+0, CTRL+1, CTRL+2, ... are used for "bookmark" feature.

_________________
Back to top
View user's profile Send private message MSN Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Jan 31, 2016 2:36 pm    Post subject: Reply with quote

I've been trying to figure this out, but I don't understand LUA. Is there a way to incorporate the original [register+offset] in to the code, similar to what we can do with ->>cheatCode or similar? For example:

original code is this:

Code:
mov [ebp+08],ecx
mov byte ptr [esi+0C],00


and I want to be able to incorporate [ebp+08] in to my template, wherever I want, such as this:

Code:
push eax
mov eax,->>register+offset
cmp eax,1
pop eax
jne originalcode
mov ->>register+offset,#999


Thanks!

EDIT:
I've incorporated a template for stealthedit. Can someone please verify if this allocation is correct for the latest version of stealthedit, using stealtheditex? I've yet to test this recently, but it seems to be working.

Code:
//Author:  ++METHOS
//Script:  ammo

[ENABLE]
aobscanmodule(aob_ammo,firefox.exe+2562,89 46 04 8B 4E 08 8B 41)
stealtheditex(newmem_ammo,aob_ammo,1)

label(originalcode_ammo)
label(returnhere_ammo)

registersymbol(aob_ammo)

//======================================================

newmem_ammo:

originalcode_ammo:
mov [esi+04],eax
mov ecx,[esi+08]
jmp returnhere_ammo

//ammo_enable:
//db 0

//======================================================

aob_ammo:
jmp newmem_ammo
nop
returnhere_ammo:

[DISABLE]
dealloc(newmem_ammo)
aob_ammo:
db 89 46 04 8B 4E 08

unregistersymbol(aob_ammo)



EDIT2:
Is anyone else getting the following error, randomly:

Code:
Error:Invalid class object


Sometimes I get it, sometimes I don't. Maybe I broke something in the script?

EDIT3:
Removed wall of text (sorry, I didn't want to upload another script and I didn't think people would want my custom stuff in it).

EDIT4:
Updated table...fixed stealthedit script.

EDIT5:
Updated table...fixed stealthedit script (again).

EDIT6:
Updated table...fixed typos discovered by mgr.inz.Player.

EDIT7:
Moved script to this post.

EDIT8:
I couldn't figure out how to set the aobscanmodule correctly, not sure if it matters, but maybe someone can fix it?

aobscanmodule(aob_infinite_ammo,firefox.exe+250A,8B 4D 08 C6 46 0C 00 85 C9 75 66 57)
alloc(newmem_infinite_ammo,2048,"firefox.exe"+250A)

EDIT9:
I wonder how difficult it would be to incorporate this feature in to the drop-down menu of the Auto Assemble window to automatically combine scripts more easily? If not, it's no big deal...this script is going to save me a LOT of time. Very Happy



EDIT10:
Is there a way to change the default options for the AA Maker Window? I'd like it to default to aobscanmodule with original code in bytes checked.

Thanks, again!


Last edited by ++METHOS on Sun Jan 31, 2016 9:13 pm; edited 8 times in total
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sun Jan 31, 2016 5:32 pm    Post subject: Reply with quote

@++METHOS

Can you upload file with .lua extension. No need to junk this thread with wall of text.



@all
My contribution:
Currently it doesn't have "easy to customize" template. Maybe later in new thread.

New templates:
- "Alternative AOB template"
- "Alternative AOB with stealth template"

Note:
When updating existing script, it assumes that [ENABLE] block is the first block.

How does it work?
It shapes AA script generated by default "AOB Injection" template from CE.


edit:
update: removed not needed registersymbol for AOB with stealth



differentAOBScanTemplate.lua
 Description:

Download
 Filename:  differentAOBScanTemplate.lua
 Filesize:  5.33 KB
 Downloaded:  2327 Time(s)


_________________
Back to top
View user's profile Send private message MSN Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Jan 31, 2016 6:37 pm    Post subject: Reply with quote

I've updated my script and fixed the stealthedit template. I didn't think that so much was still required with the latest CE build, but my script kept causing the target process to freeze up.

mgr.inz.Player-
I noticed that you're not using stealtheditex. Is there any reason for that?
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sun Jan 31, 2016 6:43 pm    Post subject: Reply with quote

Yeah, for 64bit target it could be '-ex' version.
_________________
Back to top
View user's profile Send private message MSN Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Jan 31, 2016 6:46 pm    Post subject: Reply with quote

I tested on 64bit target but not on 32bit. I wonder if it works on both?

Also, I'm still not sure my script is correct, although, it works. I was looking at your template, and it's different from yours:

Code:
//Author:  ++METHOS
//Script:  timer

[ENABLE]
aobscanmodule(aob_timer,minesweeper.exe+2B75B,F3 0F 11 40 20 48)
alloc(newmem_timer,2048,minesweeper.exe+2B75B)
stealtheditex(stealth_timer,aob_timer,1)

label(originalcode_timer)
label(returnhere_timer)
label(stealthedit_timer)

registersymbol(aob_timer)
registersymbol(stealthedit_timer)

//======================================================

newmem_timer:

originalcode_timer:
movss [rax+20],xmm0
jmp returnhere_timer

//timer_enable:
//db 0

//======================================================

stealth_timer:
stealthedit_timer:
jmp newmem_timer
returnhere_timer:

[DISABLE]
dealloc(newmem_timer)
aob_timer:                //////////////////////////////different here
db F3 0F 11 40 20

unregistersymbol(aob_timer)
unregistersymbol(stealthedit_timer)
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sun Jan 31, 2016 6:55 pm    Post subject: This post has 1 review(s) Reply with quote

Yes. In disable section you should use "stealthedit_timer" symbol.
And you don't need "aob_timer" symbol.

_________________
Back to top
View user's profile Send private message MSN Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Jan 31, 2016 6:59 pm    Post subject: Reply with quote

Thanks. Yeah, I just tested everything. Stealtheditex works for both x86 and x64, but my disable section needs to be fixed. Very Happy
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sun Jan 31, 2016 7:43 pm    Post subject: This post has 1 review(s) Reply with quote

About:
Code:
Error:Invalid class object

Did you try without other lua scripts inside autorun?

_________________
Back to top
View user's profile Send private message MSN Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Jan 31, 2016 7:53 pm    Post subject: Reply with quote

No, I didn't try that. And actually, I haven't received that error in a while. I'm thinking that it may have been something in memory that wasn't getting properly flushed, from when I was testing some things.

I'll try it if I received the error again and report back. But everything seems to be working fine right now.
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 218

Joined: 07 Nov 2008
Posts: 4438
Location: W kraju nad Wisla. UTC+01:00

PostPosted: Sun Jan 31, 2016 8:00 pm    Post subject: Reply with quote

From what I see, that "Error:Invalid class object" shows up when my "redo" script is also there.

Looks like we can not have few Lua scripts which use disassemblerview_onSelectionChange.


I will upload newer "redo". But, GH*master should also update his script to use a timer with:
Code:
dv_address1, dv_address2 = disassemblerview_getSelectedAddress(mv)


instead of using disassemblerview_onSelectionChange tracker.



Also, there are typos in his script at line 383 and 359
dv_address1 = disassemblerview_getSelectedAddress(mv)

It should be dv.

_________________


Last edited by mgr.inz.Player on Sun Jan 31, 2016 8:16 pm; edited 2 times in total
Back to top
View user's profile Send private message MSN Messenger
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Sun Jan 31, 2016 8:14 pm    Post subject: Reply with quote

Not sure. I don't have that script in my autorun folder. I'm currently only running the default scripts, including aamaker. I added your differentAOBScanTemplate in there, but I was receiving the errors before that.

When I was initially testing my changes, I received a few errors, basically telling me that something wasn't right. I tested on a few, specific instructions inside of firefox. When I closed everything out and went back in to firefox to test again, I would receive the errors if I chose those same instructions, but if I chose a different instruction, it seemed to work. Now, if I go in there, everything works...which made me think that it was memory issue.

EDIT:
I will incorporate those two typo changes. Thank you for posting the corrections.
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 Extensions All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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