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 


call alloc in AA script?

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

Joined: 09 Apr 2006
Posts: 29

PostPosted: Sat Nov 04, 2006 5:43 am    Post subject: call alloc in AA script? Reply with quote

Hi DarkByte,

Are we able to call alloc in AA script? What I want is dynamic alloc, I can call malloc but I dun know how to free it in [DISABLE] section.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 474

Joined: 09 May 2003
Posts: 25958
Location: The netherlands

PostPosted: Sat Nov 04, 2006 9:05 am    Post subject: Reply with quote

try using registersymbol in the enable and unegistersymbol in the disable
That way you have a address known in all scripts in ce (and even table) so also the disable section so you can give that address

e.g:
[enable]
alloc(addresstostoreallocatedmemory,4)
registersymbol(addresstostoreallocatedmemory)

push params
call virtualalloc
mov [addresstostoreallocatedmemory],eax

[disable]
dealloc(addresstostoreallocatedmemory)
unregistersymbol(addresstostoreallocatedmemory)

push otherparams
push [addresstostoreallocatedmemory]
call virtualfree

also, instead of allocating addresstostoreallocatedmemory you could also use a static address

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
yoyoyip
Cheater
Reputation: 0

Joined: 09 Apr 2006
Posts: 29

PostPosted: Sat Nov 04, 2006 7:32 pm    Post subject: Reply with quote

Thanks, DarkByte.
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 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