2017-11-19 17:54:55 +01:00
|
|
|
|
;unz - <20><>ᯠ<EFBFBD><E1AFA0><EFBFBD>騪, <20>ᯮ<EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD>騩 archiver.obj. <20><><EFBFBD><EFBFBD><EFBFBD>ন<EFBFBD><E0A6A8><EFBFBD><EFBFBD> zip <20> 7z.
|
|
|
|
|
|
|
|
|
|
;unz [-o output path] [-f file for unpack] [-f ...] [-h] file.zip
|
|
|
|
|
;-h - hide GUI. If params is empty - do exit.
|
|
|
|
|
|
|
|
|
|
;unz -o /hd0/1/arci -f text1.txt file.zip -unpack in folder only file text1.txt
|
|
|
|
|
;or
|
|
|
|
|
;unz -o "/hd0/1/arci" -f "text1.txt" text2.txt "file.zip" -unpack in folder only file text1.txt and text2.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;<3B><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
;unz -n "namezone" "file.zip" - open packed file, write list files of main folder in namezone
|
|
|
|
|
;namezone:
|
|
|
|
|
;dd 0 - <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> 1
|
|
|
|
|
;dd cmd - 0 <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; 1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᯨ᮪ 䠩<><E4A0A9><EFBFBD>
|
|
|
|
|
; 2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<>
|
|
|
|
|
; 3 <20><>⠭<EFBFBD><E2A0AD><EFBFBD><EFBFBD><EFBFBD> ⥪<>訩 <20><>⠫<EFBFBD><E2A0AB> <20> <20><>娢<EFBFBD>
|
|
|
|
|
; 4 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠡ<><E0A0A1><EFBFBD>
|
|
|
|
|
;data - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; 1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᯨ᮪ 䠩<><E4A0A9><EFBFBD>
|
|
|
|
|
; input
|
|
|
|
|
; none
|
|
|
|
|
; output
|
|
|
|
|
; dd numfiles - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ 䠩<><E4A0A9><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20> ⥪<>饬 <20><>⠫<EFBFBD><E2A0AB><EFBFBD>
|
|
|
|
|
; strz file1...fileN - ᯨ᮪ <20><>ப, ࠧ<><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0
|
|
|
|
|
; 2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<>
|
|
|
|
|
; input
|
|
|
|
|
; dd num bytes
|
|
|
|
|
; strz filename (file1.txt of /fold1/file1.txt)
|
|
|
|
|
; output
|
|
|
|
|
; dd num bytes
|
|
|
|
|
; data
|
|
|
|
|
|
|
|
|
|
use32
|
|
|
|
|
org 0
|
|
|
|
|
db 'MENUET01'
|
|
|
|
|
dd 1, start, init_end, end_mem, stack_top, params, 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include 'lang.inc'
|
|
|
|
|
include '../../macros.inc'
|
|
|
|
|
include '../../proc32.inc'
|
|
|
|
|
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
|
|
|
|
include '../../dll.inc'
|
2018-11-07 18:45:36 +01:00
|
|
|
|
;include '../../debug.inc'
|
2017-11-19 17:54:55 +01:00
|
|
|
|
include 'debug.inc'
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
version equ '0.70'
|
|
|
|
|
version_dword equ 0*10000h + 70
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-02-16 00:18:43 +01:00
|
|
|
|
WIN_W = 400
|
2017-11-19 17:54:55 +01:00
|
|
|
|
SIZE_COPY_BUF = 1024*1024*2
|
2018-11-07 18:45:36 +01:00
|
|
|
|
MM_MAX_BLOCKS equ 1024
|
|
|
|
|
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
|
|
|
|
virtual at 0
|
|
|
|
|
kfar_info_struc:
|
|
|
|
|
.lStructSize dd ?
|
|
|
|
|
.kfar_ver dd ?
|
|
|
|
|
.open dd ?
|
|
|
|
|
.open2 dd ?
|
|
|
|
|
.read dd ?
|
|
|
|
|
.write dd ?
|
|
|
|
|
.seek dd ?
|
|
|
|
|
.tell dd ?
|
|
|
|
|
.flush dd ?
|
|
|
|
|
.filesize dd ?
|
|
|
|
|
.close dd ?
|
|
|
|
|
.pgalloc dd ?
|
|
|
|
|
.pgrealloc dd ?
|
|
|
|
|
.pgfree dd ?
|
|
|
|
|
.getfreemem dd ?
|
|
|
|
|
.pgalloc2 dd ?
|
|
|
|
|
.pgrealloc2 dd ?
|
|
|
|
|
.pgfree2 dd ?
|
|
|
|
|
.menu dd ?
|
|
|
|
|
.menu_centered_in dd ?
|
|
|
|
|
.DialogBox dd ?
|
|
|
|
|
.SayErr dd ?
|
|
|
|
|
.Message dd ?
|
|
|
|
|
.cur_console_size dd ?
|
|
|
|
|
end virtual
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
;-- CODE -------------------------------------------------------------------
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
|
|
|
|
include 'parse.inc'
|
|
|
|
|
include 'fs.inc'
|
2018-11-07 18:45:36 +01:00
|
|
|
|
include 'file_tree.inc'
|
|
|
|
|
include 'memory_manager.inc'
|
|
|
|
|
include 'dialogs.inc'
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
start:
|
2018-11-07 18:45:36 +01:00
|
|
|
|
;dnl
|
|
|
|
|
;dpsP params
|
|
|
|
|
;dnl
|
2017-11-19 17:54:55 +01:00
|
|
|
|
mcall 68, 11
|
|
|
|
|
mcall 40, 100111b + 0C0000000h
|
|
|
|
|
stdcall dll.Load, IMPORTS
|
|
|
|
|
test eax, eax
|
|
|
|
|
jnz exit
|
|
|
|
|
mov [pathOut],0
|
|
|
|
|
|
|
|
|
|
;----------------------------
|
|
|
|
|
;1. find input file, clear
|
|
|
|
|
;2. find -o, copy data, clear
|
|
|
|
|
;3. find -f, add pointer, copy data, clear
|
|
|
|
|
;4. find -c, check variable, clear
|
|
|
|
|
;1.
|
|
|
|
|
call getLastParam
|
|
|
|
|
test eax, eax
|
|
|
|
|
je wm_redraw
|
|
|
|
|
dec eax
|
|
|
|
|
je .arbeit
|
|
|
|
|
jmp errorParsing
|
|
|
|
|
|
|
|
|
|
.arbeit:
|
|
|
|
|
;2.
|
2018-11-07 18:45:36 +01:00
|
|
|
|
call getParamOutPath
|
2017-11-19 17:54:55 +01:00
|
|
|
|
cmp eax, 2
|
|
|
|
|
je errorParsing
|
|
|
|
|
|
|
|
|
|
;3.
|
|
|
|
|
|
|
|
|
|
@@:
|
|
|
|
|
mov eax, [iFiles]
|
|
|
|
|
shl eax, 2
|
|
|
|
|
add eax, files
|
|
|
|
|
m2m dword[eax], dword[endPointer]
|
|
|
|
|
stdcall getParam, '-f'
|
|
|
|
|
cmp eax, 2
|
|
|
|
|
je errorParsing
|
|
|
|
|
inc [iFiles]
|
|
|
|
|
cmp eax, 1
|
|
|
|
|
je @b
|
|
|
|
|
|
|
|
|
|
;4.
|
|
|
|
|
mov edi, params
|
|
|
|
|
mov ax,'-h'
|
|
|
|
|
@@: cmp word [edi], ax
|
|
|
|
|
je .check
|
|
|
|
|
inc edi
|
|
|
|
|
cmp edi, params+1024
|
|
|
|
|
je @f
|
|
|
|
|
cmp byte[edi],0
|
|
|
|
|
je @f
|
|
|
|
|
jmp @b
|
|
|
|
|
.check:
|
2018-11-07 18:45:36 +01:00
|
|
|
|
call startUnpack
|
|
|
|
|
mcall -1
|
2017-11-19 17:54:55 +01:00
|
|
|
|
@@:
|
2018-11-07 18:45:36 +01:00
|
|
|
|
|
2017-11-19 17:54:55 +01:00
|
|
|
|
stdcall [OpenDialog_Init],OpenDialog_data
|
|
|
|
|
|
|
|
|
|
;init edit fields --------------
|
|
|
|
|
xor al,al
|
|
|
|
|
mov edi,fInp
|
|
|
|
|
mov ecx,1024
|
|
|
|
|
repne scasb
|
|
|
|
|
inc ecx
|
|
|
|
|
mov eax,1024
|
|
|
|
|
sub eax,ecx
|
|
|
|
|
mov dword[edtPack.size],eax
|
|
|
|
|
mov dword[edtPack.pos],eax
|
|
|
|
|
|
|
|
|
|
xor al, al
|
|
|
|
|
mov edi, pathOut
|
|
|
|
|
mov ecx, 1024
|
|
|
|
|
repne scasb
|
|
|
|
|
inc ecx
|
|
|
|
|
mov eax, 1024
|
|
|
|
|
sub eax, ecx
|
|
|
|
|
mov dword[edtUnpPath.size], eax
|
|
|
|
|
mov dword[edtUnpPath.pos], eax
|
|
|
|
|
|
|
|
|
|
;main loop --------------------
|
|
|
|
|
wm_redraw:
|
|
|
|
|
call winRedraw
|
|
|
|
|
|
|
|
|
|
still:
|
|
|
|
|
mcall 10
|
|
|
|
|
cmp eax, 1
|
|
|
|
|
je wm_redraw
|
|
|
|
|
cmp eax, 2
|
|
|
|
|
je wm_key
|
|
|
|
|
cmp eax, 3
|
|
|
|
|
je wm_button
|
|
|
|
|
cmp eax, 6
|
|
|
|
|
je wm_mouse
|
|
|
|
|
|
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
wm_key:
|
|
|
|
|
mcall 2
|
|
|
|
|
cmp [bWinChild],0
|
|
|
|
|
jne still
|
|
|
|
|
|
|
|
|
|
stdcall [edit_box_key],edtPack
|
|
|
|
|
stdcall [edit_box_key],edtUnpPath
|
|
|
|
|
|
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wm_button:
|
|
|
|
|
mcall 17
|
|
|
|
|
cmp [bWinChild],0
|
|
|
|
|
jne still
|
|
|
|
|
|
|
|
|
|
cmp ah, 3
|
|
|
|
|
jne @f
|
|
|
|
|
call selectInput
|
|
|
|
|
jmp wm_redraw
|
|
|
|
|
@@:
|
|
|
|
|
cmp ah, 4
|
|
|
|
|
jne @f
|
|
|
|
|
call selectOutFold
|
|
|
|
|
jmp wm_redraw
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
cmp ah, 2
|
|
|
|
|
jne @f
|
2018-11-07 18:45:36 +01:00
|
|
|
|
mcall 51,1,startUnpack,stackUnpack
|
|
|
|
|
mov [bWinChild],1
|
|
|
|
|
;call startUnpack
|
2017-11-19 17:54:55 +01:00
|
|
|
|
jmp wm_redraw
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
cmp ah, 1
|
|
|
|
|
je exit
|
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
wm_mouse:
|
|
|
|
|
cmp [bWinChild],0
|
|
|
|
|
jne still
|
|
|
|
|
stdcall [edit_box_mouse],edtPack
|
|
|
|
|
stdcall [edit_box_mouse],edtUnpPath
|
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
exit:
|
|
|
|
|
mcall -1
|
|
|
|
|
|
|
|
|
|
errorParsing:
|
2018-11-07 18:45:36 +01:00
|
|
|
|
dph edx
|
|
|
|
|
|
|
|
|
|
dps ' errorParsing'
|
2017-11-19 17:54:55 +01:00
|
|
|
|
mcall -1
|
|
|
|
|
|
|
|
|
|
;--- functions ------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
proc winRedraw
|
|
|
|
|
mcall 12, 1
|
|
|
|
|
mcall 48, 3, sc, sizeof.system_colors
|
|
|
|
|
mov edx, [sc.work]
|
2018-02-16 00:18:43 +01:00
|
|
|
|
or edx, 0x34000000
|
|
|
|
|
mcall 0, <200,WIN_W>, <200,130>, , , title
|
|
|
|
|
mcall 8, <100,100>,<65,25>,2,[sc.work_button]
|
|
|
|
|
mcall 8, <(WIN_W-52),33>,<10,20>,3,[sc.work_button]
|
|
|
|
|
mcall 8, <(WIN_W-52),33>,<35,20>,4,[sc.work_button]
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
|
|
|
|
edit_boxes_set_sys_color edtPack,endEdits,sc
|
|
|
|
|
stdcall [edit_box_draw],edtPack
|
|
|
|
|
stdcall [edit_box_draw],edtUnpPath
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
|
2017-11-19 17:54:55 +01:00
|
|
|
|
cmp [redInput],0
|
|
|
|
|
jne @f
|
|
|
|
|
mov ecx,[sc.work_text]
|
|
|
|
|
or ecx,90000000h
|
|
|
|
|
jmp .l1
|
|
|
|
|
@@:
|
|
|
|
|
mov ecx,90FF0000h
|
|
|
|
|
.l1:
|
2018-02-16 00:18:43 +01:00
|
|
|
|
mcall 4, <15,16>, , strInp
|
2017-11-19 17:54:55 +01:00
|
|
|
|
mov ecx,[sc.work_text]
|
|
|
|
|
or ecx,90000000h
|
2018-02-16 00:18:43 +01:00
|
|
|
|
mcall 4, <15,37>, , strPath
|
2017-11-19 17:54:55 +01:00
|
|
|
|
mov ecx,[sc.work_button_text]
|
|
|
|
|
or ecx,90000000h
|
2018-02-16 00:18:43 +01:00
|
|
|
|
if lang eq ru
|
|
|
|
|
mcall 4, <107,70>, , strGo
|
|
|
|
|
else
|
|
|
|
|
mcall 4, <127,70>, , strGo
|
|
|
|
|
end if
|
|
|
|
|
mcall 4, <(WIN_W-47),12>, , strDots
|
|
|
|
|
mcall 4, <(WIN_W-47),37>, , strDots
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
|
|
|
|
mcall 12, 2
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;region
|
|
|
|
|
selectInput:
|
|
|
|
|
mov [OpenDialog_data.type],0
|
|
|
|
|
stdcall [OpenDialog_Start],OpenDialog_data
|
|
|
|
|
mov edi,ODAreaPath
|
|
|
|
|
xor al,al
|
|
|
|
|
or ecx,-1
|
|
|
|
|
repne scasb
|
|
|
|
|
sub edi,ODAreaPath
|
|
|
|
|
dec edi
|
|
|
|
|
mov dword[edtPack+12*4],edi
|
|
|
|
|
mov ecx,edi
|
|
|
|
|
inc ecx
|
|
|
|
|
mov edi,fInp
|
|
|
|
|
mov esi,ODAreaPath
|
|
|
|
|
rep movsb
|
|
|
|
|
mov [redInput],0
|
|
|
|
|
ret
|
|
|
|
|
;endregion
|
|
|
|
|
|
|
|
|
|
;region
|
|
|
|
|
selectOutFold:
|
|
|
|
|
mov [OpenDialog_data.type],2
|
|
|
|
|
stdcall [OpenDialog_Start],OpenDialog_data
|
|
|
|
|
mov edi,ODAreaPath
|
|
|
|
|
xor al,al
|
|
|
|
|
or ecx,-1
|
|
|
|
|
repne scasb
|
|
|
|
|
sub edi,ODAreaPath
|
|
|
|
|
dec edi
|
|
|
|
|
mov dword[edtUnpPath+12*4],edi
|
|
|
|
|
mov ecx,edi
|
|
|
|
|
inc ecx
|
|
|
|
|
mov edi,pathOut
|
|
|
|
|
mov esi,ODAreaPath
|
|
|
|
|
rep movsb
|
|
|
|
|
ret
|
|
|
|
|
;endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
allfiles dd 0
|
|
|
|
|
succfiles dd 0
|
|
|
|
|
numbytes dd 0
|
|
|
|
|
|
|
|
|
|
proc startUnpack
|
|
|
|
|
locals
|
|
|
|
|
paramUnp rd 1
|
|
|
|
|
sizeUnpack rd 1
|
|
|
|
|
hFile rd 1
|
|
|
|
|
hFileZip rd 1
|
|
|
|
|
hPlugin rd 1
|
|
|
|
|
pathFold rb 256
|
|
|
|
|
endl
|
|
|
|
|
;if input not corrected
|
|
|
|
|
cmp [fInp],byte 0
|
|
|
|
|
je .errNullInp
|
|
|
|
|
|
|
|
|
|
; mcall 68, 24, Exception, 0FFFFFFFFh ;??
|
|
|
|
|
;init plugin
|
|
|
|
|
push ebp
|
|
|
|
|
stdcall [aPluginLoad],kfar_info
|
|
|
|
|
pop ebp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;set current directory, create folder
|
|
|
|
|
cmp [pathOut],0
|
|
|
|
|
jne @f
|
|
|
|
|
lea eax,[pathFold]
|
|
|
|
|
stdcall cpLastName, fInp, eax
|
|
|
|
|
lea eax,[pathFold]
|
|
|
|
|
mov [fsNewDir.path],eax
|
|
|
|
|
mcall 70, fsNewDir
|
|
|
|
|
mov ecx, [fsNewDir.path]
|
|
|
|
|
|
|
|
|
|
mcall 30,4,,1
|
|
|
|
|
jmp .n
|
|
|
|
|
@@:
|
|
|
|
|
mcall 30,4,pathOut,1
|
|
|
|
|
.n:
|
|
|
|
|
|
|
|
|
|
;open and read first 1KB
|
|
|
|
|
stdcall open, fInp, O_READ
|
|
|
|
|
mov [hFileZip], eax
|
|
|
|
|
mcall 70,fsZip
|
|
|
|
|
test eax,eax
|
|
|
|
|
jnz .errNotFound
|
|
|
|
|
mcall 70,fsZipRead
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;open pack
|
|
|
|
|
push ebp
|
|
|
|
|
stdcall [aOpenFilePlugin],[hFileZip],bdvkPack,filedata_buffer,filedata_buffer_size ,0 ,0 , fInp
|
|
|
|
|
pop ebp
|
|
|
|
|
|
|
|
|
|
test eax,eax
|
|
|
|
|
jnz @f
|
|
|
|
|
cmp ebx,0 ;;/ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!!!!
|
|
|
|
|
je .errNotFound ;;<3B><><EFBFBD>祭<EFBFBD><E7A5AD> ebx <20><><EFBFBD><EFBFBD>祭<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>.
|
2018-11-07 18:45:36 +01:00
|
|
|
|
cmp ebx,400h
|
|
|
|
|
je .errNotSupp
|
2017-11-19 17:54:55 +01:00
|
|
|
|
@@:
|
|
|
|
|
mov [hPlugin],eax
|
|
|
|
|
|
|
|
|
|
;get num of all files
|
2018-11-07 18:45:36 +01:00
|
|
|
|
; stdcall calcSizeArch,[hPlugin]
|
|
|
|
|
push ebp
|
|
|
|
|
stdcall [aSetFolder],[hPlugin], .strRoot,0
|
|
|
|
|
pop ebp
|
2017-11-19 17:54:55 +01:00
|
|
|
|
;unpack
|
|
|
|
|
; void __stdcall GetFiles(HANDLE hPlugin, int NumItems, void* items[], void* addfile, void* adddir);
|
|
|
|
|
push ebp
|
|
|
|
|
stdcall [aGetFiles], [hPlugin], -1, 0, myAddFile, myAddDir
|
|
|
|
|
pop ebp
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
jmp @f
|
|
|
|
|
.str1 db '/LICENSE.txt',0
|
|
|
|
|
.strRoot db '.svn',0
|
|
|
|
|
@@:
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
|
|
|
|
;HANDLE __stdcall open(HANDLE hPlugin, const char* filename, int mode);
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<> filename. <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD> mode <20><>१<EFBFBD>ࢨ<E0A2A8><E0AEA2> <20> <20> ⥪<>饩 <20><><EFBFBD>ᨨ kfar <20>ᥣ<EFBFBD><E1A5A3> ࠢ<><E0A0A2> 1.
|
|
|
|
|
; push ebp
|
|
|
|
|
; stdcall [aOpen], [hPlugin], .str1, O_READ
|
|
|
|
|
; pop ebp
|
|
|
|
|
|
|
|
|
|
; mov [hFile],eax
|
|
|
|
|
;unsigned __stdcall read(HANDLE hFile, void* buf, unsigned size);
|
|
|
|
|
;<3B>⥭<EFBFBD><E2A5AD> size <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> buf <20><> 䠩<><E4A0A9> hFile, ࠭<><E0A0AD> <20><><EFBFBD><EFBFBD><EFBFBD>⮣<EFBFBD> <20><>१ open.
|
|
|
|
|
;size <20><><EFBFBD>⥭ 512 <20><><EFBFBD><EFBFBD>
|
|
|
|
|
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD><E9A0A5><EFBFBD> <20><><EFBFBD>祭<EFBFBD><E7A5AD>: <20><> <20><><EFBFBD><EFBFBD><EFBFBD>⠭<EFBFBD><E2A0AD><EFBFBD> <20><><EFBFBD><EFBFBD>, -1 <20><><EFBFBD> <20>訡<EFBFBD><E8A8A1>.
|
|
|
|
|
; push ebp
|
|
|
|
|
; stdcall [aRead], [hFile], copy_buf, SIZE_COPY_BUF
|
|
|
|
|
; pop ebp
|
|
|
|
|
;
|
|
|
|
|
; mcall 70, fsWrite
|
|
|
|
|
;void __stdcall close(HANDLE hFile);
|
|
|
|
|
push ebp
|
|
|
|
|
stdcall [aClose], [hFile]
|
|
|
|
|
mov [bWinChild],0
|
|
|
|
|
pop ebp
|
|
|
|
|
|
|
|
|
|
push ebp
|
|
|
|
|
stdcall [aClosePlugin], [hPlugin]
|
|
|
|
|
mov [bWinChild],0
|
|
|
|
|
|
|
|
|
|
mov [fsRunNotifyOK.param],strUnpackOk
|
|
|
|
|
mcall 70,fsRunNotifyOK
|
|
|
|
|
pop ebp
|
|
|
|
|
ret ;SUCCESS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.errNotFound:
|
|
|
|
|
; stdcall SimpleSayErr,strNotFound
|
|
|
|
|
mov [bWinChild],0
|
|
|
|
|
mov [fsRunNotifyOK.param],strUnpackFault
|
|
|
|
|
mcall 70,fsRunNotifyOK
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.errNotSupp:
|
|
|
|
|
mov eax,[fsNewDir.path]
|
|
|
|
|
mov [fsDelDir.path],eax
|
|
|
|
|
mcall 70, fsDelDir
|
|
|
|
|
|
|
|
|
|
mov [bWinChild],0
|
|
|
|
|
mov [fsRunNotifyOK.param],strUnpackFault
|
|
|
|
|
mcall 70,fsRunNotifyOK
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.errNullInp:
|
|
|
|
|
mov [redInput],1
|
|
|
|
|
mov [bWinChild],0
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
proc Exception param1:dword
|
|
|
|
|
stdcall SimpleSayErr,strErrorExc
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
proc debugInt3
|
|
|
|
|
dps '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!!!!!!!!!!!!!!!!!!!!!!!!!'
|
|
|
|
|
dnl
|
|
|
|
|
int3
|
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
allnumbytes dd 0
|
|
|
|
|
strBackFold db '../',0
|
|
|
|
|
|
2017-11-19 17:54:55 +01:00
|
|
|
|
proc calcSizeArch hPlugin:dword
|
|
|
|
|
locals
|
|
|
|
|
bdwk rb 560
|
2018-11-07 18:45:36 +01:00
|
|
|
|
num rd 1
|
2017-11-19 17:54:55 +01:00
|
|
|
|
endl
|
|
|
|
|
;int __stdcall ReadFolder(HANDLE hPlugin, unsigned dirinfo_start,
|
|
|
|
|
; unsigned dirinfo_size, void* dirdata);
|
2018-11-07 18:45:36 +01:00
|
|
|
|
mov [num],0
|
|
|
|
|
; int3
|
|
|
|
|
.mainloop:
|
2017-11-19 17:54:55 +01:00
|
|
|
|
push ebp
|
2018-11-07 18:45:36 +01:00
|
|
|
|
lea eax, [bdwk]
|
|
|
|
|
stdcall [aReadFolder], [hPlugin],[num],1,eax
|
2017-11-19 17:54:55 +01:00
|
|
|
|
pop ebp
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
cmp eax,6
|
|
|
|
|
je .lastFile
|
|
|
|
|
;??????????????????????????????????????????????????????????????????????????????????????????????????
|
|
|
|
|
lea ebx,[bdwk+0x20] ;<3B><>祬<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> ᬥ饭<E1ACA5><E9A5AD> +0x20 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⭮
|
|
|
|
|
test [ebx],dword 10h
|
|
|
|
|
jz @f
|
|
|
|
|
;bool __stdcall SetFolder(HANDLE hPlugin, const char* relative_path,
|
|
|
|
|
; const char* absolute_path);
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
push ebp
|
|
|
|
|
lea eax,[ebx+40]
|
|
|
|
|
dps 'Folder: '
|
|
|
|
|
dpsP eax
|
|
|
|
|
dnl
|
|
|
|
|
stdcall [aSetFolder],[hPlugin], eax,0
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
pop ebp
|
|
|
|
|
stdcall calcSizeArch, [hPlugin]
|
|
|
|
|
inc [num]
|
|
|
|
|
jmp .mainloop
|
|
|
|
|
@@:
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
lea ebx,[bdwk+0x20]
|
|
|
|
|
lea eax,[ebx+40]
|
|
|
|
|
dps 'File: '
|
|
|
|
|
dpsP eax
|
|
|
|
|
dnl
|
|
|
|
|
mov eax,[ebx+32]
|
|
|
|
|
add [allnumbytes],eax
|
|
|
|
|
inc [num]
|
|
|
|
|
jmp .mainloop
|
|
|
|
|
|
|
|
|
|
.lastFile:
|
|
|
|
|
; lea ebx,[bdwk+0x20]
|
|
|
|
|
; test [ebx],dword 10h
|
|
|
|
|
; jz @f
|
|
|
|
|
;
|
|
|
|
|
; push ebp
|
|
|
|
|
; lea eax,[ebx+40]
|
|
|
|
|
; stdcall [aSetFolder],[hPlugin], eax,0
|
|
|
|
|
; pop ebp
|
|
|
|
|
; stdcall calcSizeArch, [hPlugin]
|
|
|
|
|
; @@:
|
2018-02-18 13:39:19 +01:00
|
|
|
|
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
push ebp
|
|
|
|
|
stdcall [aSetFolder],[hPlugin], strBackFold,0
|
|
|
|
|
pop ebp
|
2017-11-19 17:54:55 +01:00
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
proc rec_calcSize hPlugin:dword
|
|
|
|
|
locals
|
|
|
|
|
bdwk rb 560
|
|
|
|
|
endl
|
|
|
|
|
;int __stdcall ReadFolder(HANDLE hPlugin, unsigned dirinfo_start,
|
|
|
|
|
; unsigned dirinfo_size, void* dirdata);
|
|
|
|
|
;bool __stdcall SetFolder(HANDLE hPlugin, const char* relative_path, const char* absolute_path);
|
|
|
|
|
push ebp
|
|
|
|
|
lea eax,[bdwk]
|
|
|
|
|
stdcall [aReadFolder], [hPlugin],1,560,eax
|
|
|
|
|
pop ebp
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
ret
|
|
|
|
|
endp
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
;-------------------------------------------------------------------------------
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
hTrPlugin dd 0
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
;eax - file struct for sys70
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
proc rdFoldforTree
|
|
|
|
|
locals
|
|
|
|
|
fi rd 0
|
|
|
|
|
endl
|
|
|
|
|
cmp [hTrPlugin],0
|
|
|
|
|
je .exit
|
|
|
|
|
push ebx edi esi
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
mov [fi],eax
|
|
|
|
|
push ebp
|
|
|
|
|
stdcall [aSetFolder],[hTrPlugin], [eax+20],0
|
|
|
|
|
mov ebp,[esp]
|
|
|
|
|
;hPlug,startBlock,numBlocks,buffer
|
|
|
|
|
stdcall [aReadFolder], [hTrPlugin],dword[eax+4],\
|
|
|
|
|
dword[eax+12],dword[eax+16]
|
|
|
|
|
pop ebp
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
;cmp eax,6
|
|
|
|
|
;je .lastFile
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
;lea ebx,[bdwk+0x20] ;<3B><>祬<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> ᬥ饭<E1ACA5><E9A5AD> +0x20 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⭮
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
pop esi edi ebx
|
2017-11-19 17:54:55 +01:00
|
|
|
|
.exit:
|
2018-11-07 18:45:36 +01:00
|
|
|
|
ret
|
2017-11-19 17:54:55 +01:00
|
|
|
|
endp
|
|
|
|
|
|
|
|
|
|
;-- DATA -------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sc system_colors
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bWinChild db 0 ;1 - <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ॠ<><E0A5A0><EFBFBD><E0AEA2><EFBFBD>
|
|
|
|
|
redInput db 0 ;1 - <20><><EFBFBD>ᢥ<EFBFBD><E1A2A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
if lang eq ru
|
2018-11-07 18:45:36 +01:00
|
|
|
|
title db 'uNZ v0.2 - <20><>ᯠ<EFBFBD><E1AFA0><EFBFBD>騪 Zip <20> 7z',0
|
2017-11-19 17:54:55 +01:00
|
|
|
|
strGo db '<27><>ᯠ<EFBFBD><E1AFA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
|
2018-02-16 00:18:43 +01:00
|
|
|
|
strInp db ' <20><>娢',0
|
|
|
|
|
strPath db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>',0
|
|
|
|
|
strError db '<27>訡<EFBFBD><E8A8A1>',0
|
|
|
|
|
strErrorExc db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>訡<EFBFBD><E8A8A1>',0
|
|
|
|
|
strOk db 'OK',0
|
|
|
|
|
strGetPass db '<27><><EFBFBD>',0
|
|
|
|
|
strCancel db '<27>⬥<EFBFBD><E2ACA5>',0
|
|
|
|
|
strUnpackOk db "'<27>ᯥ譮 <20><>ᯠ<EFBFBD><E1AFA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' -O",0
|
|
|
|
|
strUnpackFault db "'<27>訡<EFBFBD><E8A8A1> <20><>ᯠ<EFBFBD><E1AFA0><EFBFBD><EFBFBD><EFBFBD>' -E",0
|
|
|
|
|
strNotSupport db "'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ন<EFBFBD><E0A6A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ଠ<EFBFBD> <20><>娢<EFBFBD>' -E",0
|
|
|
|
|
strNotFound db "'<27><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' -E",0
|
2018-03-02 14:12:42 +01:00
|
|
|
|
else if lang eq es
|
2018-11-07 18:45:36 +01:00
|
|
|
|
title db 'uNZ v0.2 - Desarchivador para Zip y 7z',0
|
2018-03-02 14:12:42 +01:00
|
|
|
|
strGo db 'Desarchivar',0
|
|
|
|
|
strInp db 'Archivar',0
|
|
|
|
|
strPath db 'Extraer en',0
|
|
|
|
|
strError db 'Error',0
|
|
|
|
|
strErrorExc db 'Error desconocido',0
|
|
|
|
|
strOk db 'OK',0
|
|
|
|
|
strGetPass db 'Contrasena',0
|
|
|
|
|
strCancel db 'Cancelar',0
|
|
|
|
|
strUnpackOk db "'Extracion exitosa' -O",0
|
|
|
|
|
strUnpackFault db "'Fallo al extraer' -E",0
|
|
|
|
|
strNotSupport db "'El formato del archivo no es soportado' -E",0
|
|
|
|
|
strNotFound db "'Archivo no encontrado' -E",0
|
2017-11-19 17:54:55 +01:00
|
|
|
|
else
|
2018-11-07 18:45:36 +01:00
|
|
|
|
title db 'uNZ v0.2 - Unarchiver of Zip and 7z',0
|
2018-02-16 00:18:43 +01:00
|
|
|
|
strGo db 'Unpack',0
|
|
|
|
|
strInp db 'Archive',0
|
|
|
|
|
strPath db 'Extract to',0
|
2017-11-19 17:54:55 +01:00
|
|
|
|
strError db 'Error',0
|
|
|
|
|
strErrorExc db 'Unrecognized error',0
|
|
|
|
|
strOk db 'OK',0
|
2018-02-16 00:18:43 +01:00
|
|
|
|
strGetPass db 'Password',0
|
2017-11-19 17:54:55 +01:00
|
|
|
|
strCancel db 'Cancel',0
|
2018-02-16 00:18:43 +01:00
|
|
|
|
strUnpackOk db "'Unpacked successfuly' -O",0
|
2018-03-02 14:12:42 +01:00
|
|
|
|
strUnpackFault db "'Unprack failed' -E",0
|
2018-02-16 00:18:43 +01:00
|
|
|
|
strNotSupport db "'Archive format is not supported' -E",0
|
|
|
|
|
strNotFound db "'File not found' -E",0
|
2017-11-19 17:54:55 +01:00
|
|
|
|
end if
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
strDots db '...', 0
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
|
|
|
|
;--------
|
|
|
|
|
; int __stdcall SayErr(int num_strings, const char* strings[],
|
|
|
|
|
; int num_buttons, const char* buttons[]);
|
|
|
|
|
; int __stdcall DialogBox(DLGDATA* dlg);
|
|
|
|
|
|
|
|
|
|
stateDlg dd 0 ;0 - in process, 1 - button ok, 2 - button cancel
|
|
|
|
|
errmess0 dd strErrorExc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
kfar_info:
|
|
|
|
|
dd .size
|
|
|
|
|
dd version_dword
|
|
|
|
|
dd open
|
|
|
|
|
dd open2
|
|
|
|
|
dd read
|
|
|
|
|
dd -1 ; write: to be implemented
|
|
|
|
|
dd seek
|
|
|
|
|
dd tell
|
|
|
|
|
dd -1 ; flush: to be implemented
|
|
|
|
|
dd filesize
|
|
|
|
|
dd close
|
|
|
|
|
dd xpgalloc
|
|
|
|
|
dd xpgrealloc
|
|
|
|
|
dd pgfree
|
|
|
|
|
dd getfreemem
|
|
|
|
|
dd debugInt3;libini_alloc
|
|
|
|
|
dd debugInt3;libini_realloc
|
|
|
|
|
dd debugInt3;libini_free
|
|
|
|
|
dd debugInt3;menu
|
|
|
|
|
dd debugInt3;menu_centered_in
|
|
|
|
|
dd DialogBox;DialogBox
|
|
|
|
|
dd SayErr ;SayErr
|
|
|
|
|
dd debugInt3;Message
|
|
|
|
|
dd 0 ;cur_width
|
|
|
|
|
.size = $ - kfar_info
|
|
|
|
|
;--------
|
|
|
|
|
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
iFiles dd 0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ <20><>ᯠ<EFBFBD><E1AFA0><EFBFBD>뢠<EFBFBD><EBA2A0><EFBFBD><EFBFBD> 䠩<><E4A0A9><EFBFBD>
|
2017-11-19 17:54:55 +01:00
|
|
|
|
endPointer dd buffer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fsZip:
|
|
|
|
|
.cmd dd 5
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
.size dd 0
|
|
|
|
|
.buf dd bdvkPack
|
|
|
|
|
db 0
|
|
|
|
|
dd fInp
|
|
|
|
|
|
|
|
|
|
fsZipRead:
|
|
|
|
|
.cmd dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
.size dd 1024
|
|
|
|
|
.buf dd filedata_buffer
|
|
|
|
|
db 0
|
|
|
|
|
dd fInp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fsWrite:
|
|
|
|
|
.cmd dd 2 ;2 rewrite, 3 - write
|
|
|
|
|
.pos dd 0
|
|
|
|
|
.hpos dd 0
|
|
|
|
|
.size dd SIZE_COPY_BUF
|
|
|
|
|
.buf dd copy_buf
|
|
|
|
|
db 0
|
|
|
|
|
.path dd 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fsNewDir:
|
|
|
|
|
.cmd dd 9
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
db 0
|
|
|
|
|
.path dd 0
|
|
|
|
|
|
|
|
|
|
fsDelDir:
|
|
|
|
|
.cmd dd 8
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
dd 0
|
|
|
|
|
db 0
|
|
|
|
|
.path dd 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fsRunNotifyOK:
|
|
|
|
|
.cmd dd 7
|
|
|
|
|
dd 0
|
|
|
|
|
.param dd strUnpackOk
|
|
|
|
|
.size dd 0
|
|
|
|
|
.buf dd 0
|
|
|
|
|
db '/sys/@notify',0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-16 00:18:43 +01:00
|
|
|
|
edtPack edit_box (WIN_W-100-60),100,10,0FFFFFFh,0xff,0x80ff,0h,0x90000000,\
|
2021-06-07 23:45:46 +02:00
|
|
|
|
1024, fInp, 0,0,0,0
|
2018-02-16 00:18:43 +01:00
|
|
|
|
edtUnpPath edit_box (WIN_W-100-60),100,35,0FFFFFFh,0xff,0x80ff,0h,0x90000000,\
|
2021-06-07 23:45:46 +02:00
|
|
|
|
1024, pathOut, 0,0,0,0
|
|
|
|
|
edtPassword edit_box 200, 56, 40, 0FFFFFFh,0xff,0x80ff,0h,0x90000000,\
|
2021-06-21 00:37:20 +02:00
|
|
|
|
255, 0, 0, ed_focus+ed_always_focus ;+ed_pass
|
2021-06-07 23:45:46 +02:00
|
|
|
|
|
2017-11-19 17:54:55 +01:00
|
|
|
|
endEdits:
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
|
|
|
|
|
|
2017-11-19 17:54:55 +01:00
|
|
|
|
;-------------------------------------------------------------------------------
|
|
|
|
|
OpenDialog_data:
|
|
|
|
|
.type dd 0 ;0-open, 1-save, 2-select folder
|
|
|
|
|
.procinfo dd RBProcInfo ;+4
|
|
|
|
|
.com_area_name dd communication_area_name ;+8
|
|
|
|
|
.com_area dd 0 ;+12
|
|
|
|
|
.opendir_pach dd temp_dir_pach ;+16
|
|
|
|
|
.dir_default_pach dd communication_area_default_pach ;+20
|
|
|
|
|
.start_path dd open_dialog_path ;+24
|
|
|
|
|
.draw_window dd winRedraw ;+28
|
|
|
|
|
.status dd 0 ;+32
|
|
|
|
|
.openfile_pach dd ODAreaPath; ;+36
|
|
|
|
|
.filename_area dd 0; ;+40
|
|
|
|
|
.filter_area dd Filter
|
|
|
|
|
.x:
|
|
|
|
|
.x_size dw 420 ;+48 ; Window X size
|
|
|
|
|
.x_start dw 100 ;+50 ; Window X position
|
|
|
|
|
.y:
|
|
|
|
|
.y_size dw 320 ;+52 ; Window y size
|
|
|
|
|
.y_start dw 100 ;+54 ; Window Y position
|
|
|
|
|
|
|
|
|
|
communication_area_name:
|
|
|
|
|
db 'FFFFFFFF_open_dialog',0
|
|
|
|
|
open_dialog_path:
|
|
|
|
|
db '/sys/File managers/opendial',0
|
|
|
|
|
|
|
|
|
|
communication_area_default_pach:
|
|
|
|
|
db '/sys',0
|
|
|
|
|
|
|
|
|
|
Filter dd 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; int __stdcall ReadFolder(HANDLE hPlugin,
|
|
|
|
|
; unsigned dirinfo_start, unsigned dirinfo_size, void* dirdata);
|
|
|
|
|
; void __stdcall ClosePlugin(HANDLE hPlugin);
|
|
|
|
|
; bool __stdcall SetFolder(HANDLE hPlugin,
|
|
|
|
|
; const char* relative_path, const char* absolute_path);
|
|
|
|
|
; void __stdcall GetOpenPluginInfo(HANDLE hPlugin, OpenPluginInfo* info);
|
|
|
|
|
; void __stdcall GetFiles(HANDLE hPlugin, int NumItems, void* items[],
|
|
|
|
|
; void* addfile, void* adddir);
|
|
|
|
|
; bool __stdcall addfile(const char* name, void* bdfe_info, HANDLE hFile);
|
|
|
|
|
; bool __stdcall adddir(const char* name, void* bdfe_info);
|
|
|
|
|
; int __stdcall getattr(HANDLE hPlugin, const char* filename, void* info);
|
|
|
|
|
; HANDLE __stdcall open(HANDLE hPlugin, const char* filename, int mode);
|
|
|
|
|
; void __stdcall setpos(HANDLE hFile, __int64 pos);
|
|
|
|
|
; unsigned __stdcall read(HANDLE hFile, void* buf, unsigned size);
|
|
|
|
|
; void __stdcall close(HANDLE hFile);
|
|
|
|
|
IMPORTS:
|
|
|
|
|
library archiver, 'archiver.obj',\
|
|
|
|
|
box_lib ,'box_lib.obj',\
|
|
|
|
|
proc_lib,'proc_lib.obj'
|
|
|
|
|
|
|
|
|
|
import archiver,\
|
|
|
|
|
aPluginLoad , 'plugin_load',\
|
|
|
|
|
aOpenFilePlugin , 'OpenFilePlugin',\
|
|
|
|
|
aClosePlugin , 'ClosePlugin',\
|
|
|
|
|
aReadFolder , 'ReadFolder',\
|
|
|
|
|
aSetFolder , 'SetFolder',\
|
|
|
|
|
aGetFiles , 'GetFiles',\
|
|
|
|
|
aGetOpenPluginInfo , 'GetOpenPluginInfo',\
|
|
|
|
|
aGetattr , 'getattr',\
|
|
|
|
|
aOpen , 'open',\
|
|
|
|
|
aRead , 'read',\
|
|
|
|
|
aSetpos , 'setpos',\
|
|
|
|
|
aClose , 'close',\
|
|
|
|
|
aDeflateUnpack , 'deflate_unpack',\
|
|
|
|
|
aDeflateUnpack2 , 'deflate_unpack2'
|
|
|
|
|
|
|
|
|
|
import proc_lib,\
|
|
|
|
|
OpenDialog_Init ,'OpenDialog_init',\
|
|
|
|
|
OpenDialog_Start ,'OpenDialog_start'
|
|
|
|
|
import box_lib,\
|
2022-01-03 22:03:06 +01:00
|
|
|
|
edit_box_draw ,'edit_box_draw',\
|
2017-11-19 17:54:55 +01:00
|
|
|
|
edit_box_key ,'edit_box_key',\
|
|
|
|
|
edit_box_mouse ,'edit_box_mouse'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IncludeIGlobals
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
params1 db '-o "/hd0/1/unz/pig" -h "/hd0/1/unz/abc1"',0
|
2017-11-19 17:54:55 +01:00
|
|
|
|
;-- UDATA -----------------------------------------------------------------------------
|
|
|
|
|
init_end:
|
|
|
|
|
align 16
|
|
|
|
|
IncludeUGlobals
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
path rb 512
|
2017-11-19 17:54:55 +01:00
|
|
|
|
|
|
|
|
|
;params db 'unz -o "fil epar1" -f "arch1.txt" -f "ar ch2.txt" file1',0
|
|
|
|
|
;params db 'unz -o "fil epar1" -f arch1.txt -f "ar ch2.txt" file1',0
|
|
|
|
|
|
|
|
|
|
fInp rb 1024
|
2018-11-07 18:45:36 +01:00
|
|
|
|
pathOut rb 1024 ;<3B><><EFBFBD><EFBFBD>, <20>㤠 <20><>ᯠ<EFBFBD><E1AFA0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
2017-11-19 17:54:55 +01:00
|
|
|
|
files rd 256
|
|
|
|
|
|
|
|
|
|
fZipInfo rb 40
|
|
|
|
|
|
|
|
|
|
RBProcInfo rb 1024
|
|
|
|
|
temp_dir_pach rb 1024
|
|
|
|
|
ODAreaPath rb 1024
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;--------
|
|
|
|
|
|
|
|
|
|
copy_buf rb SIZE_COPY_BUF
|
|
|
|
|
|
|
|
|
|
execdata rb 1024
|
|
|
|
|
execdataend:
|
|
|
|
|
|
|
|
|
|
filedata_buffer_size = 1024
|
|
|
|
|
filedata_buffer rb filedata_buffer_size
|
|
|
|
|
|
|
|
|
|
CopyDestEditBuf rb 12+512+1
|
|
|
|
|
.length = $ - CopyDestEditBuf - 13
|
|
|
|
|
|
|
|
|
|
bdvkPack rb 560
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;------------ memory_manager.inc
|
|
|
|
|
align 4
|
|
|
|
|
MM_NBlocks rd 1 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ <20>뤥<EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
MM_BlocksInfo rd 2*MM_MAX_BLOCKS ;begin,size
|
|
|
|
|
|
|
|
|
|
|
2017-11-19 17:54:55 +01:00
|
|
|
|
;--------
|
|
|
|
|
|
2018-11-07 18:45:36 +01:00
|
|
|
|
buffer rb 4096 ;for string of file name for extract
|
2017-11-19 17:54:55 +01:00
|
|
|
|
params rb 4096
|
|
|
|
|
|
|
|
|
|
rb 1024
|
|
|
|
|
stackUnpack:
|
|
|
|
|
|
|
|
|
|
rb 1024
|
|
|
|
|
stackDlg:
|
|
|
|
|
|
|
|
|
|
rb 1024
|
|
|
|
|
stack_top:
|
|
|
|
|
|
|
|
|
|
end_mem:
|
|
|
|
|
|
|
|
|
|
|