Function at 0x41494f
Capabilities:
Connect to http server
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov eax, 0x404c
call fcn.0044e410
mov dword [ebp - 0x402c], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll__strdup
mov esi, dword [ebp + 8]
mov edi, str.ftp:__
mov ecx, 6
cld
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
jne 0x4149a0
mov dword [ebp - 0x402c], 1
mov edi, dword [ebp + 8]
add edi, 6
jmp 0x4149d8
mov esi, dword [ebp + 8]
mov edi, str.http:__
mov ecx, 7
cld
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
jne 0x4149c2
mov edi, dword [ebp + 8]
add edi, 7
jmp 0x4149d8
mov dword [esp], str.Must_start_with_http:___or_ftp:__
call fcn.004014b5
mov eax, 0
jmp 0x414f76
mov dword [esp + 4], 0x2f
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.msvcrt.dll_strrchr
cmp eax, 1
sbb eax, 0xffffffff
mov dword [ebp - 0x4028], eax
mov dword [esp + 4], 0x2f
mov dword [esp], edi
call sub.msvcrt.dll_strchr
test eax, eax
jne 0x414a21
mov dword [esp], str.No_host_part_n
call fcn.004014b5
mov eax, 0
jmp 0x414f76
mov dword [ebp + 8], eax
mov ebx, eax
sub ebx, edi
lea eax, [ebx + 1]
mov dword [esp], eax
call fcn.004131ff
mov esi, eax
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_strncpy
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], str.URL_download
call sub.WININET.DLL_InternetOpenA
sub esp, 0x14
test eax, eax
jne 0x414a97
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 4], eax
mov dword [esp], str.InternetOpen_failed:__d
call fcn.004014b5
mov eax, 0
jmp 0x414f76
cmp dword [ebp - 0x402c], 0
je 0x414b32
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x15
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.WININET.DLL_InternetConnectA
sub esp, 0x20
mov dword [ebp - 0x4034], eax
mov eax, 0
cmp dword [ebp - 0x4034], 0
je 0x414f76
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0x80000000
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4034]
mov dword [esp], eax
call sub.WININET.DLL_FtpOpenFileA
sub esp, 0x14
mov edi, eax
jmp 0x414d9e
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 3
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x50
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.WININET.DLL_InternetConnectA
sub esp, 0x20
mov dword [ebp - 0x4034], eax
test eax, eax
jne 0x414b9a
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 4], eax
mov dword [esp], str.InternetConnect_failed:__d
call fcn.004014b5
mov eax, 0
jmp 0x414f76
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0x80200
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x464a70
mov eax, dword [ebp - 0x4034]
mov dword [esp], eax
call sub.WININET.DLL_HttpOpenRequestA
sub esp, 0x20
mov edi, eax
test eax, eax
jne 0x414c07
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 4], eax
mov dword [esp], str.HttpOpen_request_failed:__d
call fcn.004014b5
mov eax, 0
jmp 0x414f76
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call sub.WININET.DLL_HttpSendRequestA
sub esp, 0x14
test eax, eax
je 0x414e4c
mov dword [ebp - 0x401c], 0
mov dword [ebp - 0x4020], 4
lea eax, [ebp - 0x401c]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x4020]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x4024]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x20000013
mov dword [esp], edi
call sub.WININET.DLL_HttpQueryInfoA
sub esp, 0x14
test eax, eax
je 0x414e87
cmp dword [ebp - 0x4024], 0x197
jne 0x414cd4
mov dword [esp], 0
call sub.USER32.dll_GetTopWindow
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 7
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.WININET.DLL_InternetErrorDlg
sub esp, 0x14
cmp eax, 0x2f00
je 0x414c07
cmp dword [ebp - 0x4024], 0x12b
jbe 0x414d1c
mov dword [esp], edi
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov eax, dword [ebp - 0x4034]
mov dword [esp], eax
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov eax, dword [ebp - 0x4024]
mov dword [esp + 4], eax
mov dword [esp], str.Server_error__d_while_downloading
call fcn.004014b5
mov eax, 0
jmp 0x414f76
mov dword [ebp - 0x401c], 0
mov dword [ebp - 0x4020], 0x4000
lea eax, [ebp - 0x401c]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x4020]
mov dword [esp + 0xc], eax
lea ebx, [ebp - 0x4018]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x2f
mov dword [esp], edi
call sub.WININET.DLL_HttpQueryInfoA
sub esp, 0x14
test eax, eax
je 0x414d9e
mov dword [esp + 4], str.filename_
mov dword [esp], ebx
call sub.msvcrt.dll_strstr
test eax, eax
je 0x414d9e
add eax, 9
mov dword [esp + 4], 0x464abd
mov dword [esp], eax
call sub.msvcrt.dll_strtok
test eax, eax
je 0x414d9e
mov dword [esp], eax
call sub.msvcrt.dll__strdup
mov dword [ebp - 0x4028], eax
test edi, edi
jne 0x414dbd
mov eax, dword [ebp - 0x4034]
mov dword [esp], eax
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov eax, 0
jmp 0x414f76
mov esi, 0
mov dword [esp], edi
call fcn.004148f0
mov dword [ebp - 0x4030], eax
mov eax, dword [ebp - 0x4028]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.0041209d
mov dword [ebp - 0x4028], eax
mov dword [esp + 4], 0x464abf
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov ebx, eax
test eax, eax
jne 0x414f14
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x4028]
mov dword [esp + 4], eax
mov dword [esp], str.Cant_create_file:__s:__d
call fcn.004014b5
mov dword [esp], edi
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov eax, dword [ebp - 0x4034]
mov dword [esp], eax
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov eax, 0
jmp 0x414f76
mov dword [esp], edi
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov eax, dword [ebp - 0x4034]
mov dword [esp], eax
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 4], eax
mov dword [esp], str.HttpSendRequest_failed:__d
call fcn.004014b5
mov eax, 0
jmp 0x414f76
mov dword [esp], edi
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov eax, dword [ebp - 0x4034]
mov dword [esp], eax
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
call sub.KERNEL32.dll_GetLastError
mov dword [esp + 4], eax
mov dword [esp], str.HttpQueryInfo_failed:__d
call fcn.004014b5
mov eax, 0
jmp 0x414f76
mov dword [esp + 0xc], ebx
mov eax, dword [ebp - 0x4020]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
lea eax, [ebp - 0x4018]
mov dword [esp], eax
call sub.msvcrt.dll_fwrite
add esi, dword [ebp - 0x4020]
cmp dword [ebp + 0x10], 0
setne al
cmp dword [ebp - 0x4030], 0
setne dl
movzx eax, al
test edx, eax
je 0x414f14
mov eax, dword [ebp - 0x4030]
mov dword [esp + 4], eax
mov dword [esp], esi
call dword [ebp + 0x10]
lea eax, [ebp - 0x4020]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4000
lea eax, [ebp - 0x4018]
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.WININET.DLL_InternetReadFile
sub esp, 0x10
test eax, eax
je 0x414f4c
cmp dword [ebp - 0x4020], 0
jne 0x414ec2
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov dword [esp], edi
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov eax, dword [ebp - 0x4034]
mov dword [esp], eax
call sub.WININET.DLL_InternetCloseHandle
sub esp, 4
mov eax, dword [ebp - 0x4028]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret