Guest User

Untitled

a guest
Oct 15th, 2012
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .model flat, stdcall        ; Simplified with Windows conventions, please.
  2.     .radix 16                   ; Hex by default, please.
  3.     option casemap :none        ; Case sensitive identifiers, please.
  4.  
  5.     ; Declarations of Windows API functions:
  6.                 extern  ExitProcess@4       : proc
  7.                 extern  MessageBoxW@16      : proc
  8.  
  9.     ; Declaration of this program's entry point symbol:
  10.                 public  start
  11.  
  12.     ; Data:
  13.     .const
  14. titleString     dw  0054, 0068, 0065, 0020, 006D, 0061, 0063, 0068, 0069, 006E, 0065
  15.                 dw  0020, 0063, 006F, 0064, 0065, 0020, 0073, 0061, 0079, 0073, 003A
  16.                 dw  0000
  17.  
  18. helloString     dw  0048, 0065, 006C, 006C, 006F, 002C, 0020, 0077, 006F, 0072, 006C
  19.                 dw  0064, 0021, 0009, 0000
  20.  
  21.     ; Main program:
  22.     .code
  23. start:
  24.                 ; Present a message box:
  25.                 db  68, 40, 00, 01, 00          ; push flags argument 00010040
  26.                 db  68                          ; push ...
  27.                 dd  offset titleString                  ; offset titleString
  28.                 db  68                          ; push ...
  29.                 dd  offset helloString                  ; offset helloString
  30.                 db  6A, 00                      ; push parent window handle, 0 = none.
  31.                 db  0E8                         ; call ...
  32.                 dd  (offset messageBoxJump) - ($ + 4)   ; MessageBox
  33.  
  34.                 ; Exit process:
  35.                 db  6A, 00                      ; push exit code argument, 0 = success.
  36.                 db  0E8                         ; call ...
  37.                 dd  (offset exitProcessJump) - ($ + 4)  ; ExitProcess
  38.  
  39. messageBoxJump:     jmp MessageBoxW@16
  40. exitProcessJump:    jmp ExitProcess@4
  41.     end
Advertisement
Add Comment
Please, Sign In to add comment