Код:
include "x.inc" ;Port W610 R6BC002 to W610 R6CA001 ;Добавить вопрос о замене файла (если имя файла уже существует) ;Работает для копирования/перемещения одного/нескольких файлов ;"Да" - заменить совпавший файл ;"Нет" - стандартное копир./перем. с изменеием имени файла на "имя файла (N)" ;При копир./перем. неск.файлов вопрос будет задан о каждом совпавшем ;Добавлены "Да, Все файлы" и "Нет, Все файлы" для копир./перем. неск.файлов ;(c) RaANdOoM ;(p) Heber?????® hook1 equ 0x44EEBE6C ;44EBBBA4 hook2 equ 0x44EEBEAE ;44EBBBE6 hook3 equ 0x44EEBF12 ;44EBBC4A hook4 equ 0x44EEC346 ;44EBC07E hook5 equ 0x44EEC380 ;44EBC0B8 hook6 equ 0x44EEC396 ;44EBC0CE hook7 equ 0x44EEC42A ;44EBC162 hook8 equ 0x44EFF49E ;44ECF182 hook9 equ 0x44EFF000 ;44ECECE4 body equ 0x45ac5270 ;45DBB5B0 loc_44EBBC38 = 0x44EEBF00 ;44EBBC38 loc_44EBC08A = 0x44EEC352 ;44EBC08A loc_44EBC0CE = 0x44EEC396 ;44EBC0CE loc_44EBC100 = 0x44EEC3C8 ;44EBC100 loc_44EBC174 = 0x44EEC43C ;44EBC174 loc_44ECF04A = 0x44EFF366 ;44ECF04A loc_44ECECFA = 0x44EFF016 ;44ECECFA loc_44ECECF0 = 0x44EFF00C ;44ECECF0 loc_44ECF18C = 0x44EFF4A8 ;44ECF18C loc_44EBBBF0 = 0x44EEBEB8 ;44EBBBF0 loc_44EBC0D8 = 0x44EEC3A0 ;44EBC0D8 sub_44E8FA08 = 0x44EBFECC ;44E8FA08 sub_44E8FB4C = 0x44EC0010 ;44E8FB4C loc_44EB8000 = 0x44EE82C8 ;44EB8000 sub_4535B120 = 0x45390178 ;4535B120 sub_442C5780 = 0x442C5A38 ;442C5780 sub_44E4F3AC = 0x44E7F870 ;44E4F3AC sub_4533DB2C = 0x45372B8C ;4533DB2C loc_4536BD98 = 0x453A0DF0 ;4536BD98 loc_45377C9C = 0x453ACCF4 ;45377C9C loc_45377D14 = 0x453ACD6C ;45377D14 loc_45377DF4 = 0x453ACE4C ;45377DF4 loc_4535B390 = 0x453903E8 ;4535B390 sub_442C5794 = 0x442C5A4C ;442C5794 sub_4533DCF4 = 0x45372D54 ;4533DCF4 org hook1 PUSH {R4-R7,LR} org hook2 LDR R3, off_44EBBBEC BLX R3 B loc_44EBBC38 off_44EBBBEC dw loc_45DBB5C6+1 org hook3 POP {R4-R7,PC} org hook4 B loc_44EBC08A org hook5 B loc_44EBC0CE org hook6 LDR R3, off_44EBC0D4 BLX R3 B loc_44EBC100 off_44EBC0D4 dw loc_45DBB5BC+1 org hook7 B loc_44EBC174 org hook8 LDR R3, off_44ECF188 BLX R3 B loc_44ECF04A off_44ECF188 dw loc_45DBB5B0+1 org hook9 LDR R0, off_44ECECEC BLX R0 B loc_44ECECFA B loc_44ECECF0 off_44ECECEC dw loc_45DBB942+1 org body loc_45DBB5B0: MOV R1, SP STRB R5, [R1,2] STRB R6, [R1,3] LDR R6, [R1,8] MOV R7, 2 B loc_45DBB5C8 loc_45DBB5BC: LDR R0, [R5,0x58] ADD R6, R4, 0 ADD R4, R5, 0 MOV R7, 1 B loc_45DBB5C8 loc_45DBB5C6: MOV R7, 0 loc_45DBB5C8: PUSH {R0-R7,LR} MOV R2, 0 LDR R1, [R0] LDR R0, [R0,4] LDR R3, off_45DBB964 BLX R3 CMP R0, 0 BMI loc_45DBB5E4 B loc_45DBB614 loc_45DBB5DA: var_58 = -0x58 LDR R0, [SP,0x58+var_58] LDR R1, [R0] LDR R0, [R0,4] LDR R3, off_45DBB968 BLX R3 loc_45DBB5E4: LDR R0, [SP,0x58+var_58] LDR R3, off_45DBB96C BLX R3 CMP R0, 0 BEQ loc_45DBB5F4 LDR R3, [SP,0x20] ADD R3, 6 STR R3, [SP,0x20] loc_45DBB5F4: var_44 = -0x44 var_40 = -0x40 CMP R7, 0 BEQ loc_45DBB60E CMP R7, 2 BEQ loc_45DBB606 LDR R7, [SP,0x10] STR R7, [SP,0x58+var_44] LDR R7, [SP,0x58+var_40] STR R7, [SP,0x10] B loc_45DBB60E loc_45DBB606: MOV R7, SP ADD R6, SP, 0x58+var_34 LDRB R6, [R6,3] STR R6, [R7,0x18] loc_45DBB60E: MOV R1, 0 ADD SP, SP, 8 POP {R2-R7,PC} loc_45DBB614: LDR R7, [SP,0x1C] CMP R7, 2 BEQ loc_45DBB62A LDR R4, [SP,0x10] LDR R0, [R4,0x14] CMP R0, 0 BEQ loc_45DBB63A LDR R3, off_45DBB970 BLX R3 STR R0, [R4,0x14] B loc_45DBB63A loc_45DBB62A: adr R1, aSameforall MOV R0, 0 LDR R3, off_45DBB974 BLX R3 CMP R0, 0xA BEQ loc_45DBB5DA CMP R0, 0xB BEQ loc_45DBB5E4 loc_45DBB63A: LDR R7, [SP,0x1C] LSL R7, R7, 2 adr R6, loc_45DBB8AC adr R5, loc_45DBB698 ADD R5, 1 MOV R3, 0 ADD R2, R5, R7 CMP R7, 8 BEQ loc_45DBB650 MOV R1, 8 B loc_45DBB652 loc_45DBB650: MOV R1, 0xC loc_45DBB652: ADD R1, R6, R1 ADD R0, R2, 2 PUSH {R0-R3} CMP R7, 8 BEQ loc_45DBB660 MOV R3, 6 B loc_45DBB662 loc_45DBB660: MOV R3, 0xA loc_45DBB662: ADD R3, R6, R3 LDR R2, [SP,0x68+var_40] ADD R1, R6, 4 BL sub_45DBB8BC PUSH {R0-R3} ADD R3, R6, 2 LDR R0, [SP,0x78+var_58] LDR R0, [R0] BL sub_45DBB8E2 ADD R2, R0, 0 ADD R1, R6, 0 MOV R0, 0 PUSH {R3} LDR R3, off_45DBB980 MOV R12, R3 POP {R3} BLX R12 ADD SP, SP, 0x20 CMP R7, 8 BEQ loc_45DBB6A4 STR R0, [R4,0x14] POP {R0-R7} MOV R0, 1 POP {R3-R7,PC} align 4 loc_45DBB698: B loc_45DBB7D6 B loc_45DBB7BE B loc_45DBB7E0 B loc_45DBB7CA B loc_45DBB7EC B loc_45DBB7EC loc_45DBB6A4: ADD R4, R0, 0 MOVL R1, 0xFC0 ADD R1, 5 MOV R2, 0 LDR R3, off_45DBB984 BLX R3 ADD R0, R4, 0 MOVL R1, 0xFC0 ADD R1, 5 MOV R2, 0xFF ADD R2, 0xAA LDR R3, off_45DBB988 BLX R3 ADD R0, R4, 0 MOVL R1, 0xFB0 ADD R1, 0xE MOV R2, 0 LDR R3, off_45DBB984 BLX R3 ADD R0, R4, 0 MOVL R1, 0xFB0 ADD R1, 0xE MOV R2, 0xFF ADD R2, 0xA9 LDR R3, off_45DBB988 BLX R3 ADD R0, R4, 0 MOV R1, 0 adr R2, unk_45DBB7F8 ADD R2, 1 LDR R3, off_45DBB984 BLX R3 ADD R0, R4, 0 MOV R1, 1 adr R2, loc_45DBB7AC ADD R2, 1 LDR R3, off_45DBB984 BLX R3 ADD R0, R4, 0 MOV R1, 0 MOV R2, 0xFF ADD R2, 0xAA LDR R3, off_45DBB988 BLX R3 ADD R0, R4, 0 MOV R1, 1 BL sub_45DBB8F6 LDR R3, off_45DBB988 BLX R3 ADD R0, R4, 0 MOV R1, 2 adr R2, loc_45DBB7EC ADD R2, 1 LDR R3, off_45DBB984 BLX R3 ADD R0, R4, 0 MOV R1, 3 adr R2, loc_45DBB798 ADD R2, 1 LDR R3, off_45DBB984 BLX R3 ADD R0, R4, 0 MOV R1, 2 MOV R2, 0xFF ADD R2, 0xA9 LDR R3, off_45DBB988 BLX R3 ADD R0, R4, 0 MOV R1, 3 BL sub_45DBB938 LDR R3, off_45DBB988 BLX R3 ADD R0, R4, 0 MOVL R1, 0xFC0 ADD R1, 5 MOV R2, 0 LDR R3, off_45DBB98C BLX R3 ADD R0, R4, 0 MOVL R1, 0xFC0 ADD R1, 5 MOV R2, 1 LDR R3, off_45DBB98C BLX R3 ADD R0, R4, 0 MOVL R1, 0xFB0 ADD R1, 0xE MOV R2, 2 LDR R3, off_45DBB98C BLX R3 ADD R0, R4, 0 MOVL R1, 0xFB0 ADD R1, 0xE MOV R2, 3 LDR R3, off_45DBB98C BLX R3 ADD R0, R4, 0 LDR R3, off_45DBB990 BLX R3 ADD R2, R4, 0 adr R1, aFileexistynqgu MOV R0, 0 LDR R3, off_45DBB994 BLX R3 POP {R0-R7} ADD SP, SP, 4 LDR R2, [SP,0x34+var_34] adr R1, aSp_regs MOV R0, 0 LDR R3, off_45DBB994 BLX R3 POP {R1-R7,PC} loc_45DBB798: PUSH {R0,R3-R7,LR} MOV R2, 0xB adr R1, aSameforall MOV R0, 0 LDR R3, off_45DBB994 BLX R3 LDR R0, [SP] ADD SP, SP, 4 B loc_45DBB7EE align 4 loc_45DBB7AC: PUSH {R0,R3-R7,LR} MOV R2, 0xA adr R1, aSameforall MOV R0, 0 LDR R3, off_45DBB994 BLX R3 LDR R0, [SP] ADD SP, SP, 4 B loc_45DBB7FA loc_45DBB7BE: PUSH {R4-R7,LR} MOV R5, 0 ADD R6, R0, 0 LDR R4, [R0,0x18] LDR R0, [R4,0x58] B loc_45DBB808 loc_45DBB7CA: PUSH {R4-R7,LR} MOV R5, 1 ADD R6, R0, 0 LDR R4, [R0,0x18] LDR R0, [R4,0x58] B loc_45DBB808 loc_45DBB7D6: PUSH {R4-R7,LR} MOV R5, 0 ADD R6, R0, 0 LDR R4, [R0,0x18] B loc_45DBB86C loc_45DBB7E0: PUSH {R4-R7,LR} MOV R5, 1 ADD R6, R0, 0 LDR R4, [R0,0x18] B loc_45DBB86C align 4 loc_45DBB7EC: PUSH {R3-R7,LR} loc_45DBB7EE: MOV R5, 2 MOVL R4, 0x2A0 ADD R4, R0, R4 B loc_45DBB816 unk_45DBB7F8 db 0xF8 db 0xB5 loc_45DBB7FA: MOV R5, 2 MOVL R4, 0x2A0 ADD R4, R0, R4 LDR R0, [R4] LDR R0, [R0,0x18] LDR R0, [R0,0x58] loc_45DBB808: MOV R2, 0 LDR R1, [R0] LDR R0, [R0,4] LDR R3, off_45DBB968 BLX R3 CMP R5, 2 BNE loc_45DBB86C loc_45DBB816: adr R1, aFileexistynqgu MOV R0, 0 LDR R3, off_45DBB974 BLX R3 LDR R3, off_45DBB970 BLX R3 adr R1, aYesforall_stri MOV R0, 0 LDR R3, off_45DBB974 BLX R3 LDR R3, off_45DBB998 BLX R3 adr R1, aNoforall_strid MOV R0, 0 LDR R3, off_45DBB974 BLX R3 LDR R3, off_45DBB998 BLX R3 LDR R0, [R4] LDR R0, [R0,0x18] LDR R0, [R0,0x58] LDR R3, off_45DBB96C BLX R3 ADD R7, R0, 0 SUB SP, SP, 8 adr R1, aSp_regs MOV R0, 0 LDR R3, off_45DBB974 BLX R3 STR R0, [SP] MOV R6, SP LDRB R5, [R6,2] LDRB R6, [R6,3] CMP R7, 0 BEQ loc_45DBB864 LDR R0, off_45DBB860 BX R0 off_45DBB860 dw loc_44ECF18C+1 loc_45DBB864: LDR R0, off_45DBB868 BX R0 off_45DBB868 dw loc_44ECF04A+1 loc_45DBB86C: LDR R0, [R4,0x14] LDR R3, off_45DBB970 BLX R3 STR R0, [R4,0x14] LDR R0, [R4,0x58] LDR R3, off_45DBB96C BLX R3 CMP R5, 1 BEQ loc_45DBB894 CMP R0, 0 BEQ loc_45DBB88C MOV R1, 0 LDR R0, off_45DBB888 BX R0 off_45DBB888 dw loc_44EBBBF0+1 loc_45DBB88C: LDR R0, off_45DBB890 BX R0 off_45DBB890 dw loc_44EBBC38+1 loc_45DBB894: ADD R5, R4, 0 ADD R4, R6, 0 CMP R0, 0 BEQ loc_45DBB8A4 LDR R0, off_45DBB8A0 BX R0 off_45DBB8A0 dw loc_44EBC0D8+1 loc_45DBB8A4: LDR R0, off_45DBB8A8 BX R0 off_45DBB8A8 dw loc_44EBC100+1 loc_45DBB8AC: LSL R3, R5, 1 LSL R5, R5, 2 LSL R1, R2, 1 LSL R7, R0, 3 LSL R5, R3, 2 LSL R4, R5, 2 LSL R6, R2, 1 LSL R0, R0, 0 sub_45DBB8BC: var_30 = -0x30 var_2C = -0x2C var_28 = -0x28 PUSH {R0-R7,LR} SUB SP, SP, 0xC MOVL R0, 0x670 ADD R0, 6 STR R0, [SP,0x30+var_30] ADD R0, 1 STR R0, [SP,0x30+var_28] MOVL R0, 0x78000000 ADD R0, 0xA STR R0, [SP,0x30+var_2C] MOV R2, 3 MOV R1, 5 MOV R0, SP LDR R3, off_45DBB97C BLX R3 ADD SP, SP, 0x10 POP {R1-R7,PC} sub_45DBB8E2: var_24 = -0x24 PUSH {R0-R7,LR} LDR R3, off_45DBB978 BLX R3 ADD R2, R0, 0 MOV R1, 0 LDR R0, [SP,0x24+var_24] LDR R3, off_45DBB97C BLX R3 ADD SP, SP, 4 POP {R1-R7,PC} sub_45DBB8F6: var_34 = -0x34 var_30 = -0x30 var_2C = -0x2C var_28 = -0x28 var_1C = -0x1C PUSH {R0-R7,LR} SUB SP, SP, 0x10 MOV R0, 0xFF ADD R0, 0xAA loc_45DBB8FE: STR R0, [SP,0x34+var_34] MOVL R0, 0x78000000 ADD R0, 0x20 STR R0, [SP,0x34+var_2C] ADD R0, 0xC STR R0, [SP,0x34+var_30] MOVL R0, 0x450 ADD R0, 8 STR R0, [SP,0x34+var_28] MOV R2, 4 MOV R1, 5 MOV R0, SP LDR R3, off_45DBB97C BLX R3 STR R0, [SP,0x34+var_1C] ADD R2, R0, 0 MOV R0, 0 LDR R1, [SP,0x34+var_34] CMP R1, 0xCF BEQ loc_45DBB92E adr R1, aYesforall_stri B loc_45DBB930 loc_45DBB92E: adr R1, aNoforall_strid loc_45DBB930: LDR R3, off_45DBB994 BLX R3 ADD SP, SP, 0x10 POP {R0-R7,PC} sub_45DBB938: PUSH {R0-R7,LR} SUB SP, SP, 0x10 MOV R0, 0xFF ADD R0, 0xA9 B loc_45DBB8FE loc_45DBB942: PUSH {LR} MOV R2, 0 adr R1, aSameforall MOV R0, 0 LDR R3, off_45DBB994 BLX R3 LDR R0, [R4] CMP R0, 0 BEQ loc_45DBB960 LDR R1, [R0,0x14] CMP R1, 0 BEQ loc_45DBB960 LDR R0, [SP] ADD R0, 2 STR R0, [SP] loc_45DBB960: POP {PC} align 4 off_45DBB964 dw sub_44E8FA08+1 off_45DBB968 dw sub_44E8FB4C+1 off_45DBB96C dw loc_44EB8000+1 off_45DBB970 dw sub_4535B120+1 off_45DBB974 dw sub_442C5780+1 off_45DBB978 dw sub_44E4F3AC+1 off_45DBB97C dw sub_4533DB2C+1 off_45DBB980 dw loc_4536BD98+1 off_45DBB984 dw loc_45377C9C+1 off_45DBB988 dw loc_45377D14+1 off_45DBB98C dw loc_45377DF4+1 off_45DBB990 dw loc_4535B390+1 off_45DBB994 dw sub_442C5794+1 off_45DBB998 dw sub_4533DCF4+1 aYesforall_stri db "YesForAll_strID",0 aNoforall_strid db "NoForAll_strID",0 db 0xFF aSameforall db "SameForAll",0 db 0xFF aFileexistynqgu db "FileExistYNQGUI",0 aSp_regs db "SP_Regs",0