Function at 0x40fee0
Capabilities:
Connect to http server
Download and write a file
Get file size
Parse url
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Set file attributes
Write file on windows

Disassembly:
mov eax, 0x129c
call fcn.0042f240
mov eax, dword [0x46b600]
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor ebx, ebx
mov esi, ecx
mov dword [esp + 0x12a4], eax
mov eax, dword [esi + 0x3c]
push ebx
push eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], ebx
call edi
test eax, eax
je 0x410495
lea eax, [esp + 0x104]
mov dword [esp + 0x40], eax
mov eax, 0x20
mov dword [esp + 0x44], eax
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x1a4]
mov dword [esp + 0x50], eax
lea ecx, [esp + 0x264]
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x2c], ecx
mov ecx, 0x40
lea edx, [esp + 0x68]
mov dword [esp + 0x38], edx
push 0x90000000
lea edx, [esp + 0xec]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x64], ecx
mov ecx, dword [esp + 0x12b8]
mov dword [esp + 0x50], edx
push ebx
lea edx, [esp + 0x230]
push ecx
mov dword [esp + 0x34], 0x3c
mov dword [esp + 0x64], 0x80
mov dword [esp + 0x68], edx
call dword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
jne 0x40ffc8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x38
push str.ProjectAutoFetch2AutoFetchClient.cpp
push str._s___d__InternetCrackUrl_failed_with__d_n
call fcn.00416520
add esp, 0x10
jmp 0x410495
mov eax, dword [esp + 0x30]
push ebp
mov ebp, 3
cmp eax, ebp
jne 0x41000e
cmp dword [esi + 0x40], ebx
je 0x410084
cmp dword [esi + 0x4c], ebp
jne 0x41007a
mov eax, dword [esi + 0x44]
lea edx, [esp + 0x68]
push edx
push eax
call fcn.0042f2ec
add esp, 8
test eax, eax
jne 0x41007a
movzx eax, word [esp + 0x40]
cmp eax, dword [esi + 0x48]
jne 0x41007a
mov ecx, dword [esi + 0x40]
mov dword [esp + 0x1c], ecx
mov eax, dword [esi + 0x3c]
push ebx
push eax
call edi
test eax, eax
je 0x41044b
mov edi, dword [esp + 0x12b8]
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov bl, byte [esp + 0x12bc]
test bl, bl
je 0x4100f7
cmp dword [esp + 0x34], ebp
jne 0x4100f7
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x4100d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x68
jmp 0x410123
mov edx, dword [esi + 0x40]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edx, dword [esp + 0x34]
xor eax, eax
cmp edx, 1
mov edx, dword [esp + 0x12b0]
push ebx
setne al
push ebx
lea ecx, [esp + 0x70]
lea eax, [eax + eax + 1]
push eax
push ebx
push ebx
push ebx
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetConnectA]
cmp eax, ebx
mov dword [esp + 0x1c], eax
jne 0x41000e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x58
push str.ProjectAutoFetch2AutoFetchClient.cpp
push str._s___d__InternetConnect_failed_with__d_n
call fcn.00416520
add esp, 0x10
jmp 0x41044b
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x18]
push 2
push 0
push 0
push ecx
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x41013c
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
jne 0x41013a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x75
push str.ProjectAutoFetch2AutoFetchClient.cpp
push str._s___d__CreateFile__s__failed_with__d_n
call fcn.00416520
add esp, 0x14
jmp 0x41044b
xor ebp, ebp
mov eax, dword [esp + 0x34]
cmp eax, 1
jne 0x4101ba
mov edi, dword [esp + 0x12b0]
push 0x40f550
push edi
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
mov ebx, dword [esp + 0x12b4]
push esi
push 0xa8400002
push 0
push 0
push ebx
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov edi, eax
test edi, edi
mov dword [esp + 0x10], edi
jne 0x41019f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x98
push str.ProjectAutoFetch2AutoFetchClient.cpp
push str._s___d__InternetOpenUrl__s__failed_with__d_n
call fcn.00416520
add esp, 0x14
jmp 0x410440
mov edx, dword [esi + 0x3c]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
push edx
call ebp
test eax, eax
je 0x410440
jmp 0x4103a7
cmp eax, 3
jne 0x41039d
mov ecx, dword [esp + 0x1c]
push 0
push 0x84400000
push 0
push 0
push str.HTTP_1.0
lea eax, [esp + 0x1bc]
push eax
push 0x452c14
push ecx
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov ecx, eax
test ecx, ecx
mov dword [esp + 0x10], ecx
jne 0x410220
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [esp + 0x1ac]
push edx
push 0xac
push str.ProjectAutoFetch2AutoFetchClient.cpp
push str._s___d__HttpOpenRequest__s__failed_with__d_n
call fcn.00416520
add esp, 0x14
jmp 0x410440
mov eax, dword [esi + 0xc]
mov edx, dword [eax - 0xc]
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionA]
push edx
push eax
push 0x2b
push ecx
call edi
mov eax, dword [esi + 0x10]
mov ecx, dword [eax - 0xc]
mov edx, dword [esp + 0x10]
push ecx
push eax
push 0x2c
push edx
call edi
test bl, bl
je 0x4102c8
test ebp, ebp
jle 0x4102c8
push ebp
lea eax, [esp + 0x12c]
push str.range:bytes_d_
push eax
call fcn.004306be
lea eax, [esp + 0x134]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410270
push 0
push 0
sub eax, edx
mov edx, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x134]
push ecx
push edx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x4102c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x12c]
push eax
push 0xbd
push str.ProjectAutoFetch2AutoFetchClient.cpp
push str._s___d__HttpSendRequest_header_s__failed_with__d_n
call fcn.00416520
add esp, 0x14
jmp 0x410440
mov ebx, ebp
mov dword [esp + 0x14], ebx
jmp 0x410306
mov ecx, dword [esp + 0x10]
push 0
push 0
push 0
push 0
push ecx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x410302
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xc7
push str.ProjectAutoFetch2AutoFetchClient.cpp
push str._s___d__HttpSendRequest_0__failed_with__d_n
call fcn.00416520
add esp, 0x10
jmp 0x410440
mov ebx, dword [esp + 0x14]
mov edx, dword [esi + 0x3c]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x410440
mov edx, dword [esp + 0x10]
push 0
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0xb0]
push ecx
push 5
push edx
mov dword [esp + 0x38], 0x40
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x410391
lea eax, [esp + 0xa8]
push eax
call fcn.0042f546
mov ecx, eax
mov eax, dword [esp + 0x12c4]
add ecx, ebp
add esp, 4
cmp ecx, eax
je 0x410391
push eax
lea edx, [esp + 0xac]
push edx
call fcn.0042f546
add esp, 4
add eax, ebp
push eax
push 0xd5
push str.ProjectAutoFetch2AutoFetchClient.cpp
push str._s___d__HttpQueryInfo__file_size_differ____d_:__d_n
call fcn.00416520
add esp, 0x14
jmp 0x410440
mov edi, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x4103ab
mov edi, dword [esp + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push eax
push 0x1000
lea ecx, [esp + 0x2b0]
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x410440
mov eax, dword [esp + 0x20]
test eax, eax
je 0x41043c
mov ecx, dword [esp + 0x18]
push 0
lea edx, [esp + 0x68]
push edx
push eax
add ebx, eax
lea eax, [esp + 0x2b4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4104bf
mov edx, dword [esi + 0x3c]
push 0
push edx
call ebp
test eax, eax
je 0x41043c
mov eax, dword [esi + 0x3c]
push 0
push eax
call ebp
test eax, eax
je 0x41041f
mov ecx, dword [esi + 0x18]
mov edx, dword [esp + 0x12c0]
push ecx
push ebx
push edx
push 0x13
call dword [esi + 0x14]
lea eax, [esp + 0x20]
push eax
push 0x1000
lea ecx, [esp + 0x2b0]
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4103c8
mov dword [esp + 0x14], ebx
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
test eax, eax
pop ebp
je 0x410486
mov dword [esi + 0x40], eax
lea eax, [esp + 0x64]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410460
sub eax, edx
push eax
lea eax, [esp + 0x68]
push eax
lea ecx, [esi + 0x44]
call fcn.004014c0
movzx ecx, word [esp + 0x3c]
mov edx, dword [esp + 0x30]
mov dword [esi + 0x48], ecx
mov dword [esi + 0x4c], edx
mov eax, dword [esp + 0xc]
test eax, eax
je 0x410495
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x12bc]
xor eax, eax
pop edi
cmp ecx, edx
mov ecx, dword [esp + 0x12a0]
pop esi
sete al
pop ebx
call fcn.0042f2ae
add esp, 0x129c
ret 0x14
mov dword [esp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xe5
push str.ProjectAutoFetch2AutoFetchClient.cpp
push str._s___d__WriteFile_failed_with__d_n
call fcn.00416520
add esp, 0x10
jmp 0x410440