Guest User

Untitled

a guest
May 16th, 2015
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. format PE GUI 4.0 DLL
  2. include '%include%/win32a.inc'
  3.  
  4. entry DllMain
  5.  
  6. section '.data' data readable writeable
  7.  
  8. msgBoxText db "Hello, Java! I'm FASM.", 0
  9. msgBoxCaption db "HELLOJ.DLL", 0
  10.  
  11. section '.text' code readable executable
  12.  
  13. proc DllMain, hInst, dwReason, lpReserved
  14. mov eax, TRUE
  15. ret
  16. endp
  17.  
  18. proc Java_Program_showHello stdcall, jenv:DWORD, jcls:DWORD
  19. invoke MessageBox, HWND_DESKTOP, msgBoxText, msgBoxCaption, MB_OK
  20. ret
  21. endp
  22.  
  23. section '.idata' import data readable
  24.  
  25. library user32, 'USER32.DLL'
  26. import user32,\
  27. MessageBox, 'MessageBoxA'
  28.  
  29. section '.edata' export data readable
  30. export 'HELLOJ.DLL',\
  31. Java_Program_showHello, 'ShowHello'
  32.  
  33. section '.reloc' fixups data readable discardable
Advertisement
Add Comment
Please, Sign In to add comment