Function at 0x40605d
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:
mov eax, 0x43afe3
call fcn.00439f7c
sub esp, 0x34
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.DLL_GetLastError]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
xor ecx, ecx
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [eax + 4], ecx
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp + 0x10]
cmp dword [eax + 0x14], 8
jb 0x406095
mov eax, dword [eax]
push ecx
push 6
push 2
push ecx
push ecx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x14], eax
xor eax, eax
mov dword [ebp - 4], eax
cmp dword [ebp - 0x14], 0xffffffff
je 0x4062b5
push eax
push eax
push eax
push eax
push str.Installer__compatible__MSIE_6.0b__Windows_NT_5.0__.NET_CLR_1.0.2914_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x4060dd
call ebx
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
jmp 0x40628b
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], 8
jb 0x4060e8
mov eax, dword [eax]
push 0
push 0x84403900
push 0xffffffffffffffff
push 0x4403d0
push eax
push dword [ebp - 0x18]
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov dword [ebp - 0x10], eax
xor eax, eax
mov byte [ebp - 4], 2
cmp dword [ebp - 0x10], eax
jne 0x40611b
call ebx
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
jmp 0x406286
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], eax
mov eax, 0x20000
push eax
mov dword [ebp - 0x3c], eax
call fcn.0040e021
pop ecx
mov dword [ebp - 0x34], eax
test eax, eax
je 0x406158
push 0x20000
push 0
push eax
call fcn.0040eb10
mov eax, dword [ebp - 0x34]
add esp, 0xc
mov dword [ebp - 0x40], eax
jmp 0x40615c
and dword [ebp - 0x40], 0
mov byte [ebp - 4], 3
cmp dword [ebp - 0x40], 0
jne 0x406226
call ebx
push 0
jmp 0x406275
xor eax, eax
cmp dword [ebp - 0x24], eax
jbe 0x406245
cmp dword [ebp - 0x20], eax
jne 0x4061d4
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x20000013
push dword [ebp - 0x10]
mov dword [ebp - 0x1c], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4061d4
cmp dword [ebp - 0x28], 0xc8
jne 0x4061d4
push 0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x20]
push eax
push 0x20000005
push dword [ebp - 0x10]
mov dword [ebp - 0x1c], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x4061d4
and dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x24]
add dword [ebp - 0x2c], eax
push 0
lea ecx, [ebp - 0x38]
push ecx
push eax
push dword [ebp - 0x40]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x4062db
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
test eax, eax
jg 0x406206
mov dword [ebp - 0x34], 0x18cba80
fild dword [ebp - 0x2c]
fmul qword [0x440d30]
fidiv dword [ebp - 0x34]
call fcn.00439ed0
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
test ecx, ecx
je 0x406226
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [ebp - 0x24]
push eax
push 0x20000
push dword [ebp - 0x40]
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x406173
jmp 0x406270
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x20000013
push dword [ebp - 0x10]
mov dword [ebp - 0x1c], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x406270
cmp dword [ebp - 0x28], 0xc8
je 0x4062bf
call ebx
push dword [ebp - 0x40]
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
call fcn.0040da6f
pop ecx
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x18]
call esi
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x14]
call edi
mov eax, dword [ebp + 8]
inc dword [eax + 4]
push 0x1388
call dword [sym.imp.KERNEL32.DLL_Sleep]
inc dword [ebp - 0x30]
cmp dword [ebp - 0x30], 3
jge 0x4062fb
xor ecx, ecx
jmp 0x40608a
call ebx
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
jmp 0x4062fb
push dword [ebp - 0x40]
call fcn.0040da6f
pop ecx
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x18]
call esi
push dword [ebp - 0x14]
call edi
xor eax, eax
jmp 0x4062fe
call ebx
mov ecx, dword [ebp + 8]
push dword [ebp - 0x40]
mov dword [ecx + 8], eax
call fcn.0040da6f
pop ecx
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x18]
call esi
push dword [ebp - 0x14]
call edi
push 2
pop eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0xc