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 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 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]
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x4070b0
call ebx
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 ebx
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
mov eax, dword [ebp - 0x34]
add esp, 0xc
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 ebx
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]
test 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]
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 0x4072ae
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
test eax, eax
jg 0x4071d9
mov dword [ebp - 0x34], 0x18cba80
fild dword [ebp - 0x2c]
fmul qword [0x442ed8]
fidiv dword [ebp - 0x34]
call fcn.0043be80
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
test 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]
test 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]
test eax, eax
je 0x407243
cmp dword [ebp - 0x28], 0xc8
je 0x407292
call ebx
push dword [ebp - 0x40]
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
call fcn.00423dde
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 0x4072ce
xor ecx, ecx
jmp 0x40705d
call ebx
mov ecx, dword [ebp + 8]
mov dword [ecx + 8], eax
jmp 0x4072ce
push dword [ebp - 0x40]
call fcn.00423dde
pop ecx
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x18]
call esi
push dword [ebp - 0x14]
call edi
xor eax, eax
jmp 0x4072d1
call ebx
mov ecx, dword [ebp + 8]
push dword [ebp - 0x40]
mov dword [ecx + 8], eax
call fcn.00423dde
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