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 


Custom 'AOB Injection' Templates [ver. 1.3.6]
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Wed Sep 14, 2016 6:11 pm    Post subject: Reply with quote

mgr.inz.Player wrote:
Added %injectAddress% and Csimbi template (slightly modified).


what does "reassemble()" do? couldn't find its documentation. TIA
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 217

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

PostPosted: Wed Sep 14, 2016 6:18 pm    Post subject: Reply with quote

reassemble() - http://forum.cheatengine.org/viewtopic.php?p=5485950#5485950
_________________
Back to top
View user's profile Send private message MSN Messenger
Csimbi
I post too much
Reputation: 91

Joined: 14 Jul 2007
Posts: 3093

PostPosted: Thu Sep 15, 2016 2:30 pm    Post subject: Reply with quote

Awesome, thank you, thank you, thank you!
This is of great help!

I modded it a bit though as I dislike underscores and putting skip, ret and such up front.
I kept the _r for restore and _i for inject so they stick out.
I decided to keep reassemble even though I do not use it - others might.
Here's the final:
Code:
{
displayName="Csimbi's AOB",
templateSections=
[==[
<<INFO>>
// Game   : %processName%
// Version:
// Date   :
// Author : %authorName%
<<INFO_END>>

<<ENABLE>>
aobscan%isModuleScan%(aob%cheatName%,%moduleNameC%%searchPattern%)

alloc(newmem%cheatName%,4096%CmoduleName%)

label(aob%cheatName%_r)
label(aob%cheatName%_i)
registersymbol(aob%cheatName%_r)
registersymbol(aob%cheatName%_i)

label(lbl%cheatName%)
label(lbl%cheatName%Skip)
label(lbl%cheatName%Ret)

label(bEnable%cheatName%)
registersymbol(bEnable%cheatName%)

newmem%cheatName%:
bEnable%cheatName%:
dd 1

lbl%cheatName%:
{
%originalCodeLines%
//db %originalBytes%
}
reassemble(aob%cheatName%%aobAdjust%)

cmp dword ptr [bEnable%cheatName%],1
jne short lbl%cheatName%Skip
// Place your code here

lbl%cheatName%Skip:
jmp lbl%cheatName%Ret

aob%cheatName%_i:
readmem(aob%cheatName%%aobAdjust%,%replacedInstructionsSize%)

//%injectAddress%:
aob%cheatName%%aobAdjust%:
aob%cheatName%_r:
jmp lbl%cheatName%
%nopLines%
lbl%cheatName%Ret:

<<ENABLE_END>>

<<DISABLE>>
{
%injectAddress%:
%originalCodeLines%
//db %originalBytes%
}
aob_%cheatName%%aobAdjust%:
readmem(aob%cheatName%_i,%replacedInstructionsSize%)

unregistersymbol(aob%cheatName%_r)
unregistersymbol(aob%cheatName%_i)

unregistersymbol(bEnable%cheatName%)

dealloc(newmem%cheatName%)

%additionalInfo%
<<DISABLE_END>>
]==]
},

Could you add this 'as is' without changes?
I would not want to have to fix it after every release Wink
Thank you!
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 217

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

PostPosted: Thu Sep 15, 2016 4:41 pm    Post subject: Reply with quote

