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 


How to call win32 API from asm?

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

Joined: 12 Jun 2016
Posts: 96

PostPosted: Mon Aug 07, 2017 6:42 am    Post subject: How to call win32 API from asm? Reply with quote

I try to call win32 API,lets say 000007FEFD209AC0,which is LoadLibraryExW.
Next time the address may change.

So is there a way to find those win32 API address automaticly and correctly each time by asm?

The original program does not call those win32 API,I want to call them by asm.
How can I do this correct?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Mon Aug 07, 2017 7:46 am    Post subject: Reply with quote

Instead of giving as address 000007FEFD209AC0, give as address LoadLibraryExW. Cheat Engine will figure out the address for you.
_________________
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
mindoff
Advanced Cheater
Reputation: 0

Joined: 12 Jun 2016
Posts: 96

PostPosted: Mon Aug 07, 2017 9:19 am    Post subject: Reply with quote

How to figure out this address manually,not by cheat engine?

Need to know why and how behind CE does.
Back to top
View user's profile Send private message
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Wed Aug 09, 2017 7:27 pm    Post subject: Reply with quote

mindoff wrote:
How to figure out this address manually,not by cheat engine?

Need to know why and how behind CE does.


Call GetProcAddress (not sure if that's what CE does, but it should be):

Code:
FARPROC WINAPI GetProcAddress(
  _In_ HMODULE hModule,
  _In_ LPCSTR  lpProcName
);


the first parameter is a handle to the DLL module, the second is a string : the function name.

Return value : If the function succeeds, the return value is the address of the exported function or variable.

You can find many examples of its usage online.
Back to top
View user's profile Send private message
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