Function at 0x415450
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 [0x4b1120]
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.00447660
add esp, 0xc
xor edx, edx
mov word [ebp - 0x210], dx
push 0x206
push 0
lea eax, [ebp - 0x20e]
push eax
call fcn.00447660
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0x418], cx
push 0x206
push 0
lea edx, [ebp - 0x416]
push edx
call fcn.00447660
add esp, 0xc
xor eax, eax
mov word [ebp - 0x830], ax
push 0x206
push 0
lea ecx, [ebp - 0x82e]
push ecx
call fcn.00447660
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.0044a00d
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.0040af50
add esp, 0x10
movzx edx, word [ebp - 0x830]
test edx, edx
jne 0x415571
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 0x41558c
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 0x41559b
mov dword [ebp - 4], 0x15
jmp 0x4155a1
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.00437970
add esp, 0x18
lea eax, [ebp - 0x628]
push eax
push str.DownloadFTPFile____TargetFile_s
call fcn.00437970
add esp, 8
cmp dword [0x4c9c48], 0
jne 0x415bc1
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 0x41560e
cmp dword [0x4c9c48], 0
je 0x415628
push 0
push 0x48dcd4
call fcn.0040e620
add esp, 8
mov dword [ebp - 0x834], eax
jmp 0x415bc1
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 0x415666
cmp dword [0x4c9c48], 0
je 0x415680
push 0
push 0x48dcf0
call fcn.0040e620
add esp, 8
mov dword [ebp - 0x834], eax
jmp 0x415bc1
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.00447660
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 0x415744
mov eax, dword [ebp - 0xa84]
xor edx, edx
mov cl, 0x20
call fcn.0044cc30
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.00437970
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 0x415ba5
cmp dword [0x4c9c48], 0
jne 0x415ba5
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 0x4157ca
cmp dword [ebp - 0x840], 0
jne 0x415826
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.0044cc30
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.00437970
add esp, 0xc
cmp dword [ebp - 0x84c], 0
ja 0x41583c
cmp dword [ebp - 0x850], 0
jbe 0x415b8e
cmp dword [0x4c9c48], 0
jne 0x415b8e
mov ecx, dword [0x4b3500]
or ecx, dword [0x4b3504]
jne 0x41586f
mov edx, dword [ebp - 0x84c]
push edx
mov eax, dword [ebp - 0x850]
push eax
mov ecx, 0x4b34a8
call fcn.0040fb10
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 0x4158b7
jb 0x4158ab
mov ecx, dword [ebp - 0x850]
cmp ecx, dword [ebp - 0xad0]
jae 0x4158b7
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.0044763a
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.00447660
add esp, 0xc
lea edx, [ebp - 0x210]
push edx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x41591b
lea eax, [ebp - 0x210]
push eax
call fcn.0040cdb0
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 0x415b77
cmp dword [0x4c9c48], 0
jne 0x415b77
cmp dword [ebp - 0x840], 0
je 0x415980
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 0x4159c4
cmp dword [0x4c9c48], 0
jne 0x4159c4
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 0x4159c4
mov dword [ebp - 0xad4], 1
jmp 0x4159ce
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.00437970
add esp, 0x10
cmp dword [ebp - 0xab4], 0
jbe 0x415afe
cmp dword [ebp - 0xaac], 0
je 0x415afe
cmp dword [ebp - 0xaac], 0
je 0x415a5c
cmp dword [0x4c9c48], 0
jne 0x415a5c
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 0x415a5c
mov dword [ebp - 0xad8], 1
jmp 0x415a66
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.00437970
add esp, 0xc
mov edx, dword [ebp - 0xaa4]
cmp edx, dword [ebp - 0xab4]
jne 0x415ab0
cmp dword [ebp - 0xaac], 0
je 0x415ab0
mov dword [ebp - 0xadc], 1
jmp 0x415aba
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 [0x4b3520]
mov eax, dword [0x4b3524]
adc eax, edx
mov dword [0x4b3520], ecx
mov dword [0x4b3524], eax
mov ecx, dword [0x4b3524]
push ecx
mov edx, dword [0x4b3520]
push edx
mov ecx, 0x4b34a8
call fcn.0040fc60
cmp dword [ebp - 0xab4], 0
je 0x415b1d
cmp dword [ebp - 0xaac], 0
je 0x415b1d
cmp dword [0x4c9c48], 0
je 0x415980
mov eax, dword [ebp - 0xabc]
mov dword [ebp - 0xac8], eax
mov ecx, dword [ebp - 0xac8]
push ecx
call fcn.0044a25c
add esp, 4
cmp dword [ebp - 0xaac], 0
jne 0x415b4d
mov dword [ebp - 0x834], 0x17
jmp 0x415b68
lea edx, [ebp - 0x628]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x415b68
mov dword [ebp - 0x834], 2
mov eax, dword [ebp - 0xab0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x415b8c
push 0
push 0x48dea4
call fcn.0040e620
add esp, 8
mov dword [ebp - 0x834], eax
jmp 0x415ba3
push 0
push 0x48debc
call fcn.0040e620
add esp, 8
mov dword [ebp - 0x834], eax
jmp 0x415bba
push 0
push str.FtpOpenFile
call fcn.0040e620
add esp, 8
mov dword [ebp - 0x834], eax
jmp 0x415bc1
cmp dword [ebp - 0x41c], 0
je 0x415bd7
mov ecx, dword [ebp - 0x41c]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x838], 0
je 0x415bed
mov edx, dword [ebp - 0x838]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x83c], 0
je 0x415c03
mov eax, dword [ebp - 0x83c]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [0x4c9c48], 0
je 0x415c16
mov dword [ebp - 0x834], 0x4c7
mov ecx, dword [ebp - 0x834]
push ecx
push str.DownloadFTPFile____End__d_
call fcn.00437970
add esp, 8
mov eax, dword [ebp - 0x834]
pop esi
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00447645
mov esp, ebp
pop ebp
ret