Would you accept this one?
Code:
{
displayName="Csimbi's AOB",
templateSections=
[==[
<<INFO>>
// Game   : %processName%
// Version:
// Date   :
// Author : %authorName%
<<INFO_END>>

<<ENABLE>>
aobscan%isModuleScan%(aob%cheatName%,%moduleNameC%%searchPattern%)

alloc(newmem%cheatName%,4096%CmoduleName%)

label(%cheatName%_r)
label(%cheatName%_i)
registersymbol(%cheatName%_r)
registersymbol(%cheatName%_i)

label(lbl%cheatName%)
label(lbl%cheatName%Skip)
label(lbl%cheatName%Ret)

label(bEnable%cheatName%)
registersymbol(bEnable%cheatName%)

newmem%cheatName%:
bEnable%cheatName%:
dd 1

lbl%cheatName%:
{
%originalCodeLines%
//db %originalBytes%
}
reassemble(aob%cheatName%%aobAdjust%)

cmp dword ptr [bEnable%cheatName%],1
jne short lbl%cheatName%Skip
// Place your code here

lbl%cheatName%Skip:
jmp lbl%cheatName%Ret

%cheatName%_i:
readmem(aob%cheatName%%aobAdjust%,%replacedInstructionsSize%)

//%injectAddress%:
aob%cheatName%%aobAdjust%:
%cheatName%_r:
jmp lbl%cheatName%
%nopLines%
lbl%cheatName%Ret:

<<ENABLE_END>>

<<DISABLE>>
{
%injectAddress%:
%originalCodeLines%
//db %originalBytes%
}
%cheatName%_r:
readmem(%cheatName%_i,%replacedInstructionsSize%)

unregistersymbol(%cheatName%_r)
unregistersymbol(%cheatName%_i)
unregistersymbol(bEnable%cheatName%)

dealloc(newmem%cheatName%)

%additionalInfo%
<<DISABLE_END>>
]==]
},

_________________
Back to top
View user's profile Send private message MSN Messenger
panraven
Grandmaster Cheater
Reputation: 54

Joined: 01 Oct 2008
Posts: 938

PostPosted: Thu Sep 15, 2016 5:25 pm    Post subject: Reply with quote

I guess the place
Code:

reassemble(aob%cheatName%%aobAdjust%)

may need more 'reassemble' lines if the jmp lbl%cheatName% across more than 1 instruction.

bye~

_________________
- Retarded.
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 91

Joined: 14 Jul 2007
Posts: 3093

PostPosted: Fri Sep 16, 2016 12:41 am    Post subject: Reply with quote

mgr.inz.Player wrote:
Would you accept this one?

I don't understand the reason for change but it's no big deal, so, yes, thank you!
Back to top
View user's profile Send private message
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Fri Sep 16, 2016 4:58 am    Post subject: Reply with quote

Csimbi wrote:
I don't understand the reason for change but it's no big deal, so, yes, thank you!

i think my template replicated your example exactly, though you have to use my version of the extension because of the "commented original opcode" function,%CoriginalCodeLines%. i included mgr.inz's fix for 6.6 CE too, so no worries there.

panraven wrote:
I guess the place
Code:

reassemble(aob%cheatName%%aobAdjust%)

may need more 'reassemble' lines if the jmp lbl%cheatName% across more than 1 instruction.

bye~


yep, just tested, reassemble only copied over the first instruction.


Last edited by predprey on Sat Sep 17, 2016 1:26 am; edited 1 time in total
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 91

Joined: 14 Jul 2007
Posts: 3093

PostPosted: Fri Sep 16, 2016 1:15 pm    Post subject: Reply with quote

Yup, seems to be closer (if not identical) to what I requested.

mgr.inz.Player,
would it be too much trouble to add predprey's?

Thank you both!
Back to top
View user's profile Send private message
predprey
Master Cheater
Reputation: 24

Joined: 08 Oct 2015
Posts: 486

PostPosted: Fri Sep 16, 2016 1:57 pm    Post subject: Reply with quote

Csimbi wrote:
Yup, seems to be closer (if not identical) to what I requested.

mgr.inz.Player,
would it be too much trouble to add predprey's?

Thank you both!


EDIT:
readmem() does not work for EIP/RIP relative addressing. Use mgr.inz updated extension on first page instead.


Last edited by predprey on Sat Sep 17, 2016 1:33 am; edited 2 times in total
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 217

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

PostPosted: Fri Sep 16, 2016 3:47 pm    Post subject: Reply with quote

panraven wrote:
I guess the place (...) may need more 'reassemble' lines if the jmp lbl%cheatName% across more than 1 instruction.

