Function at 0x4467c0
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, 0xa98
mov eax, dword [0x4b06f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x18]
mov dword [ebp - 0xa78], eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 0xa7c], eax
mov eax, dword [ebp + 0x20]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xa8c], eax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
mov dword [ebp - 0xa88], ebx
call fcn.0046fe20
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.0046fe20
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x824], ax
lea eax, [ebp - 0x822]
push eax
call fcn.0046fe20
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call fcn.0046fe20
push ebx
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.00470452
add esp, 0x3c
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.SHLWAPI.dll_PathStripPathW]
push 0x5c
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x414]
push eax
push esi
call fcn.0043db50
add esp, 0x10
lea eax, [ebp - 0x824]
cmp word [ebp - 0x61c], 0
je 0x4468bd
lea eax, [ebp - 0x61c]
push eax
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
mov esi, dword [ebp + 0x14]
mov eax, 0x15
test esi, esi
cmove esi, eax
push esi
push ebx
push dword [ebp - 0xa7c]
push dword [ebp - 0xa78]
push edi
push str.DownloadFTPFile____ServerName_s_LoginFTP_s_PwdFTP_s_SourceFile_s_Port_d
call fcn.004699e0
lea eax, [ebp - 0x20c]
push eax
push str.DownloadFTPFile____TargetFile_s
call fcn.004699e0
add esp, 0x20
cmp dword [0x4b6534], 0
jne 0x446d9a
push 0
push 0
push 0
push 0
push str.DownloadFTPFile
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ecx, eax
mov dword [ebp - 0xa98], ecx
test ecx, ecx
je 0x446d65
cmp dword [0x4b6534], 0
jne 0x446d65
push 0
push dword [ebp - 0xa8c]
push 1
push dword [ebp - 0xa7c]
push dword [ebp - 0xa78]
push esi
push edi
push ecx
call dword [sym.imp.WININET.dll_InternetConnectW]
mov esi, eax
mov dword [ebp - 0xa78], esi
test esi, esi
je 0x446d3d
cmp dword [0x4b6534], 0
jne 0x446d3d
push 0x24c
lea eax, [ebp - 0xa70]
mov dword [ebp - 0xa74], 0
xorps xmm0, xmm0
push 0
push eax
movlpd qword [ebp - 0xa90], xmm0
call fcn.0046fe20
add esp, 0xc
lea eax, [ebp - 0xa74]
push 0
push 0x10
push eax
push ebx
push esi
call dword [sym.imp.WININET.dll_FtpFindFirstFileW]
mov esi, eax
mov dword [ebp - 0xa80], esi
test esi, esi
je 0x4469f5
mov ebx, dword [ebp - 0xa58]
xor edi, edi
or edi, dword [ebp - 0xa54]
push ebx
push edi
push str.DownloadFTPFile____finfo:_FileSize___I64u
call fcn.004699e0
add esp, 0xc
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x446a01
mov ebx, dword [ebp - 0xa8c]
mov edi, dword [ebp - 0xa90]
mov esi, dword [ebp - 0xa78]
push 0
push closesocket
push closesocket
push dword [ebp - 0xa88]
push esi
call dword [sym.imp.WININET.dll_FtpOpenFileW]
mov edx, eax
mov dword [ebp - 0xa8c], edx
test edx, edx
je 0x446d11
mov ecx, dword [0x4b6534]
test ecx, ecx
jne 0x446d11
mov eax, edi
mov dword [ebp - 0xa94], ecx
or eax, ebx
mov dword [ebp - 0xa7c], ecx
lea esi, [ecx + 1]
mov dword [ebp - 0xa84], ecx
je 0x446a61
cmp dword [ebp - 0xa80], ecx
jne 0x446a8e
lea eax, [ebp - 0xa94]
push eax
push edx
call dword [sym.imp.WININET.dll_FtpGetFileSize]
mov ebx, dword [ebp - 0xa94]
xor edi, edi
or edi, eax
push ebx
push edi
push str.DownloadFTPFile____FtpGetFileSize___I64u
call fcn.004699e0
mov ecx, dword [0x4b6534]
add esp, 0xc
test ebx, ebx
jne 0x446a9a
test edi, edi
je 0x446cf5
test ecx, ecx
jne 0x446cf5
mov eax, dword [0x4b0065]
or eax, dword [0x4b0069]
jne 0x446abb
push ebx
push edi
mov ecx, 0x4b0010
call fcn.00428f60
test ebx, ebx
ja 0x446acd
jb 0x446ac9
cmp edi, 0x1000
jae 0x446acd
mov ebx, edi
jmp 0x446ad2
mov ebx, 0x1000
xor ecx, ecx
mov eax, ebx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046a792
add esp, 4
mov edi, eax
lea eax, [ebp - 0x414]
push eax
mov dword [edi], 0
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x446b15
lea eax, [ebp - 0x414]
push eax
call fcn.0043b210
add esp, 4
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xa88], eax
cmp eax, 0xffffffff
je 0x446cd9
mov ecx, dword [0x4b6534]
test ecx, ecx
jne 0x446cd9
cmp dword [ebp - 0xa80], ecx
je 0x446b76
lea ecx, [ebp - 0xa60]
push ecx
push 0
lea ecx, [ebp - 0xa70]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov ecx, dword [0x4b6534]
test esi, esi
je 0x446b9e
test ecx, ecx
jne 0x446b9e
lea eax, [ebp - 0xa84]
push eax
push ebx
push edi
push dword [ebp - 0xa8c]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x446b9e
mov esi, 1
jmp 0x446ba0
xor esi, esi
push esi
push dword [ebp - 0xa84]
push ebx
push str.DownloadFTPFile____InternetReadFile_BUFLEN_d_BytesRead_d__d
call fcn.004699e0
mov eax, dword [ebp - 0xa84]
add esp, 0x10
test eax, eax
je 0x446c4e
test esi, esi
je 0x446c4e
cmp dword [0x4b6534], 0
jne 0x446bf6
push 0
lea ecx, [ebp - 0xa7c]
push ecx
push eax
push edi
push dword [ebp - 0xa88]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x446bf6
mov esi, 1
jmp 0x446bf8
xor esi, esi
push esi
push dword [ebp - 0xa7c]
push str.DownloadFTPFile____WriteFile_Byteswritten_d__d
call fcn.004699e0
mov eax, dword [ebp - 0xa7c]
add esp, 0xc
cmp eax, dword [ebp - 0xa84]
jne 0x446c25
test esi, esi
je 0x446c25
mov esi, 1
jmp 0x446c27
xor esi, esi
mov ecx, dword [0x4b0081]
add ecx, eax
mov eax, dword [0x4b0085]
mov dword [0x4b0081], ecx
adc eax, 0
push eax
push ecx
mov ecx, 0x4b0010
mov dword [0x4b0085], eax
call fcn.004293d0
cmp dword [ebp - 0xa84], 0
je 0x446c69
test esi, esi
je 0x446c69
mov ecx, dword [0x4b6534]
test ecx, ecx
je 0x446b76
push edi
call fcn.00471314
add esp, 4
test esi, esi
jne 0x446c9d
push dword [ebp - 0xa88]
mov dword [ebp - 0xa80], 0x17
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0xa80]
mov esi, dword [ebp - 0xa78]
jmp 0x446d2a
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push dword [ebp - 0xa88]
test eax, eax
mov ecx, 2
mov eax, 0
cmove eax, ecx
mov dword [ebp - 0xa80], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0xa80]
mov esi, dword [ebp - 0xa78]
jmp 0x446d2a
push 0
push 0
push 0
push 0
push str.CreateFile
push 0
call fcn.0043fba0
mov esi, dword [ebp - 0xa78]
jmp 0x446d25
push 0
push 0
push 0
push 0
push 0x4968f4
push 0
call fcn.0043fba0
mov esi, dword [ebp - 0xa78]
jmp 0x446d25
push 0
push 0
push 0
push 0
push str.FtpOpenFile
push 0
call fcn.0043fba0
add esp, 0x18
mov ebx, eax
mov eax, dword [ebp - 0xa8c]
test eax, eax
je 0x446d56
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x446d56
push 0
push 0
push 0
push 0
push str.InternetConnect
push 0
call fcn.0043fba0
add esp, 0x18
mov ebx, eax
test esi, esi
je 0x446d7e
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
jmp 0x446d84
push 0
push 0
push 0
push 0
push str.InternetOpen
push 0
call fcn.0043fba0
add esp, 0x18
mov ebx, eax
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0xa98]
test eax, eax
je 0x446d91
push eax
call esi
cmp dword [0x4b6534], 0
je 0x446d9f
mov ebx, 0x4c7
push ebx
push str.DownloadFTPFile____End__d_
call fcn.004699e0
mov ecx, dword [ebp - 4]
add esp, 8
mov eax, ebx
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0046f33a
mov esp, ebp
pop ebp
ret