; ????????????????????????????????? .486 ; create 32 bit code .model flat, stdcall ; 32 bit memory model option casemap :none ; case sensitive ; include files; ~~~~~~~~~~~~~ include \masm32\include\windows.inc include \masm32\include\masm32.inc include \masm32\include\gdi32.inc include \masm32\include\user32.inc include \masm32\include\kernel32.inc include \masm32\include\Comctl32.inc include \masm32\include\comdlg32.inc include \masm32\include\shell32.inc include \masm32\include\oleaut32.inc include \masm32\macros\macros.asm include \masm32\include\dialogs.inc; libraries; ~~~~~~~~~ includelib \masm32\lib\masm32.lib includelib \masm32\lib\gdi32.lib includelib \masm32\lib\user32.lib includelib \masm32\lib\kernel32.lib includelib \masm32\lib\Comctl32.lib includelib \masm32\lib\comdlg32.lib includelib \masm32\lib\shell32.lib includelib \masm32\lib\oleaut32.lib DlgProc PROTO :DWORD,:DWORD,:DWORD,:DWORD ; ----------------------------- ; macros for displaying results ; ----------------------------- SBtext MACRO lpString invoke SendMessage,hStatus,SB_SETTEXT,255 or SBT_POPOUT,reparg(lpString) ENDM TBtext MACRO lpString invoke SetWindowText,FUNC(GetActiveWindow),reparg(lpString) ENDM EDtext MACRO lpString invoke SetWindowText,hEdit,reparg(lpString) ENDM EDclear equ <EDtext 0> .data? hWnd dd ? hInstance dd ? hStatus dd ? hEdit dd ? .code; ??????????????????????????????????start: mov hInstance, FUNC(GetModuleHandle,NULL) call main invoke ExitProcess,eax; ??????????????????????????????????main proc invoke InitCommonControls Dialog " ", \ ; caption "MS Sans Serif",10, \ ; font,pointsize WS_OVERLAPPED or \ ; styles for WS_SYSMENU or DS_CENTER, \ ; dialog window 4, \ ; number of controls 50,50,103,60, \ ; x y co-ordinates 1024 ; memory buffer size DlgButton "Get Key",WS_TABSTOP,5,17,40,13,101 DlgButton "Close",WS_TABSTOP,55,17,40,13,IDCANCEL DlgStatus 110 DlgEdit WS_TABSTOP or ES_WANTRETURN or ES_LEFT or WS_BORDER,5,5,90,10,111 CallModalDialog hInstance,0,DlgProc,NULL retmain endp; ??????????????????????????????????align 4DlgProc proc hWin:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD LOCAL hDC :DWORD LOCAL ps :PAINTSTRUCT LOCAL rct :RECT LOCAL crct :RECT LOCAL buffer1[1]:BYTE LOCAL buffer2[12]:BYTE LOCAL RESULT:DWORD STRING MainTitle,"KeyGen" Switch uMsg Case WM_INITDIALOG invoke SendMessage,hWin,WM_SETICON,1, FUNC(LoadIcon,NULL,IDI_ASTERISK) push hWin pop hWnd invoke SetWindowText,hWin,ADDR MainTitle mov hStatus, FUNC(GetDlgItem,hWnd,110) mov hEdit, FUNC(GetDlgItem,hWnd,111) invoke SendMessage,hEdit,WM_SETFONT, FUNC(GetStockObject,ANSI_FIXED_FONT),TRUE return 1 Case WM_COMMAND Switch wParam Case 101 MOV BYTE PTR buffer1, 00H MOV EAX, 0BH SET0: MOV BYTE PTR [buffer2+EAX], 00H DEC EAX CMP EAX,00H JNL SET0 PUSH 0 CALL GetDriveTypeA MOV BYTE PTR buffer1,AL PUSH 0 PUSH 0 PUSH 0 PUSH 0 PUSH 0 PUSH 0BH LEA EAX, buffer2 PUSH EAX PUSH 0 CALL GetVolumeInformationA LEA ESI,BYTE PTR buffer2 MOVZX ECX,BYTE PTR buffer1 XOR EDI,EDI runloop: MOV EAX,ECX MOV EBX,DWORD PTR DS:[ESI] MUL EBX ADD EDI,EAX DEC ECX CMP ECX,0 JNZ SHORT runloop XOR EDI,797A7553H ;Finish get key MOV RESULT, ustr$(EDI) EDtext RESULT Case IDCANCEL jmp quit_dialog Endsw Case WM_PAINT mov hDC, FUNC(BeginPaint,hWin,ADDR ps) invoke GetClientRect,hWin,ADDR rct invoke GetWindowRect,hStatus,ADDR crct mov eax, crct.bottom sub eax, crct.top sub rct.bottom, eax invoke DrawEdge,hDC,ADDR rct,EDGE_ETCHED,BF_RECT invoke EndPaint,hWin,ADDR ps Case WM_CLOSE quit_dialog: invoke EndDialog,hWin,0 Endsw xor eax, eax retDlgProc endp; ?????????????????????????????????end start
引用第12楼newton于2006-09-01 00:32发表的:没办法解压啊
引用第13楼木鱼于2006-09-01 00:34发表的:要copy /b masm32$rar.001.rar + masm32$rar.002.rar + masm32$rar.003.rar + masm32$rar.004.rar masm32.rar