Function at 0x4380d0
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
Send data
Send http request
Timestomp file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x484f8b
mov eax, dword fs:[0]
push eax
sub esp, 0x898
mov eax, dword [0x4a86f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x18]
mov esi, dword [ebp + 0x1c]
mov dword [ebp - 0x864], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x86c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x870], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x880], eax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
mov dword [ebp - 0x868], ebx
mov dword [ebp - 0x87c], 0
call fcn.0046a390
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push eax
call fcn.0046a390
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x830], ax
lea eax, [ebp - 0x82e]
push eax
call fcn.0046a390
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x628], ax
lea eax, [ebp - 0x626]
push eax
call fcn.0046a390
push ebx
lea eax, [ebp - 0x830]
push 0x104
push eax
call fcn.0046bf5a
add esp, 0x3c
lea eax, [ebp - 0x830]
push eax
call dword [sym.imp.SHLWAPI.dll_PathStripPathW]
push 0x5c
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x420]
push eax
push esi
call fcn.0042e500
add esp, 0x10
lea eax, [ebp - 0x830]
cmp word [ebp - 0x628], 0
je 0x4381f5
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
mov edi, dword [ebp + 0x14]
mov ebx, dword [ebp + 0x24]
test edi, edi
jne 0x438223
test ebx, ebx
mov edi, 0x50
mov eax, 0x1bb
cmovne edi, eax
push dword [ebp + 0x28]
push ebx
push dword [ebp - 0x868]
push dword [ebp - 0x870]
push dword [ebp - 0x86c]
push dword [ebp - 0x864]
push str.DownloadHTMLFile____ServerName_s_Login_s_Pwd_s_SourceFile_s_Secure_d_Resume_d
call fcn.0045f520
lea eax, [ebp - 0x218]
push eax
push str.DownloadHTMLFile____TargetFile_s
call fcn.0045f520
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
lea eax, [ebp - 0x8a0]
add esp, 0x24
mov dword [ebp - 0x8a0], 0x3a98
mov dword [ebp - 0x8a4], 0x7530
push 4
push eax
push 5
push 0
call esi
push 4
lea eax, [ebp - 0x8a4]
push eax
push 6
push 0
call esi
cmp dword [0x4c2e50], 0
jne 0x4389c1
push 0
push 0
push 0
push 0
push str.DownloadHTMLFile
call dword [sym.imp.WININET.dll_InternetOpenW]
mov esi, eax
mov dword [ebp - 0x88c], esi
test esi, esi
je 0x438994
cmp dword [0x4c2e50], 0
jne 0x438994
push 0
push dword [ebp - 0x880]
push 3
push dword [ebp - 0x870]
push dword [ebp - 0x86c]
push edi
push dword [ebp - 0x864]
push esi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x880], eax
test eax, eax
je 0x438972
cmp dword [0x4c2e50], 0
jne 0x438972
test ebx, ebx
mov esi, 0x80400100
mov ecx, 0x803000
cmovne esi, ecx
cmp dword [ebp + 0x28], 0
jne 0x43832c
or esi, 0x4000000
mov ebx, dword [ebp - 0x868]
lea ecx, [ebp - 0x87c]
push ecx
push ebx
push esi
push eax
call fcn.00438b00
mov edi, dword [ebp - 0x87c]
add esp, 0x10
mov dword [ebp - 0x86c], eax
push 0
test edi, edi
je 0x43838f
push 0
push 0
mov edi, 0x2efc
push str.GettHttpSize
push edi
call fcn.0042e900
add esp, 0x14
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [ebp - 0x88c]
mov eax, dword [ebp - 0x880]
test eax, eax
je 0x4389b1
push eax
call ebx
jmp 0x4389b1
push esi
push 0
push 0
push 0
push ebx
push 0x48bf3c
push dword [ebp - 0x880]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x864], eax
test eax, eax
je 0x43893f
cmp dword [0x4c2e50], 0
jne 0x43893f
lea eax, [ebp - 0x218]
push eax
call fcn.0045d680
mov ebx, dword [ebp - 0x86c]
mov esi, eax
push esi
sub ebx, esi
mov dword [ebp - 0x868], esi
push str.DownloadHTMLFile____BytesDownloaded:__d
mov dword [ebp - 0x894], ebx
call fcn.0045f520
push ebx
push str.DownloadHTMLFile____BytesToDownload:__d
call fcn.0045f520
mov eax, dword [0x4a808d]
add esp, 0x14
or eax, dword [0x4a8091]
jne 0x43841c
push eax
push dword [ebp - 0x86c]
mov ecx, 0x4a8038
call fcn.00430290
test ebx, ebx
jne 0x438434
push 0x3e8
mov ecx, 0x4a8038
call fcn.00430570
jmp 0x438956
cmp esi, dword [ebp - 0x86c]
jbe 0x4384a3
mov dword [ebp + 0x28], 0
mov ebx, dword [ebp - 0x864]
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
push eax
push str.DownloadHTMLFile____HttpSendRequest____d
call fcn.0045f520
lea eax, [ebp - 0x87c]
push eax
push ebx
call fcn.00438c50
mov edi, dword [ebp - 0x87c]
add esp, 0x10
test edi, edi
jne 0x438956
cmp eax, 0x12c
jb 0x438511
cmp eax, 0x194
mov edi, 5
mov ecx, 2
cmove edi, ecx
jmp 0x438956
cmp dword [ebp + 0x28], 0
je 0x438443
lea ecx, [ebp - 0x870]
call fcn.004345e0
push esi
lea eax, [ebp - 0x870]
mov dword [ebp - 4], 0
push str.Range:_bytes_d_
push eax
call fcn.00434b70
mov eax, dword [ebp - 0x870]
add esp, 0xc
mov ebx, dword [ebp - 0x864]
push 0x10000000
push dword [eax - 0xc]
push eax
push ebx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
push eax
push str.DownloadHTMLFile____HttpAddRequestHeaders___d
call fcn.0045f520
add esp, 8
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x870]
call fcn.00434640
jmp 0x438449
xor eax, eax
mov dword [ebp - 0x890], 0
mov word [ebp - 0x850], ax
xorps xmm0, xmm0
mov dword [ebp - 0x846], eax
mov esi, 1
mov word [ebp - 0x842], ax
mov word [ebp - 0x860], ax
mov dword [ebp - 0x856], eax
mov word [ebp - 0x852], ax
mov dword [ebp - 0x89c], eax
mov dword [ebp - 0x898], eax
mov dword [ebp - 0x888], eax
mov dword [ebp - 0x884], eax
lea eax, [ebp - 0x850]
push eax
mov dword [ebp - 0x878], 0
movq qword [ebp - 0x84e], xmm0
movq qword [ebp - 0x85e], xmm0
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0x860]
push eax
push ebx
call fcn.00438a80
add esp, 8
test eax, eax
lea eax, [ebp - 0x888]
push eax
lea eax, [ebp - 0x860]
je 0x4385b3
lea eax, [ebp - 0x850]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov eax, dword [ebp - 0x888]
mov dword [ebp - 0x89c], eax
mov eax, dword [ebp - 0x884]
mov dword [ebp - 0x898], eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4385f2
lea eax, [ebp - 0x420]
push eax
call fcn.0042c370
add esp, 4
xor ebx, ebx
cmp dword [ebp + 0x28], ebx
je 0x4386ec
push ebx
push 0x80
push 4
push ebx
push ebx
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4386d7
lea eax, [ebp - 0x874]
push eax
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [ebp - 0x840]
push eax
lea eax, [ebp - 0x874]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
movzx eax, word [ebp - 0x832]
push eax
movzx eax, word [ebp - 0x834]
push eax
movzx eax, word [ebp - 0x836]
push eax
movzx eax, word [ebp - 0x838]
push eax
movzx eax, word [ebp - 0x840]
push eax
movzx eax, word [ebp - 0x83e]
push eax
movzx eax, word [ebp - 0x83a]
push eax
push str.DownloadHTMLFile____stLastWriteTime_d__d__d____d:_d:_d__dms
call fcn.0045f520
add esp, 0x20
lea eax, [ebp - 0x888]
push eax
lea eax, [ebp - 0x874]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
je 0x4386b6
push str.DownloadHTMLFile____Files_are_not_on_the_same_date_
call fcn.0045f520
add esp, 4
jmp 0x4386ec
push 2
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x438750
push eax
push eax
push eax
push 0x48c898
jmp 0x4386e2
push 0
push 0
push 0
push str.CreateFile
push 0
call fcn.0042e900
add esp, 0x14
push str.DownloadHTMLFile____Mode_resume_disabled_
call fcn.0045f520
mov eax, dword [ebp - 0x86c]
add esp, 4
mov dword [ebp - 0x868], 0
mov dword [ebp - 0x894], eax
test ebx, ebx
je 0x43871a
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x438750
push 0
push 0
push 0
push str.CreateFile
jmp 0x43894a
push ebx
push str.DownloadHTMLFile____CreateFile_d
call fcn.0045f520
mov ecx, dword [0x4a80a9]
add esp, 8
add ecx, dword [ebp - 0x868]
mov eax, dword [0x4a80ad]
adc eax, 0
mov dword [0x4a80a9], ecx
push eax
push ecx
mov ecx, 0x4a8038
mov dword [0x4a80ad], eax
call fcn.00430700
mov eax, dword [ebp - 0x894]
mov edx, 0x100000
mov dword [ebp - 0x868], edx
test eax, eax
je 0x4387a9
cmp eax, edx
cmovb edx, eax
mov dword [ebp - 0x868], edx
xor ecx, ecx
mov eax, edx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00464dea
add esp, 4
mov dword [ebp - 0x870], eax
mov dword [eax], 0
cmp ebx, 0xffffffff
je 0x438740
mov ecx, dword [0x4c2e50]
test ecx, ecx
jne 0x43891f
mov edi, dword [ebp - 0x868]
jmp 0x4387f6
mov eax, dword [ebp - 0x870]
test esi, esi
je 0x43881e
test ecx, ecx
jne 0x43881e
lea ecx, [ebp - 0x878]
push ecx
push edi
push eax
push dword [ebp - 0x864]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x43881e
mov esi, 1
jmp 0x438820
xor esi, esi
push esi
push dword [ebp - 0x878]
push edi
push str.DownloadHTMLFile____InternetReadFile_BUFLEN_d_BytesRead_d__d
call fcn.0045f520
mov eax, dword [ebp - 0x878]
add esp, 0x10
test eax, eax
je 0x4388ce
test esi, esi
je 0x4388ce
cmp dword [0x4c2e50], 0
jne 0x438876
push 0
lea ecx, [ebp - 0x890]
push ecx
push eax
push dword [ebp - 0x870]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x438876
mov esi, 1
jmp 0x438878
xor esi, esi
push esi
push dword [ebp - 0x890]
push str.DownloadHTMLFile____WriteFile_BytesWritten_d__d
call fcn.0045f520
mov eax, dword [ebp - 0x890]
add esp, 0xc
cmp eax, dword [ebp - 0x878]
jne 0x4388a5
test esi, esi
je 0x4388a5
mov esi, 1
jmp 0x4388a7
xor esi, esi
mov ecx, dword [0x4a80a9]
add ecx, eax
mov eax, dword [0x4a80ad]
mov dword [0x4a80a9], ecx
adc eax, 0
push eax
push ecx
mov ecx, 0x4a8038
mov dword [0x4a80ad], eax
call fcn.00430700
cmp dword [ebp - 0x878], 0
je 0x4388e9
test esi, esi
je 0x4388e9
mov ecx, dword [0x4c2e50]
test ecx, ecx
je 0x4387f0
push dword [ebp - 0x870]
call fcn.0046d795
mov edi, dword [ebp - 0x87c]
add esp, 4
test esi, esi
jne 0x438908
mov edi, 0x17
jmp 0x43891f
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
mov eax, 2
cmove edi, eax
lea eax, [ebp - 0x888]
push eax
push 0
lea eax, [ebp - 0x89c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x438956
push 0
push 0
push 0
push str.HttpOpenRequest
push 0
call fcn.0042e900
add esp, 0x14
mov edi, eax
mov eax, dword [ebp - 0x864]
test eax, eax
je 0x43836d
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
push eax
call ebx
jmp 0x438373
push 0
push 0
push 0
push str.InternetConnect
push 0
call fcn.0042e900
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 0x14
mov edi, eax
jmp 0x438379
push 0
push 0
push 0
push str.InternetOpen
push 0
call fcn.0042e900
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 0x14
mov edi, eax
test esi, esi
je 0x4389b8
push esi
call ebx
cmp dword [0x4c2e50], 0
je 0x4389c6
mov edi, 0x4c7
push edi
push str.DownloadHTMLFile____End__d_
call fcn.0045f520
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004698aa
mov esp, ebp
pop ebp
ret