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 


[AA] Calling LoadLibrary?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Jul 07, 2008 8:19 pm    Post subject: [AA] Calling LoadLibrary? Reply with quote

I'm trying to call LoadLibrary from an Auto Assembly script, but it's not quite working.

Code:

  call kernel32.LoadLibrary


(note that I also tried "call LoadLibrary")

Any ideas (besides using the C script engine)?

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Mon Jul 07, 2008 8:39 pm    Post subject: Reply with quote

you have to enumerate external symbols i think.
_________________
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Jul 07, 2008 8:42 pm    Post subject: Reply with quote

As much as I hate to ask this, Google is yielding no results (even though it does sound pretty familiar), could you give me an example?
_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Mon Jul 07, 2008 8:46 pm    Post subject: Reply with quote

MemoryViewer > view. show symbols and enumerate dlls and symbols.
_________________
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Jul 07, 2008 8:58 pm    Post subject: Reply with quote

sponge wrote:
MemoryViewer > view. show symbols and enumerate dlls and symbols.


So you're saying that I have to use the address given in that instance?

Edit:

Nevermind, I figured it out. Thanks

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Tue Jul 08, 2008 3:57 pm    Post subject: Re: [AA] Calling LoadLibrary? Reply with quote

x0r wrote:
samuri25404 wrote:
I'm trying to call LoadLibrary from an Auto Assembly script, but it's not quite working.

Code:

  call kernel32.LoadLibrary


(note that I also tried "call LoadLibrary")

Any ideas (besides using the C script engine)?

Problem is that an API called LoadLibrary does not exist, there are ANSI and UNICODE versions of the function though. So you'll have to call LoadLibraryA or LoadLibraryW, preferably the former because by default CE defines characters in ANSI.


Yeah, I realized that.

How does one define strings in CE anyway?

I just did something like

Code:

alloc(lpFileName, 11)

//...

lpFileName:
db 75 73 65 72 33 32 2E 64 6C 6C 00 //user32.dll


Or whatever.

But I realized that I didn't need to use LoadLibrary, since the program (Minesweeper) already imported the CRT.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 472

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

PostPosted: Tue Jul 08, 2008 4:56 pm    Post subject: Reply with quote

You define strings in ce using:
db 'user32.dll',0


also, you can inject a specific dll with an aa script as well
Code:

loadlibrary(user32.dll)

This'll inject the dll and instantly reload the symbol table with the new dll, so the rest of the script can already make use of the exports instead of waiting for the symbolloader to have a refresh.

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
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 -> 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