• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

ASM [MASM] Loading API's Dynamically

Status
Not open for further replies.

top10

Moderator
User
Joined
Mar 18, 2015
Messages
487
Reputation
0
Reaction score
5,047
Points
243
Credits
0
‎10 Years of Service‎
70%
[LENGUAJE=ASM].386

.model flat, stdcall

option casemap:none

include \masm32\include\windows.inc

include \masm32\include\kernel32.inc

includelib \masm32\lib\kernel32.lib

.data

Message db "Message",0

Box db "BoxA",0

sTest db "MessageBoxA API Call",0

sDemo db "Demo",0

sLib db "user32",0

.data?

hLib dd ?

Func dd ?

Result db ?

.code

start:

invoke lstrcat,addr Result,addr Message

invoke lstrcat,addr Result,addr Box

invoke LoadLibrary,addr sLib

mov hLib, eax

invoke GetProcAddress,hLib,addr Result

mov Func, eax

push 0

push offset sDemo

push offset sTest

push 0

call Func

invoke ExitProcess,0

end start[/LENGUAJE]

 
Status
Not open for further replies.
Back
Top