Function at 0x4211b0
Capabilities:
Check if file exists
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
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xadc
mov eax, dword [0x4ce724]
xor eax, ebp
mov dword [ebp - 8], eax
push esi
mov dword [ebp - 0x834], 0
xor eax, eax
mov word [ebp - 0x628], ax
push 0x206
push 0
lea ecx, [ebp - 0x626]
push ecx
call fcn.00468010
add esp, 0xc
xor edx, edx
mov word [ebp - 0x210], dx
push 0x206
push 0
lea eax, [ebp - 0x20e]
push eax
call fcn.00468010
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0x418], cx
push 0x206
push 0
lea edx, [ebp - 0x416]
push edx
call fcn.00468010
add esp, 0xc
xor eax, eax
mov word [ebp - 0x830], ax
push 0x206
push 0
lea ecx, [ebp - 0x82e]
push ecx
call fcn.00468010
add esp, 0xc
mov dword [ebp - 0x83c], 0
mov dword [ebp - 0x838], 0
mov dword [ebp - 0x41c], 0
mov edx, dword [ebp + 0x18]
push edx
push 0x104
lea eax, [ebp - 0x418]
push eax
call fcn.0046a95d
add esp, 0xc
lea ecx, [ebp - 0x418]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathStripPathW]
push 0x5c
lea edx, [ebp - 0x830]
push edx
lea eax, [ebp - 0x210]
push eax
mov ecx, dword [ebp + 0x1c]
push ecx
call fcn.0040b1b0
add esp, 0x10
movzx edx, word [ebp - 0x830]
test edx, edx
jne 0x4212d1
lea eax, [ebp - 0x418]
push eax
lea ecx, [ebp - 0x210]
push ecx
lea edx, [ebp - 0x628]
push edx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
jmp 0x4212ec
lea eax, [ebp - 0x830]
push eax
lea ecx, [ebp - 0x210]
push ecx
lea edx, [ebp - 0x628]
push edx
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
cmp dword [ebp + 0x14], 0
jne 0x4212fb
mov dword [ebp - 4], 0x15
jmp 0x421301
mov eax, dword [ebp + 0x14]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.DownloadFTPFile____ServerName_s_LoginFTP_s_PwdFTP_s_SourceFile_s_Port_d
call fcn.00457270
add esp, 0x18
lea eax, [ebp - 0x628]
push eax
push str.DownloadFTPFile____TargetFile_s
call fcn.00457270
add esp, 8
cmp dword [0x4e8c5c], 0
jne 0x42193f
push 0
push 0
push 0
push 0
push str.DownloadFTPFile
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x83c], eax
cmp dword [ebp - 0x83c], 0
je 0x42136e
cmp dword [0x4e8c5c], 0
je 0x42138e
push 0
push 0
push 0
push 0x4b2524
push 0
call fcn.0040ece0
add esp, 0x14
mov dword [ebp - 0x834], eax
jmp 0x42193f
push 0
mov ecx, dword [ebp + 0x20]
push ecx
push 1
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
movzx ecx, word [ebp - 4]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x83c]
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x838], eax
cmp dword [ebp - 0x838], 0
je 0x4213cc
cmp dword [0x4e8c5c], 0
je 0x4213ec
push 0
push 0
push 0
push 0x4b2540
push 0
call fcn.0040ece0
add esp, 0x14
mov dword [ebp - 0x834], eax
jmp 0x42193f
mov dword [ebp - 0x850], 0
mov dword [ebp - 0x84c], 0
mov dword [ebp - 0xaa0], 0
push 0x24c
push 0
lea ecx, [ebp - 0xa9c]
push ecx
call fcn.00468010
add esp, 0xc
mov dword [ebp - 0x844], 0
push 0
push 0x10
lea edx, [ebp - 0xaa0]
push edx
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp - 0x838]
push ecx
call dword [sym.imp.WININET.dll_FtpFindFirstFileW]
mov dword [ebp - 0x844], eax
mov edx, dword [ebp - 0x844]
mov dword [ebp - 0x840], edx
cmp dword [ebp - 0x844], 0
je 0x4214b0
mov eax, dword [ebp - 0xa84]
xor edx, edx
mov cl, 0x20
call fcn.0046dcc0
mov ecx, dword [ebp - 0xa80]
xor esi, esi
or eax, ecx
or edx, esi
mov dword [ebp - 0x850], eax
mov dword [ebp - 0x84c], edx
mov edx, dword [ebp - 0x84c]
push edx
mov eax, dword [ebp - 0x850]
push eax
push str.DownloadFTPFile____finfo:_FileSize___I64u
call fcn.00457270
add esp, 0xc
mov ecx, dword [ebp - 0x844]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push 0
push closesocket
push closesocket
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp - 0x838]
push eax
call dword [sym.imp.WININET.dll_FtpOpenFileW]
mov dword [ebp - 0x41c], eax
cmp dword [ebp - 0x41c], 0
je 0x42191d
cmp dword [0x4e8c5c], 0
jne 0x42191d
mov dword [ebp - 0xab8], 0
mov dword [ebp - 0xaa8], 0
mov dword [ebp - 0xaac], 1
mov dword [ebp - 0xaa4], 0
mov dword [ebp - 0xab4], 0
mov ecx, dword [ebp - 0x850]
or ecx, dword [ebp - 0x84c]
je 0x421536
cmp dword [ebp - 0x840], 0
jne 0x421592
lea edx, [ebp - 0xaa8]
push edx
mov eax, dword [ebp - 0x41c]
push eax
call dword [sym.imp.WININET.dll_FtpGetFileSize]
mov dword [ebp - 0xab8], eax
mov eax, dword [ebp - 0xaa8]
xor edx, edx
mov cl, 0x20
call fcn.0046dcc0
mov ecx, dword [ebp - 0xab8]
xor esi, esi
or eax, ecx
or edx, esi
mov dword [ebp - 0x850], eax
mov dword [ebp - 0x84c], edx
mov edx, dword [ebp - 0x84c]
push edx
mov eax, dword [ebp - 0x850]
push eax
push str.DownloadFTPFile____FtpGetFileSize___I64u
call fcn.00457270
add esp, 0xc
cmp dword [ebp - 0x84c], 0
ja 0x4215a8
cmp dword [ebp - 0x850], 0
jbe 0x421900
cmp dword [0x4e8c5c], 0
jne 0x421900
mov ecx, dword [0x4d0a15]
or ecx, dword [0x4d0a19]
jne 0x4215db
mov edx, dword [ebp - 0x84c]
push edx
mov eax, dword [ebp - 0x850]
push eax
mov ecx, 0x4d09c0
call fcn.00412610
mov dword [ebp - 0xac0], 0x1000
mov ecx, dword [ebp - 0xac0]
xor edx, edx
mov dword [ebp - 0xad0], ecx
mov dword [ebp - 0xacc], edx
mov eax, dword [ebp - 0x84c]
cmp eax, dword [ebp - 0xacc]
ja 0x421623
jb 0x421617
mov ecx, dword [ebp - 0x850]
cmp ecx, dword [ebp - 0xad0]
jae 0x421623
mov edx, dword [ebp - 0x850]
mov dword [ebp - 0xac0], edx
xor ecx, ecx
mov eax, dword [ebp - 0xac0]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00466e9e
add esp, 4
mov dword [ebp - 0xac4], eax
mov eax, dword [ebp - 0xac4]
mov dword [ebp - 0xabc], eax
push 4
push 0
mov ecx, dword [ebp - 0xabc]
push ecx
call fcn.00468010
add esp, 0xc
lea edx, [ebp - 0x210]
push edx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x421687
lea eax, [ebp - 0x210]
push eax
call fcn.0040d340
add esp, 4
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x628]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xab0], eax
cmp dword [ebp - 0xab0], 0xffffffff
je 0x4218e3
cmp dword [0x4e8c5c], 0
jne 0x4218e3
cmp dword [ebp - 0x840], 0
je 0x4216ec
lea edx, [ebp - 0xa8c]
push edx
push 0
lea eax, [ebp - 0xa9c]
push eax
mov ecx, dword [ebp - 0xab0]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp - 0xaac], 0
je 0x421730
cmp dword [0x4e8c5c], 0
jne 0x421730
lea edx, [ebp - 0xab4]
push edx
mov eax, dword [ebp - 0xac0]
push eax
mov ecx, dword [ebp - 0xabc]
push ecx
mov edx, dword [ebp - 0x41c]
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x421730
mov dword [ebp - 0xad4], 1
jmp 0x42173a
mov dword [ebp - 0xad4], 0
mov eax, dword [ebp - 0xad4]
mov dword [ebp - 0xaac], eax
mov ecx, dword [ebp - 0xaac]
push ecx
mov edx, dword [ebp - 0xab4]
push edx
mov eax, dword [ebp - 0xac0]
push eax
push str.DownloadFTPFile____InternetReadFile_BUFLEN_d_BytesRead_d__d
call fcn.00457270
add esp, 0x10
cmp dword [ebp - 0xab4], 0
jbe 0x42186a
cmp dword [ebp - 0xaac], 0
je 0x42186a
cmp dword [ebp - 0xaac], 0
je 0x4217c8
cmp dword [0x4e8c5c], 0
jne 0x4217c8
push 0
lea ecx, [ebp - 0xaa4]
push ecx
mov edx, dword [ebp - 0xab4]
push edx
mov eax, dword [ebp - 0xabc]
push eax
mov ecx, dword [ebp - 0xab0]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4217c8
mov dword [ebp - 0xad8], 1
jmp 0x4217d2
mov dword [ebp - 0xad8], 0
mov edx, dword [ebp - 0xad8]
mov dword [ebp - 0xaac], edx
mov eax, dword [ebp - 0xaac]
push eax
mov ecx, dword [ebp - 0xaa4]
push ecx
push str.DownloadFTPFile____WriteFile_Byteswritten_d__d
call fcn.00457270
add esp, 0xc
mov edx, dword [ebp - 0xaa4]
cmp edx, dword [ebp - 0xab4]
jne 0x42181c
cmp dword [ebp - 0xaac], 0
je 0x42181c
mov dword [ebp - 0xadc], 1
jmp 0x421826
mov dword [ebp - 0xadc], 0
mov eax, dword [ebp - 0xadc]
mov dword [ebp - 0xaac], eax
mov ecx, dword [ebp - 0xaa4]
xor edx, edx
add ecx, dword [0x4d0a31]
mov eax, dword [0x4d0a35]
adc eax, edx
mov dword [0x4d0a31], ecx
mov dword [0x4d0a35], eax
mov ecx, dword [0x4d0a35]
push ecx
mov edx, dword [0x4d0a31]
push edx
mov ecx, 0x4d09c0
call fcn.00412760
cmp dword [ebp - 0xab4], 0
je 0x421889
cmp dword [ebp - 0xaac], 0
je 0x421889
cmp dword [0x4e8c5c], 0
je 0x4216ec
mov eax, dword [ebp - 0xabc]
mov dword [ebp - 0xac8], eax
mov ecx, dword [ebp - 0xac8]
push ecx
call fcn.0046afc2
add esp, 4
cmp dword [ebp - 0xaac], 0
jne 0x4218b9
mov dword [ebp - 0x834], 0x17
jmp 0x4218d4
lea edx, [ebp - 0x628]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4218d4
mov dword [ebp - 0x834], 2
mov eax, dword [ebp - 0xab0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4218fe
push 0
push 0
push 0
push 0x4b26f4
push 0
call fcn.0040ece0
add esp, 0x14
mov dword [ebp - 0x834], eax
jmp 0x42191b
push 0
push 0
push 0
push 0x4b270c
push 0
call fcn.0040ece0
add esp, 0x14
mov dword [ebp - 0x834], eax
jmp 0x421938
push 0
push 0
push 0
push str.FtpOpenFile
push 0
call fcn.0040ece0
add esp, 0x14
mov dword [ebp - 0x834], eax
jmp 0x42193f
cmp dword [ebp - 0x41c], 0
je 0x421955
mov ecx, dword [ebp - 0x41c]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x838], 0
je 0x42196b
mov edx, dword [ebp - 0x838]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x83c], 0
je 0x421981
mov eax, dword [ebp - 0x83c]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [0x4e8c5c], 0
je 0x421994
mov dword [ebp - 0x834], 0x4c7
mov ecx, dword [ebp - 0x834]
push ecx
push str.DownloadFTPFile____End__d_
call fcn.00457270
add esp, 8
mov eax, dword [ebp - 0x834]
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00467fff
mov esp, ebp
pop ebp
ret