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 


ce script to dll

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
renomous
Advanced Cheater
Reputation: 0

Joined: 15 Jul 2012
Posts: 86

PostPosted: Sun Jan 27, 2013 2:23 am    Post subject: ce script to dll Reply with quote

how can i make this script in dll inject

[ENABLE]
alloc(MonsterAggro,4)
registersymbol(MonsterAggro)

0053D16A: //0F B7 86 54 01 00 00 8B 0D
mov eax,[MonsterAggro]
nop
nop
MonsterAggro:
db 03 00 00 00
[DISABLE]
unregistersymbol(MonsterAggro)
0053D16A:
movzx eax,word ptr [esi+00000154]
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Jan 27, 2013 8:19 am    Post subject: Reply with quote

Because you're using a registered symbol there will be a little extra work in doing this.

Here's a quick rundown of what you can do to do what you want:

1.) Start your game and Cheat Engine then enable your script.
2.) Go to the address listed in your script and copy the new bytes that are placed there. In your case it should be like this:
A1 ?? ?? ?? ?? 90 90

3.) Next disable your script and copy those bytes too, which should be like:
0F B7 86 54 01 00 00

So now you have what you need to start.

4.) In the DLL define your two arrays like:
BYTE btEnable[] = { 0xA1, 0x00, 0x00, 0x00, 0x00, 0x90, 0x90 };
BYTE btDisable[] = { 0x0F, 0xB7, 0x86, 0x54, 0x01, 0x00, 0x00 };

Next you need to create memory for that registered global. So you'd use VirtualAlloc to create an area of memory. The return of this is the address, so you need to use that in your btEnable part.

Now because you were using the global you need to write that address returned from VirtualAlloc into your enable array.
Then you can write your enable array to the games memory.

When you're done, just write the disable array to the memory to fix your patch and undo it. Also be sure to deallocate the memory to created with VirtualAlloc.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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