www.pudn.com > ZtsFw.zip > ZtsFw.Asm
.386 .model flat, stdcall ;32 bit memory model option casemap :none ;case sensitive include common.inc include ZtsFw.inc .code start: invoke GetModuleHandle, NULL mov g_hInst, eax invoke _OpenDevice .if eax invoke DialogBoxParam, g_hInst, IDD_DIALOG1, NULL, addr DlgProc, NULL invoke InitCommonControls invoke _CloseDevice .else invoke MessageBox, NULL, offset szDrvError, offset szZtsFw, MB_OK + MB_ICONINFORMATION .endif invoke ExitProcess, 0 DlgProc proc uses ebx esi edi, hWnd:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM LOCAL buf[512] : BYTE LOCAL dwByteReturned mov eax, uMsg .if eax==WM_INITDIALOG invoke _Init, hWnd .elseif eax==WM_COMMAND mov eax, wParam and eax, 0ffffh .if eax==IDC_BTN_Exit invoke EndDialog, hWnd, 0 .elseif eax==IDC_BTN_AddPorts xor ebx, ebx lea esi, buf mov edi, offset g_Ports invoke GetDlgItemText, hWnd, IDC_PORTS, esi, sizeof buf @001: xor eax, eax push eax invoke sscanf, esi, offset szFormat, esp pop eax .if eax<=0FFFFh && ax!=0 && ebx