Function at 0x407030
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, 0x43d034
call fcn.0043bf2c
sub esp, 0x34
mov eax, dword [ebp + 8]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov ebx, 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 0x407068
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 0x407288
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]
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x4070b0
call esi
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
jmp 0x40725e
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x14], 8
jb 0x4070bb
mov eax, dword [eax]
push 0
push 0x84403900
push 0xffffffffffffffff
push 0x442548
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 0x4070ee
call esi
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
jmp 0x407259
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.00411f5b
pop ecx
mov dword [ebp - 0x34], eax
test eax, eax
je 0x40712b
push 0x20000
push 0
push eax
call fcn.004244d0
sub esp, 0xfffffff4
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x40], eax
jmp 0x40712f
and dword [ebp - 0x40], 0
mov byte [ebp - 4], 3
cmp dword [ebp - 0x40], 0
jne 0x4071f9
call esi
push 0
jmp 0x407248
xor eax, eax
cmp dword [ebp - 0x24], eax
jbe 0x407218
cmp dword [ebp - 0x20], eax
jne 0x4071a7
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]
or eax, eax
je 0x4071a7
cmp dword [ebp - 0x28], 0xc8
jne 0x4071a7
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 0x4071a7
and dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x38]
add dword [ebp - 0x2c], eax
push 0
push ecx
push eax
push dword [ebp - 0x40]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WriteFile]
or eax, eax
je 0x4072ae
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
or eax, eax
jg 0x4071d9
mov dword [ebp - 0x34], 0x18cba80
fild dword [ebp - 0x2c]
fmul qword [0x443108]
fidiv dword [ebp - 0x34]
call fcn.0043be80
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
or ecx, ecx
je 0x4071f9
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]
or eax, eax
jne 0x407146
jmp 0x407243
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]
or eax, eax
je 0x407243
cmp dword [ebp - 0x28], 0xc8
je 0x407292
call esi
push dword [ebp - 0x40]
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
call fcn.00423dde
pop ecx
push dword [ebp - 0x10]
call ebx
push dword [ebp - 0x18]
call ebx
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 0x4072ce
xor ecx, ecx
jmp 0x40705d
call esi
mov ebx, dword [ebp + 8]
mov dword [ebx + 8], eax
jmp 0x4072ce
push dword [ebp - 0x40]
call fcn.00423dde
pop ecx
push dword [ebp - 0x10]
call ebx
push dword [ebp - 0x18]
call ebx
push dword [ebp - 0x14]
call edi
xor eax, eax
jmp 0x4072d1
call esi
mov ecx, dword [ebp + 8]
push dword [ebp - 0x40]
mov dword [ecx + 8], eax
call fcn.00423dde
pop ecx
push dword [ebp - 0x10]
call ebx
push dword [ebp - 0x18]
call ebx
push dword [ebp - 0x14]
call edi
push 2
pop eax
mov edx, dword [ebp - 0xc]
pop edi
pop ebx
mov dword fs:[0], edx
pop esi
leave
ret 0xc