Function at 0x4088b0
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
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x12c
mov eax, dword [0x44b654]
xor eax, esp
mov dword [esp + 0x128], eax
push ebx
push ebp
mov ebp, dword [esp + 0x138]
push esi
push edi
push 0xff
lea eax, [esp + 0x3d]
push 0
push eax
mov ebx, ecx
mov esi, edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x40], 4
mov byte [esp + 0x44], 0
call fcn.00427490
add esp, 0xc
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [esp + 0x20], edi
cmp edi, 0xffffffff
je 0x408ac7
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.WININET.dll_InternetOpenW]
mov esi, eax
mov dword [esp + 0x30], esi
test esi, esi
je 0x408ac7
push 0
push 0x84000000
push 0
push 0
push ebp
push esi
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov ebx, eax
test ebx, ebx
jne 0x408976
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x408ac7
mov ebp, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push 0
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x24]
push edx
push 0x20000013
push ebx
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], 4
call ebp
test eax, eax
je 0x408ab4
cmp dword [esp + 0x1c], 0xc8
jne 0x408ab4
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x40]
push ecx
push 1
push ebx
mov dword [esp + 0x40], 0xff
call ebp
push 0
lea edx, [esp + 0x38]
push edx
lea eax, [esp + 0x18]
push eax
push 0x20000005
push ebx
call ebp
test eax, eax
jne 0x4089ed
mov dword [esp + 0x10], eax
jmp 0x408a18
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x408a18
mov eax, 0x51eb851f
mul ecx
mov ebp, edx
shr ebp, 4
cmp ebp, 0x400
jae 0x408a10
mov ebp, 0x400
jmp 0x408a1d
cmp ebp, 0x20000
jbe 0x408a1d
mov ebp, 0x20000
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
jmp 0x408a44
mov edi, dword [esp + 0x20]
test eax, eax
jbe 0x408a64
add dword [esp + 0x14], eax
push 0
lea ecx, [esp + 0x2c]
push ecx
push eax
push esi
push edi
mov dword [esp + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x18]
push edx
push ebp
push esi
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov edi, eax
test edi, edi
je 0x408a80
mov eax, dword [esp + 0x18]
test eax, eax
ja 0x408a40
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
mov ecx, dword [esp + 0x30]
push ecx
call esi
xor eax, eax
test edi, edi
setne al
jmp 0x408ac9
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
xor eax, eax
mov ecx, dword [esp + 0x138]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00425c62
add esp, 0x12c
ret