|
555...不多说了...
虽然RadAsm出来已经很长时间料...
以前竟然米发现它竟然如此强大...
看来以后做工具就全靠它料...
- .386
- .model flat,stdcall
- option casemap:none
- include jaat.inc
- .code
- start:
- invoke GetModuleHandle,NULL
- mov hInstance,eax
- invoke GetCommandLine
- invoke InitCommonControls
- mov CommandLine,eax
- invoke WinMain,hInstance,NULL,CommandLine,SW_SHOWDEFAULT
- invoke ExitProcess,eax
- WinMain proc hInst:HINSTANCE,hPrevInst:HINSTANCE,CmdLine:LPSTR,CmdShow:DWORD
- LOCAL wc:WNDCLASSEX
- LOCAL msg:MSG
- mov wc.cbSize,sizeof WNDCLASSEX
- mov wc.style,CS_HREDRAW or CS_VREDRAW
- mov wc.lpfnWndProc,offset WndProc
- mov wc.cbClsExtra,NULL
- mov wc.cbWndExtra,DLGWINDOWEXTRA
- push hInst
- pop wc.hInstance
- mov wc.hbrBackground,COLOR_BTNFACE+1
- mov wc.lpszMenuName,IDM_MENU
- mov wc.lpszClassName,offset ClassName
- invoke LoadIcon,NULL,IDI_APPLICATION
- mov wc.hIcon,eax
- mov wc.hIconSm,eax
- invoke LoadCursor,NULL,IDC_ARROW
- mov wc.hCursor,eax
- invoke RegisterClassEx,addr wc
- invoke CreateDialogParam,hInstance,IDD_DIALOG,NULL,addr WndProc,NULL
- invoke ShowWindow,hWnd,SW_SHOWNORMAL
- invoke UpdateWindow,hWnd
- .while TRUE
- invoke GetMessage,addr msg,NULL,0,0
- .BREAK .if !eax
- invoke TranslateMessage,addr msg
- invoke DispatchMessage,addr msg
- .endw
- mov eax,msg.wParam
- ret
- WinMain endp
- WndProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
- mov eax,uMsg
- .if eax==WM_INITDIALOG
- push hWin
- pop hWnd
- .elseif eax==WM_COMMAND
- mov eax,wParam
- and eax,0FFFFh
- .if eax==IDM_FILE_EXIT
- invoke SendMessage,hWin,WM_CLOSE,0,0
- .elseif eax==IDM_HELP_ABOUT
- invoke ShellAbout,hWin,addr AppName,addr AboutMsg,NULL
- .endif
- ; .elseif eax==WM_SIZE
- .elseif eax==WM_CLOSE
- invoke DestroyWindow,hWin
- .elseif uMsg==WM_DESTROY
- invoke PostQuitMessage,NULL
- .else
- invoke DefWindowProc,hWin,uMsg,wParam,lParam
- ret
- .endif
- xor eax,eax
- ret
- WndProc endp
- end start
复制代码 |
|