⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p2kman.asm

📁 这是一个多媒体播放软件. 这是一个多媒体播放软件. 这是一个多媒体播放软件.
💻 ASM
📖 第 1 页 / 共 5 页
字号:
p586
                model flat
locals @@
CODE            segment para public 'CODE' use32

                public start
start           proc near
                push    0
                call    GetModuleHandleA
                mov     Our_Handle, eax

                push    100h
                push    offset str_buf
                push    eax
                call    GetModuleFileNameA
                mov     ecx, eax
                mov     esi, offset str_buf
                mov     edi, esi
                sub     edi, 4
@@path_loop:
                cmp     byte ptr [esi], '.'
                jnz     @@next_char
                mov     edi, esi
@@next_char:
                inc     esi
                loop    @@path_loop
                mov     dword ptr [edi], 'ini.'
                push    offset str_buf
                push    offset ini_file
                call    lstrcpyA

                push    offset ini_file
                push    100h
                push    offset str_buf
                push    offset lng_English
                push    offset ini_Language
                push    offset ini_General
                call    GetPrivateProfileStringA

                push    offset str_buf
                push    offset lng_english
                call    lstrcmpA
                mov     esi, 100
                cmp     eax, 0
                jz      @@lng_ok

                push    offset str_buf
                push    offset lng_russian
                call    lstrcmpA
                mov     esi, 200
                cmp     eax, 0
                jz      @@lng_ok
                mov     esi, 100

@@lng_ok:
                mov     eax, 1
                add     eax, esi
                push    eax
                push    Our_Handle
                call    LoadMenuA
                mov     Menu_Handle, eax

                call    LoadStrings

                mov     eax, 1
                add     eax, esi
                push    0
                push    offset Dlg_Proc
                push    0
                push    eax
                push    Our_Handle
                call    DialogBoxParamA

                push    0
                call    ExitProcess
start           endp

Dlg_Proc  proc near

arg_0           = dword ptr  8
arg_4           = dword ptr  0Ch
arg_8           = dword ptr  10h
arg_C           = dword ptr  14h

                push    ebp
                mov     ebp, esp
                mov     eax, [ebp+arg_0]
                mov     Dlg_hwnd, eax
                mov     eax, [ebp+arg_4]

                cmp     eax, 112h
                jz      SysCommand   ; Proceed minimaze,restore and close events

                cmp     eax,400h
                jz      Tray_Event

                cmp     eax,402h
                jz      Dev_Notify

                cmp     eax, 110h
                jz      Dlg_Init     ; Initialize

                cmp     eax, 111h
                jz      Dlg_Command  ; Proceed DLG events

                cmp     eax,4Eh
                jz      WM_NOTIFY    ; Proceed mouse or kbd events on window
dlg_default:
                xor     eax, eax
                leave
                retn    10h

dlg_exit:
                mov    eax,1
                leave
                retn    10h

;------------------------------------
;------------------------------------
;------------------------------------
SysCommand: ; Proceed minimaze,restore and close events
                mov    eax, [ebp+arg_8]
                cmp    eax, 0F060h ;SC_Close
                jz     Dlg_close
                cmp    eax, 0F020h ;SC_Minimize
                jz     Minimize
                jmp    dlg_default
Minimize:
                push   0           ; Hide
                push   [ebp+arg_0]
                call   ShowWindow

                push    offset Tray_Struc
                push    0               ; Msg_ID - 0 - add
                call    Shell_NotifyIconA

                jmp    dlg_exit
;------------------------------------
Tray_Event:
                cmp     [ebp+arg_C], 202h ; LButtonUp (205 - RButt)
                jnz     dlg_exit
                push   1                ;Shownormal
                push   [ebp+arg_0]
                call   ShowWindow

                push    offset Tray_Struc
                push    2               ; Msg_ID - 2 - del
                call    Shell_NotifyIconA

                jmp    dlg_exit





;-----------------------------------
;-----------------------------------
;-----------------------------------
;-----------------------------------
;-----------------------------------

Dlg_Command:   ; Proceed DLG events
                mov     eax, [ebp+arg_8]

                cmp     eax, 1001
                jz      bt_List

                cmp     eax, 1007
                jz      bt_suspend

                cmp     eax, 1003
                jz      bt_restart

                cmp     eax, 1002
                jz      bt_upload

                cmp     eax, 1006
                jz      bt_delete

                cmp     eax, 1102
                jz      bt_delete

                cmp     eax, 1101
                jz      bt_download

                cmp     eax, 1005
                jz      bt_download

                cmp     eax, 1004
                jz      bt_about

                cmp     eax, 1011
                jz      bt_dlseem

                cmp     eax, 1012
                jz      bt_ulseem

                cmp     eax, 1016
                jz      bt_attr

                cmp     eax, 1020
                jz      bt_autoupd

                cmp     eax, 1021
                jz      bt_rings

                jmp    dlg_exit

bt_List:
                cmp     DevFound, 1
                jnz     no_dev
                push    [ebp+arg_0]
                call    ListP2K

                jmp    dlg_exit

