Jump to content

[MASM] Loading API's Dynamically


top10
 Share

Recommended Posts

[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]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

Chat Room

Chat Room

Chatroom Rules

No support in chat, open a thread.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.