Function at 0x402940
Capabilities:
Copy file
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x714
mov eax, dword [0x4130f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
cmp byte [esi], 0
mov dword [ebp - 0x66c], eax
mov dword [ebp - 0x664], edi
mov dword [ebp - 0x6dc], str.mxdesk.new
mov dword [ebp - 0x6d8], str.mxdesk.exe
mov dword [ebp - 0x6d4], str.mxdeskweb.new
mov dword [ebp - 0x6d0], str.mxdeskweb.exe
mov dword [ebp - 0x6cc], str.mxdeskstamp.new
mov dword [ebp - 0x6c8], str.mxdeskstamp.exe
mov dword [ebp - 0x6c4], str.mxtwain.new
mov dword [ebp - 0x6c0], str.mxtwain.exe
mov dword [ebp - 0x6bc], str.mxcrapp.new
mov dword [ebp - 0x6b8], str.mxcrapp.exe
mov dword [ebp - 0x6b4], str.mxdesk.dln
mov dword [ebp - 0x6b0], str.mxdesk.dll
mov dword [ebp - 0x6ac], str.mxaudio.dln
mov dword [ebp - 0x6a8], str.mxaudio.dll
mov dword [ebp - 0x6a4], str.pdfprintapi.dln
mov dword [ebp - 0x6a0], str.pdfprintapi.dll
mov dword [ebp - 0x69c], str.viewerocx.dln
mov dword [ebp - 0x698], str.viewerocx.dll
mov dword [ebp - 0x694], str.libcrypto_1_1.dll
mov dword [ebp - 0x690], 0x410898
mov dword [ebp - 0x68c], str.libssl_1_1.dll
mov dword [ebp - 0x688], 0x410878
mov dword [ebp - 0x684], str.msvcr100.dll
mov dword [ebp - 0x680], 0x410858
mov dword [ebp - 0x67c], edi
jne 0x402b38
push 0x104
lea ecx, [ebp - 0x23c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp - 0x65c]
push edx
lea eax, [ebp - 0x554]
push eax
lea ecx, [ebp - 0x344]
push ecx
lea edx, [ebp - 0x44c]
push edx
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.MSVCR100.dll__splitpath]
mov edi, dword [sym.imp.MSVCR100.dll_sprintf]
mov ebx, dword [sym.imp.MSVCR100.dll__chmod]
add esp, 0x14
xor esi, esi
mov eax, str.mxdesk.new
lea ebx, [ebx]
cmp byte [eax], 0x7e
lea edx, [ebp - 0x138]
jne 0x402ae1
mov ecx, dword [ebp - 0x66c]
inc eax
push eax
push ecx
push str._s_s
push edx
call edi
add esp, 0x10
jmp 0x402afb
push eax
lea eax, [ebp - 0x344]
push eax
lea ecx, [ebp - 0x44c]
push ecx
push str._s_s_s
push edx
call edi
add esp, 0x14
lea eax, [ebp - 0x138]
push 0x180
push eax
call ebx
add esp, 8
lea ecx, [ebp - 0x138]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp + esi*4 - 0x6d4]
add esi, 2
test eax, eax
jne 0x402ac0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040f020
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x674]
push edx
lea eax, [ebp - 0x714]
push eax
lea ecx, [ebp - 0x678]
push ecx
lea edx, [ebp - 0x670]
push edx
push str._d._d._d._d
push 0x410838
call dword [sym.imp.MSVCR100.dll_sscanf]
mov eax, dword [ebp - 0x670]
mov ecx, dword [ebp - 0x678]
mov ebx, dword [sym.imp.MSVCR100.dll_sprintf]
lea eax, [eax + eax*4]
lea edx, [ecx + eax*2]
imul edx, edx, 0x64
add edx, dword [ebp - 0x674]
lea eax, [ebp - 0x34]
push edx
push str._.5ld
push eax
call ebx
lea ecx, [ebp - 0x65c]
push ecx
lea edx, [ebp - 0x554]
push edx
lea eax, [ebp - 0x344]
push eax
lea ecx, [ebp - 0x44c]
push ecx
push esi
call dword [sym.imp.MSVCR100.dll__splitpath]
lea edx, [ebp - 0x1c]
push edx
push esi
call fcn.00401d30
add esp, 0x40
cmp byte [ebp - 0x1c], 0
je 0x402e18
mov esi, dword [sym.imp.MSVCR100.dll_atol]
lea eax, [ebp - 0x34]
push eax
call esi
lea ecx, [ebp - 0x1c]
push ecx
mov ebx, eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 8
mov dword [ebp - 0x660], eax
cmp ebx, 0x2ee0
jl 0x402ce7
cmp eax, 0x2ee0
jl 0x402c15
cmp ebx, 0x2ee0
jne 0x402ce7
cmp eax, ebx
jne 0x402d85
mov eax, str.standard.mxtema
xor esi, esi
mov dword [ebp - 0x710], eax
mov dword [ebp - 0x70c], str.brickbrown.mxtema
mov dword [ebp - 0x708], str.oldstyle.mxtema
mov dword [ebp - 0x704], str.azzurro.mxtema
mov dword [ebp - 0x700], str.avio.mxtema
mov dword [ebp - 0x6fc], str.verdeoliva.mxtema
mov dword [ebp - 0x6f8], str.blackwhite.mxtema
mov dword [ebp - 0x6f4], str.gray.mxtema
mov dword [ebp - 0x6f0], str.darkbrown.mxtema
mov dword [ebp - 0x6ec], str.unico_chiaro.mxtema
mov dword [ebp - 0x6e8], str.unico_scuro.mxtema
mov dword [ebp - 0x6e4], str.unico.mxtema
mov dword [ebp - 0x6e0], esi
push eax
lea edx, [ebp - 0x344]
push edx
lea eax, [ebp - 0x44c]
push eax
lea ecx, [ebp - 0x138]
push str._s_s_s
push ecx
call dword [sym.imp.MSVCR100.dll_sprintf]
lea edx, [ebp - 0x138]
push 0x180
push edx
call dword [sym.imp.MSVCR100.dll__chmod]
add esp, 0x1c
lea eax, [ebp - 0x138]
push eax
call edi
mov eax, dword [ebp + esi*4 - 0x70c]
inc esi
test eax, eax
jne 0x402c96
mov eax, dword [ebp - 0x660]
cmp ebx, 0x3390
jl 0x402d71
cmp eax, 0x3390
jl 0x402d06
cmp ebx, 0x3390
jne 0x402d71
cmp eax, ebx
jne 0x402d85
mov esi, dword [sym.imp.MSVCR100.dll_sprintf]
push str.userbuttonimage
lea ecx, [ebp - 0x344]
push ecx
lea edx, [ebp - 0x44c]
push edx
lea eax, [ebp - 0x138]
push str._s_s_s
push eax
call esi
lea ecx, [ebp - 0x138]
push ecx
call fcn.00401b20
push str.usermenuimage
lea edx, [ebp - 0x344]
push edx
lea eax, [ebp - 0x44c]
push eax
lea ecx, [ebp - 0x138]
push str._s_s_s
push ecx
call esi
lea edx, [ebp - 0x138]
push edx
call fcn.00401b20
mov eax, dword [ebp - 0x660]
add esp, 0x30
jmp 0x402d77
mov esi, dword [sym.imp.MSVCR100.dll_sprintf]
cmp ebx, 0x35e8
jge 0x402e12
jmp 0x402d8b
mov esi, dword [sym.imp.MSVCR100.dll_sprintf]
cmp eax, 0x35e8
jl 0x402e12
push 0x410898
lea eax, [ebp - 0x344]
push eax
lea ecx, [ebp - 0x44c]
push ecx
lea edx, [ebp - 0x23c]
push str._s_s_s
push edx
call esi
mov ebx, dword [sym.imp.MSVCR100.dll__chmod]
lea eax, [ebp - 0x23c]
push 0x180
push eax
call ebx
add esp, 0x1c
lea ecx, [ebp - 0x23c]
push ecx
call edi
push 0x410878
lea edx, [ebp - 0x344]
push edx
lea eax, [ebp - 0x44c]
push eax
lea ecx, [ebp - 0x23c]
push str._s_s_s
push ecx
call esi
lea edx, [ebp - 0x23c]
push 0x180
push edx
call ebx
add esp, 0x1c
lea eax, [ebp - 0x23c]
push eax
call edi
mov ebx, dword [sym.imp.MSVCR100.dll_sprintf]
xor esi, esi
mov dword [ebp - 0x668], esi
mov edi, str.mxdesk.new
cmp byte [edi], 0x7e
lea eax, [ebp - 0x23c]
jne 0x402e48
mov edx, dword [ebp - 0x66c]
lea ecx, [edi + 1]
push ecx
push edx
push str._s_s
push eax
call ebx
add esp, 0x10
jmp 0x402e62
push edi
lea ecx, [ebp - 0x344]
push ecx
lea edx, [ebp - 0x44c]
push edx
push str._s_s_s
push eax
call ebx
add esp, 0x14
mov ecx, dword [ebp + esi - 0x6d8]
push ecx
lea edx, [ebp - 0x344]
push edx
lea eax, [ebp - 0x44c]
push eax
lea ecx, [ebp - 0x138]
push str._s_s_s
push ecx
call ebx
mov esi, dword [sym.imp.MSVCR100.dll__chmod]
lea edx, [ebp - 0x23c]
push 0x180
push edx
call esi
lea eax, [ebp - 0x138]
push 0x180
push eax
call esi
add esp, 0x24
push 0
push 0x10000080
push 3
push 0
push 1
push 0x80000000
lea ecx, [ebp - 0x23c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402ef6
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
lea edx, [ebp - 0x138]
push edx
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40306e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x660], eax
cmp esi, 0xffffffff
je 0x402f46
mov ecx, str.msvcr100.dll
mov eax, edi
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402f30
test dl, dl
je 0x402f2c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402f30
add eax, 2
add ecx, 2
test dl, dl
jne 0x402f10
xor eax, eax
jmp 0x402f35
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x402f46
cmp dword [ebp - 0x660], 0x20
je 0x40306e
mov ecx, str.mxdesk.new
mov eax, edi
lea ecx, [ecx]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402f70
test dl, dl
je 0x402f6c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402f70
add eax, 2
add ecx, 2
test dl, dl
jne 0x402f50
xor eax, eax
jmp 0x402f75
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402fb6
mov ecx, str.mxdesk.dln
mov eax, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x402fa0
test dl, dl
je 0x402f9c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x402fa0
add eax, 2
add ecx, 2
test dl, dl
jne 0x402f80
xor eax, eax
jmp 0x402fa5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402fb6
cmp dword [ebp - 0x660], 2
je 0x40306e
cmp dword [ebp - 0x664], 0
jne 0x402fe4
push 0x400
call dword [sym.imp.MSVCR100.dll_malloc]
mov ecx, 0xa
mov esi, str.Errori_durante_laggiornamento_di_MxDesk_n_n
mov edi, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
add esp, 4
mov dword [ebp - 0x664], eax
movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x664]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402ff0
sub eax, edx
mov edi, eax
lea eax, [ebp - 0x23c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403004
sub eax, edx
mov edx, eax
lea eax, [ebp - 0x138]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403018
sub eax, esi
add eax, edx
mov edx, dword [ebp - 0x664]
lea ecx, [eax + edi + 0x19]
push ecx
push edx
call dword [sym.imp.MSVCR100.dll_realloc]
mov esi, eax
add esp, 8
mov dword [ebp - 0x664], esi
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403043
sub eax, ecx
lea ecx, [ebp - 0x138]
push ecx
mov ecx, dword [ebp - 0x660]
lea edx, [ebp - 0x23c]
push edx
push ecx
add eax, esi
push str._Error___ld__n_s_n_s_n
push eax
call ebx
add esp, 0x14
mov eax, dword [ebp - 0x668]
add eax, 2
lea esi, [eax*4]
mov edi, dword [ebp + esi - 0x6dc]
mov dword [ebp - 0x668], eax
test edi, edi
jne 0x402e25
push 0x413cb4
call fcn.00401810
push eax
lea edx, [ebp - 0x34]
push edx
push str.InstallMxi_desk
push str.Installazione
call fcn.0040ee60
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x664]
add esp, 0x14
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040f020
mov esp, ebp
pop ebp
ret