Function at 0x4108d0
Capabilities:
Check http status code
Create http request
Download and write a file
Get http content length
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, 0x40
mov dword [ebp - 0xc], 0
cmp dword [ebp + 0x18], 0
je 0x41093d
cmp dword [ebp + 0x10], 0
je 0x4108f2
mov dword [ebp - 0x34], 0x478fac
jmp 0x4108f9
mov dword [ebp - 0x34], 0x478fb4
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
call fcn.00423014
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp + 0x10], 0
je 0x410929
push 0
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.00422ec9
add esp, 0xc
mov dword [ebp - 0x38], eax
jmp 0x410930
mov dword [ebp - 0x38], 1
cmp dword [ebp - 0xc], 0
jne 0x41093d
xor eax, eax
jmp 0x410b69
mov dword [ebp - 8], 4
mov dword [ebp - 0x14], 0
push 0
push 0
push 0
push 0
push str.VsyDownload_1.0
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x410b67
push 0
push 0x84000002
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x41099e
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
jmp 0x410b69
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x24]
push eax
push 0x20000013
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4109c4
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0x24], 0xc8
je 0x4109de
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
jmp 0x410b69
cmp dword [ebp + 0x14], 0
je 0x4109ec
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x10], eax
jmp 0x410a12
lea ecx, [ebp - 0x14]
push ecx
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x10]
push eax
push 0x20000005
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x410a12
mov dword [ebp - 0x10], 0
cmp dword [ebp + 0x10], 0
je 0x410a2c
push 0
push 0
push 0
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.WININET.dll_InternetSetFilePointer]
mov ecx, dword [ebp - 0x10]
add ecx, 1
push ecx
call fcn.0042072a
add esp, 4
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x10]
add eax, 1
push eax
push 0
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00421750
add esp, 0xc
cmp dword [ebp + 0xc], 0
je 0x410a67
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x28]
mov dword [edx], eax
cmp dword [ebp + 0x10], 0
je 0x410a7c
cmp dword [ebp + 0x14], 0
jne 0x410a7c
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp + 0x10]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp - 0x10]
sub edx, dword [ebp - 0x18]
cmp edx, 0x400
jb 0x410ab0
mov dword [ebp - 0x3c], 0x400
jmp 0x410ab9
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x18]
mov dword [ebp - 0x3c], eax
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp + 0x18]
neg eax
sbb eax, eax
not eax
and eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp dword [ebp - 0xc], 0
je 0x410afc
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 0x1c]
push eax
push 1
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00422dbd
add esp, 0x10
mov dword [ebp - 0x40], eax
jmp 0x410b03
mov dword [ebp - 0x40], 1
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x1c], 0
ja 0x410a8a
cmp dword [ebp - 0xc], 0
je 0x410b34
mov eax, dword [ebp - 0xc]
push eax
call fcn.00422bff
add esp, 4
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004229f9
add esp, 4
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp + 0xc], 0
jne 0x410b60
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
push edx
call fcn.00421fec
add esp, 4
mov eax, 1
jmp 0x410b69
xor eax, eax
mov esp, ebp
pop ebp
ret