bt_suspend:
                cmp     DevFound, 1
                jnz     no_dev
                call   P2K_Suspend
                jmp    dlg_exit

bt_restart:
                cmp     DevFound, 1
                jnz     no_dev
                call   P2K_Restart
                jmp    dlg_exit


bt_upload:
                cmp     DevFound, 1
                jnz     no_dev
                push   [ebp+arg_0]
                call   Upload
                jmp    dlg_exit

bt_about:
                push   0
                push   offset str_about_title
                push   offset str_about
                push   [ebp+arg_0]
                call   MessageBoxA
                jmp    dlg_exit

bt_download:
                cmp     DevFound, 1
                jnz     no_dev
                push   [ebp+arg_0]
                call   Download
                jmp    dlg_exit


bt_delete:
                cmp     DevFound, 1
                jnz     no_dev
                push   [ebp+arg_0]
                call   Delete
                jmp    dlg_exit

bt_dlseem:
                cmp     DevFound, 1
                jnz     no_dev
                push   [ebp+arg_0]
                call   Read_Seem
                jmp    dlg_exit

bt_ulseem:
                cmp     DevFound, 1
                jnz     no_dev
                push   [ebp+arg_0]
                call   Write_Seem
                jmp    dlg_exit

bt_attr:
                cmp     DevFound, 1
                jnz     no_dev
                push   [ebp+arg_0]
                call   ChangeAttrib
                jmp    dlg_exit
no_dev:
                push   offset str_nodev
                call   logstat
                jmp    dlg_exit


bt_autoupd:
                xor    eax, eax
                cmp    AutoUpd, 1
                setnz  al
                mov    AutoUpd, eax
                jmp    dlg_exit

bt_rings:
                cmp     DevFound, 1
                jnz     no_dev
                call   RingTonesUpdate
                jmp    dlg_exit

;-----------------------------------
;-----------------------------------
;-----------------------------------
;-----------------------------------
;-----------------------------------


Dlg_Init:
                push    esi
                push    edi
                push    edx
                push    ecx
                mov     eax, [ebp+arg_0]
                mov     Tray_Wnd_Handle, eax

                push    101
                push    Our_Handle
                call    LoadIconA
                mov     Tray_IconHandle, eax

                push    eax
                push    1
                push    80h ; WM_SETICON
                push    [ebp+arg_0]
                call    SendMessageA

; Create List Header(Columns)
                mov     lv_Col_Mask, 0Fh
                mov     esi, offset Tbl_Cols
@@col_loop:
                mov     ecx, [esi+4]
                mov     edx, [esi]
                mov     lv_Col_Size, ecx
                mov     lv_Col_Text, edx
                lea     eax, lv_Col_Mask
                push    eax
                push    edi
                push    101Bh           ; insert_col
                push    3F0h
                push    [ebp+arg_0]
                call    SendDlgItemMessageA
                add     esi, 0Ch
                inc     edi
                cmp     esi, offset col_list_end
                jl      short @@col_loop

; Set Tbl sttyle
                push    21h
                push    21h             ; fullrowselect
                push    1036h           ; set extended style
                push    3F0h
                push    [ebp+arg_0]
                call    SendDlgItemMessageA
; create imagelist

                push    0
                push    3
                push    0FEh
                push    10h
                push    10h
                call    ImageList_Create

                push    0Fh
                mov     esi, eax
                call    GetSysColor

                push    eax
                push    esi
                call    ImageList_SetBkColor

                push    1000h
                push    10h
                push    10h
                push    1
                push    202
                push    Our_Handle
                call    LoadImageA

                push    eax
                push    0FFFFFFFFh
                push    esi
                call    ImageList_ReplaceIcon

                push    1000h
                push    10h
                push    10h
                push    1
                push    203
                push    Our_Handle
                call    LoadImageA

                push    eax
                push    0FFFFFFFFh
                push    esi
                call    ImageList_ReplaceIcon

                push    1000h
                push    10h
                push    10h
                push    1
                push    204
                push    Our_Handle
                call    LoadImageA

                push    eax
                push    0FFFFFFFFh
                push    esi
                call    ImageList_ReplaceIcon

                push    esi
                push    1
                push    1003h           ; SetImageList
                push    3F0h
                push    [ebp+arg_0]
                call    SendDlgItemMessageA

                push    0FFFFFFh
                push    esi
                call    ImageList_SetBkColor

                push    0
                push    offset str_hexdw
                push    offset str_buf
                call    wsprintfA
                add     esp, 0Ch

                push    offset str_buf
                push    1009
                push    [ebp+arg_0]
                call    SetDlgItemTextA

                push    300h
                push    offset str_hexdw
                push    offset str_buf
                call    wsprintfA
                add     esp, 0Ch

                push    offset str_buf
                push    1010
                push    [ebp+arg_0]
                call    SetDlgItemTextA

                push    offset Thread_ID
                push    0
                push    0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -