Function at 0x4463d0
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 [0x4af6f0]
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.0046f7e0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.0046f7e0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x824], ax
lea eax, [ebp - 0x822]
push eax
call fcn.0046f7e0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x61c], ax
lea eax, [ebp - 0x61a]
push eax
call fcn.0046f7e0
push ebx
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.0046fe12
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.0043dae0
add esp, 0x10
lea eax, [ebp - 0x824]
cmp word [ebp - 0x61c], 0
je 0x4464cd
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.00469390
lea eax, [ebp - 0x20c]
push eax
push str.DownloadFTPFile____TargetFile_s
call fcn.00469390
add esp, 0x20
cmp dword [0x4b552c], 0
jne 0x4469a0
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 0x44696d
cmp dword [0x4b552c], 0
jne 0x44696d
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 0x446947
cmp dword [0x4b552c], 0
jne 0x446947
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.0046f7e0
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 0x446605
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.00469390
add esp, 0xc
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x446611
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 0x44691d
mov ecx, dword [0x4b552c]
test ecx, ecx
jne 0x44691d
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 0x446671
cmp dword [ebp - 0xa80], ecx
jne 0x44669e
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.00469390
mov ecx, dword [0x4b552c]
add esp, 0xc
test ebx, ebx
jne 0x4466aa
test edi, edi
je 0x446903
test ecx, ecx
jne 0x446903
mov eax, dword [0x4af065]
or eax, dword [0x4af069]
jne 0x4466cb
push ebx
push edi
mov ecx, 0x4af010
call fcn.00428f60
test ebx, ebx
ja 0x4466dd
jb 0x4466d9
cmp edi, 0x1000
jae 0x4466dd
mov ebx, edi
jmp 0x4466e2
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.0046a14a
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 0x446725
lea eax, [ebp - 0x414]
push eax
call fcn.0043b250
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 0x4468e9
mov ecx, dword [0x4b552c]
test ecx, ecx
jne 0x4468e9
cmp dword [ebp - 0xa80], ecx
je 0x446786
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 [0x4b552c]
test esi, esi
je 0x4467ae
test ecx, ecx
jne 0x4467ae
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 0x4467ae
mov esi, 1
jmp 0x4467b0
xor esi, esi
push esi
push dword [ebp - 0xa84]
push ebx
push str.DownloadFTPFile____InternetReadFile_BUFLEN_d_BytesRead_d__d
call fcn.00469390
mov eax, dword [ebp - 0xa84]
add esp, 0x10
test eax, eax
je 0x44685e
test esi, esi
je 0x44685e
cmp dword [0x4b552c], 0
jne 0x446806
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 0x446806
mov esi, 1
jmp 0x446808
xor esi, esi
push esi
push dword [ebp - 0xa7c]
push str.DownloadFTPFile____WriteFile_Byteswritten_d__d
call fcn.00469390
mov eax, dword [ebp - 0xa7c]
add esp, 0xc
cmp eax, dword [ebp - 0xa84]
jne 0x446835
test esi, esi
je 0x446835
mov esi, 1
jmp 0x446837
xor esi, esi
mov ecx, dword [0x4af081]
add ecx, eax
mov eax, dword [0x4af085]
mov dword [0x4af081], ecx
adc eax, 0
push eax
push ecx
mov ecx, 0x4af010
mov dword [0x4af085], eax
call fcn.004293d0
cmp dword [ebp - 0xa84], 0
je 0x446879
test esi, esi
je 0x446879
mov ecx, dword [0x4b552c]
test ecx, ecx
je 0x446786
push edi
call fcn.00470cd4
add esp, 4
test esi, esi
jne 0x4468ad
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 0x446934
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 0x446934
push 0
push 0
push 0
push str.CreateFile
push 0
call fcn.0043fb20
mov esi, dword [ebp - 0xa78]
jmp 0x44692f
push 0
push 0
push 0
push 0x49573c
push 0
call fcn.0043fb20
mov esi, dword [ebp - 0xa78]
jmp 0x44692f
push 0
push 0
push 0
push str.FtpOpenFile
push 0
call fcn.0043fb20
add esp, 0x14
mov ebx, eax
mov eax, dword [ebp - 0xa8c]
test eax, eax
je 0x44695e
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x44695e
push 0
push 0
push 0
push str.InternetConnect
push 0
call fcn.0043fb20
add esp, 0x14
mov ebx, eax
test esi, esi
je 0x446984
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
jmp 0x44698a
push 0
push 0
push 0
push str.InternetOpen
push 0
call fcn.0043fb20
add esp, 0x14
mov ebx, eax
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0xa98]
test eax, eax
je 0x446997
push eax
call esi
cmp dword [0x4b552c], 0
je 0x4469a5
mov ebx, 0x4c7
push ebx
push str.DownloadFTPFile____End__d_
call fcn.00469390
mov ecx, dword [ebp - 4]
add esp, 8
mov eax, ebx
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0046ecfa
mov esp, ebp
pop ebp
ret