Function at 0x406be0
Capabilities:
Delete file
Download url
Get file size
Read file on windows
Receive data

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1808
call fcn.0040e6e0
mov eax, dword [0x4130f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push 0x7ff
mov dword [ebp - 0x17e8], eax
lea eax, [ebp - 0x1297]
push 0
push eax
mov dword [ebp - 0x17fc], ecx
mov dword [ebp - 0x17ec], ebx
mov dword [ebp - 0x1808], edx
mov byte [ebp - 0x1298], 0
call sub.MSVCR100.dll_memset
push 0xff
lea ecx, [ebp - 0x38f]
push 0
push ecx
mov byte [ebp - 0x390], 0
call sub.MSVCR100.dll_memset
push 0xff
lea edx, [ebp - 0x103]
push 0
push edx
mov byte [ebp - 0x104], 0
call sub.MSVCR100.dll_memset
push 8
mov byte [ebp - 0x794], 0
mov byte [ebx], 0
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
add esp, 0x28
test eax, eax
je 0x406c99
mov dword [eax], vtable.UrlDownloadCallback.1.0
mov dword [eax + 4], vtable.UrlDownloadCallback.0
mov dword [ebp - 0x17e4], eax
jmp 0x406ca3
mov dword [ebp - 0x17e4], 0
push 0x104
lea eax, [ebp - 0x898]
push 0
push eax
call sub.MSVCR100.dll_memset
mov edx, dword [0x41396c]
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x898]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x1398]
push eax
lea ecx, [ebp - 0xa98]
push ecx
lea edx, [ebp - 0x998]
push edx
lea eax, [ebp - 0x1800]
push eax
lea ecx, [ebp - 0x898]
push ecx
call dword [sym.imp.MSVCR100.dll__splitpath]
mov ebx, dword [sym.imp.MSVCR100.dll_sprintf]
lea edx, [ebp - 0x998]
push edx
lea eax, [ebp - 0x1800]
push eax
lea ecx, [ebp - 0x104]
push str._s_s__tmp__.tmp
push ecx
call ebx
push 0x413cb4
call fcn.00401810
push eax
push 0xff
lea edx, [ebp - 0x390]
push edx
push 0x4104e4
push str.ServerAspService
push str.AspService
call fcn.00401980
add esp, 0x40
cmp byte [ebp - 0x390], 0
jne 0x406d6a
lea edx, [ebp - 0x390]
mov eax, edi
sub edx, edi
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x406d60
mov eax, dword [ebp - 0x17fc]
mov ecx, dword [ebp - 0x17e8]
push esi
push eax
push ecx
lea edx, [ebp - 0x390]
push edx
lea eax, [ebp - 0x1298]
push str._s_AspService.aspx_ServizioQueryLoginVersione01000SOwindowsLogin_sPassword_sDominio_s
push eax
call ebx
add esp, 0x18
lea ecx, [ebp - 0x1298]
push ecx
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntry]
mov edx, dword [ebp - 0x17e4]
push edx
push 0
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0x1298]
push ecx
push 0
call sub.urlmon.dll_URLDownloadToFileA
test eax, eax
jne 0x4072c5
push eax
push 0x10000080
push 3
push eax
push 3
push 0xc0000000
lea edx, [ebp - 0x104]
push edx
mov dword [ebp - 0x17dc], eax
mov byte [ebp - 0x179c], al
mov byte [ebp - 0x188], al
mov byte [ebp - 0x20c], al
mov byte [ebp - 0x290], al
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp - 0x17f4], ebx
cmp ebx, 0xffffffff
je 0x407260
lea eax, [ebp - 0x1804]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
xor edi, edi
push edi
lea ecx, [ebp - 0x17f0]
push ecx
push esi
push eax
push ebx
mov dword [ebp - 0x17e0], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40719a
cmp dword [ebp - 0x17f0], esi
jne 0x40719a
lea edx, [ebp - 0x179c]
lea eax, [ebp - 0x290]
mov dword [ebp - 0x17d4], edx
mov dword [ebp - 0x17c8], eax
mov eax, 0x80
mov ebx, str._errore_titolo_
lea ecx, [ebp - 0x20c]
lea edx, [ebp - 0x188]
mov dword [ebp - 0x17d8], ebx
mov dword [ebp - 0x17d0], 0x400
mov dword [ebp - 0x17cc], str.IDCliente_
mov dword [ebp - 0x17c4], eax
mov dword [ebp - 0x17c0], str.IDUser_
mov dword [ebp - 0x17bc], ecx
mov dword [ebp - 0x17b8], eax
mov dword [ebp - 0x17b4], str.IDInstallazione_
mov dword [ebp - 0x17b0], edx
mov dword [ebp - 0x17ac], eax
mov dword [ebp - 0x17a8], edi
mov dword [ebp - 0x17a4], edi
mov dword [ebp - 0x17a0], edi
mov dword [ebp - 0x17f8], edi
lea esp, [esp]
mov eax, dword [ebp - 0x17e0]
push ebx
push eax
call dword [sym.imp.MSVCR100.dll_strstr]
mov esi, eax
add esp, 8
test esi, esi
je 0x406f51
mov eax, ebx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406f10
sub eax, edx
add esi, eax
push 0x22
push esi
call dword [sym.imp.MSVCR100.dll_strchr]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x406f51
sub eax, esi
cmp eax, dword [ebp + edi - 0x17d0]
jg 0x406f51
mov edi, dword [ebp + edi - 0x17d4]
push eax
push esi
push edi
call dword [sym.imp.MSVCR100.dll_strncpy]
add esp, 0xc
sub edi, esi
mov byte [edi + ebx], 0
mov edi, dword [ebp - 0x17f8]
inc edi
mov dword [ebp - 0x17f8], edi
lea edi, [edi + edi*2]
add edi, edi
add edi, edi
mov ebx, dword [ebp + edi - 0x17d8]
test ebx, ebx
jne 0x406ef0
cmp byte [ebp - 0x179c], bl
je 0x407162
xor eax, eax
mov edi, edi
mov cl, byte [ebp + eax - 0x179c]
mov byte [ebp + eax - 0x794], cl
inc eax
test cl, cl
jne 0x406f80
mov ebx, dword [ebp - 0x17f4]
mov ecx, dword [ebp - 0x17e0]
push ecx
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp byte [ebp - 0x794], 0
jne 0x407310
mov eax, dword [ebp - 0x17dc]
test eax, eax
jne 0x407287
mov edx, dword [ebp - 0x17fc]
mov esi, dword [sym.imp.MSVCR100.dll_sprintf]
lea eax, [ebp - 0x188]
push eax
mov eax, dword [ebp - 0x17e8]
lea ecx, [ebp - 0x20c]
push ecx
push edx
push eax
lea ecx, [ebp - 0x290]
push ecx
lea edx, [ebp - 0x390]
push edx
lea eax, [ebp - 0x1298]
push str._s_AspService.aspx_ServizioCreaTokenVersione01000IDCliente_sLogin_sPassword_sIDUser_sIDInstallazione_sszAziendaIDComando0
push eax
call esi
add esp, 0x20
lea ecx, [ebp - 0x1298]
push ecx
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntry]
mov edx, dword [ebp - 0x17e4]
push edx
push 0
lea eax, [ebp - 0x104]
push eax
lea ecx, [ebp - 0x1298]
push ecx
push 0
call sub.urlmon.dll_URLDownloadToFileA
test eax, eax
jne 0x407213
push eax
push 0x10000080
push 3
push eax
push 3
push 0xc0000000
lea edx, [ebp - 0x104]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x407260
lea eax, [ebp - 0x1804]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
call dword [sym.imp.MSVCR100.dll_malloc]
add esp, 4
push 0
lea ecx, [ebp - 0x17f0]
push ecx
mov edi, eax
push esi
push edi
push ebx
mov dword [ebp - 0x17e0], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4071c8
cmp dword [ebp - 0x17f0], esi
jne 0x4071c8
push str.token_valore_
push edi
call dword [sym.imp.MSVCR100.dll_strstr]
mov esi, eax
add esp, 8
test esi, esi
je 0x407108
add esi, 0xe
push 0x22
push esi
call dword [sym.imp.MSVCR100.dll_strchr]
mov edi, eax
add esp, 8
test edi, edi
je 0x407108
mov eax, dword [ebp - 0x17ec]
mov edx, edi
sub edx, esi
push edx
push esi
push eax
call dword [sym.imp.MSVCR100.dll_strncpy]
mov ecx, dword [ebp - 0x17ec]
add esp, 0xc
sub ecx, esi
mov byte [ecx + edi], 0
mov edx, dword [ebp - 0x17ec]
cmp byte [edx], 0
jne 0x4071ed
mov eax, dword [str.Nuovo_token_non_trovato]
mov ecx, dword [0x410df4]
mov edx, dword [0x410df8]
mov dword [ebp - 0x794], eax
mov eax, dword [0x410dfc]
mov dword [ebp - 0x790], ecx
mov ecx, dword [0x410e00]
mov dword [ebp - 0x78c], edx
mov edx, dword [0x410e04]
mov dword [ebp - 0x788], eax
mov dword [ebp - 0x784], ecx
mov dword [ebp - 0x780], edx
jmp 0x4071ed
cmp byte [ebp - 0x290], 0
je 0x407181
cmp byte [ebp - 0x20c], 0
je 0x407181
cmp byte [ebp - 0x188], 0
jne 0x406f93
mov ecx, 0xe
mov esi, str.ID_cliente_e_o_ID_Utente_e_o_ID_Installazione_non_trovati
lea edi, [ebp - 0x794]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp 0x406f93
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x17dc], eax
cmp eax, edi
jne 0x406f99
mov ecx, 5
mov esi, str.errore_in_lettura_file
lea edi, [ebp - 0x794]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x406f99
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x17dc], eax
test eax, eax
jne 0x4071ed
mov ecx, 5
mov esi, str.errore_in_lettura_file
lea edi, [ebp - 0x794]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x17e0]
push eax
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x104]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x40726c
cmp eax, 0x8007000e
jne 0x407231
mov ecx, 0x16
mov esi, str.La_lunghezza_del_buffer_non_e_valida__o_memoria_insufficiente_per_completare_loperazione
lea edi, [ebp - 0x794]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x40726c
cmp eax, 0x800c0008
jne 0x40724c
mov ecx, 0xd
mov esi, str.Download_del_file_dallURL_specificato_non_riuscito
lea edi, [ebp - 0x794]
rep movsd dword es:[edi], dword [esi]
jmp 0x40726c
push eax
lea edx, [ebp - 0x794]
push str.Errore_nel_download_del_file_dallURL_specificato__errore__0x_X_
push edx
call esi
add esp, 0xc
jmp 0x40726c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x17dc], eax
cmp byte [ebp - 0x794], 0
jne 0x407310
mov eax, dword [ebp - 0x17dc]
test eax, eax
je 0x407310
push 0
push 0
lea ecx, [ebp - 0x17e8]
push ecx
push 0
push eax
push 0
push 0x11ff
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov esi, dword [ebp - 0x17e8]
lea edx, [ebp - 0x794]
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4072b2
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x407310
cmp eax, 0x8007000e
jne 0x4072e3
mov ecx, 0x16
mov esi, str.La_lunghezza_del_buffer_non_e_valida__o_memoria_insufficiente_per_completare_loperazione
lea edi, [ebp - 0x794]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x407310
cmp eax, 0x800c0008
jne 0x4072fe
mov ecx, 0xd
mov esi, str.Download_del_file_dallURL_specificato_non_riuscito
lea edi, [ebp - 0x794]
rep movsd dword es:[edi], dword [esi]
jmp 0x407310
push eax
lea edx, [ebp - 0x794]
push str.Errore_nel_download_del_file_dallURL_specificato__errore__0x_X_
push edx
call ebx
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x17e4]
pop edi
pop esi
pop ebx
test eax, eax
je 0x407340
push eax
mov dword [eax], vtable.UrlDownloadCallback.1.0
mov dword [eax + 4], vtable.UrlDownloadCallback.0
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [ebp - 0x1808]
test edx, edx
je 0x40735e
lea eax, [ebp - 0x794]
mov ecx, eax
sub edx, ecx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x407354
cmp byte [ebp - 0x794], 0
mov ecx, dword [ebp - 4]
sete al
xor ecx, ebp
call fcn.0040e620
mov esp, ebp
pop ebp
ret