Yes, it is not perfect. Also, if we use readmem in that place, it won't work correctly when RIP-relative addressing occurs, and that means it is not perfect too.


Csimbi wrote:
I don't understand the reason for change but it's no big deal, so, yes, thank you!

I just don't like using a name which is a substring of other name. It cause a total mess when I refactor something.



Edit:
Added updated Csimbi template. (added %CoriginalCodeLines% keyword)
Changed extension a bit. It will try adding one or more reassemble commands when needed.


 

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

Joined: 14 Jul 2007
Posts: 3093

PostPosted: Fri Sep 30, 2016 7:18 am    Post subject: Reply with quote

After using your scripts for a while, I made some tweaking and arrived at this:
Code:
{
displayName="Csimbi's AOB",
templateSections=
[==[
<<INFO>>
// Game   : %processName%
// Version:
// Date   :
// Author : %authorName%
<<INFO_END>>

<<ENABLE>>
aobscan%isModuleScan%(aob%cheatName%,%moduleNameC%%searchPattern%)

alloc(newmem%cheatName%,4096,aob%cheatName%)

label(aob%cheatName%_r)
label(aob%cheatName%_i)
registersymbol(aob%cheatName%_r)
registersymbol(aob%cheatName%_i)

label(lbl%cheatName%)
label(lbl%cheatName%Skip)
label(lbl%cheatName%Ret)

label(bEnable%cheatName%)
registersymbol(bEnable%cheatName%)

newmem%cheatName%:
bEnable%cheatName%:
dd 1

lbl%cheatName%:
%CoriginalCodeLines%
//db %originalBytes%
readmem(aob%cheatName%%aobAdjust%,%replacedInstructionsSize%)

cmp dword ptr [bEnable%cheatName%],1
jne short lbl%cheatName%Skip
// Place your code here

lbl%cheatName%Skip:
jmp lbl%cheatName%Ret

aob%cheatName%_i:
readmem(aob%cheatName%%aobAdjust%,%replacedInstructionsSize%)

//%injectAddress%:
aob%cheatName%%aobAdjust%:
aob%cheatName%_r:
jmp lbl%cheatName%
%nopLines%
lbl%cheatName%Ret:

<<ENABLE_END>>

<<DISABLE>>
//%injectAddress%:
%CoriginalCodeLines%
//db %originalBytes%
aob%cheatName%_r:
readmem(aob%cheatName%_i,%replacedInstructionsSize%)

unregistersymbol(aob%cheatName%_r)
unregistersymbol(aob%cheatName%_i)

unregistersymbol(bEnable%cheatName%)

dealloc(newmem%cheatName%)

%additionalInfo%

<<DISABLE_END>>
]==]
},


Thank you, both!
Back to top
View user's profile Send private message
nubas123
How do I cheat?
Reputation: 0

Joined: 22 Nov 2015
Posts: 4

PostPosted: Sat Oct 22, 2016 3:01 am    Post subject: Reply with quote

mgr.inz.Player update the plugin to Cheat Engin 6.6
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 217

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

PostPosted: Sat Oct 22, 2016 4:24 am    Post subject: Reply with quote

Why? It works with CE 6.6. Did you even try it?
_________________
Back to top
View user's profile Send private message MSN Messenger
nubas123
How do I cheat?
Reputation: 0

Joined: 22 Nov 2015
Posts: 4

PostPosted: Sat Oct 22, 2016 4:31 am    Post subject: Reply with quote

nop the script does not show on the CE 6.6
Back to top
View user's profile Send private message
mgr.inz.Player
I post too much
Reputation: 217

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

PostPosted: Sat Oct 22, 2016 4:36 am    Post subject: Reply with quote

Probably you had in mind other extension,

maybe this one: http://forum.cheatengine.org/viewtopic.php?t=587401
or this: http://forum.cheatengine.org/viewtopic.php?t=592151

_________________
Back to top
View user's profile Send private message MSN Messenger
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 Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 3 of 7

 
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