Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Custum function to get procedure addresses

Started by Vortex, November 06, 2020, 02:14:56 AM

Previous topic - Next topic


A custom GetProcAddr function based on binary search :

include     \masm32\include64\

EXTERN      GetProcAddr:PROC


user32      db 'user32.dll',0
msgbox      db 'MessageBoxA',0


hDLL        dq ?


start PROC

    invoke  LoadLibrary,ADDR user32
    mov     hDLL,rax

    invoke  GetProcAddr,rax,ADDR msgbox
    cmp     rax,-1
    je      @f

    invoke  rax,0,"GetProcAddr test",\
    invoke  FreeLibrary,hDLL

    invoke  ExitProcess,0

start ENDP



Hi ,Vortex. It is very good. I will  work hard on  the code. Thank for you!