Function at 0x408aa0
Capabilities:
Create http request
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x53a9e6
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1084
call fcn.00513d10
mov eax, dword [0x58c950]
xor eax, esp
mov dword [esp + 0x1080], eax
push ebx
push esi
push edi
mov eax, dword [0x58c950]
xor eax, esp
push eax
lea eax, [esp + 0x1098]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
push 0
push 0
push 0
push 0
push 0x5689e0
mov esi, ecx
mov dword [esp + 0x3c], eax
call dword [sym.imp.WININET.dll_InternetOpenW]
mov edi, eax
mov dword [esp + 0x18], edi
test edi, edi
je 0x408b65
mov ebx, 8
cmp dword [esi + 0x28], ebx
jb 0x408b1a
mov eax, dword [esi + 0x14]
jmp 0x408b1d
lea eax, [esi + 0x14]
push eax
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntryW]
cmp dword [esi + 0x28], ebx
jb 0x408b2e
mov eax, dword [esi + 0x14]
jmp 0x408b31
lea eax, [esi + 0x14]
push 0
push SysReAllocString
push 0
push 0
push eax
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov ebx, eax
test ebx, ebx
jne 0x408b6c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.InternetOpenUrlW_Err___u_r_n
call fcn.00408e70
add esp, 8
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor al, al
jmp 0x408de1
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea ecx, [esp + 0x18]
push ecx
push 2
push ebx
mov dword [esp + 0x24], 0x7d0
call edi
push 4
lea edx, [esp + 0x18]
push edx
push 3
push ebx
mov dword [esp + 0x24], 2
call edi
push 0x3e
xor edi, edi
lea ecx, [esp + 0x52]
xor eax, eax
push edi
push ecx
mov word [esp + 0x58], ax
call fcn.00513690
add esp, 0xc
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x54]
push ecx
push 5
push ebx
mov dword [esp + 0x34], 0x20
mov dword [esp + 0x38], edi
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x408c06
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.HttpQueryInfoW_Err___u_r_n
call fcn.00408e70
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
add esp, 8
push ebx
call esi
mov edx, dword [esp + 0x18]
push edx
call esi
xor al, al
jmp 0x408de1
lea eax, [esp + 0x4c]
push eax
call fcn.0050f910
add esp, 4
mov dword [esi], eax
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], edi
mov byte [esp + 0x34], 0
mov dword [esp + 0x10a0], edi
lea edi, [esp + 0x30]
call fcn.00407c90
lea ecx, [esp + 0x30]
push ecx
sub esp, 0x1c
mov ecx, esp
xor edi, edi
mov dword [esp + 0x4c], esp
mov dword [esp + 0x30], edi
push 0xffffffffffffffff
xor edx, edx
mov dword [ecx + 0x18], 7
mov dword [ecx + 0x14], edi
lea eax, [esi + 0x2c]
push edi
mov word [ecx + 4], dx
call fcn.00403510
mov byte [esp + 0x10c0], 1
mov byte [esp + 0x10c0], 0
call fcn.0040aae0
add esp, 0x20
cmp byte [ebp + 8], 0
jne 0x408cd6
cmp dword [esp + 0x48], 0x10
mov eax, dword [esp + 0x34]
jae 0x408c92
lea eax, [esp + 0x34]
push 0x568a38
push eax
lea eax, [esp + 0x18]
push eax
call fcn.0050f6d9
add esp, 0xc
cmp dword [esp + 0x10], edi
jne 0x408cd6
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call esi
mov ecx, dword [esp + 0x18]
push ecx
call esi
mov dword [esp + 0x10a0], 0xffffffff
lea ecx, [esp + 0x30]
call fcn.00403ff0
xor al, al
jmp 0x408de1
push 0x1000
lea edx, [esp + 0x90]
push edi
push edx
call fcn.00513690
add esp, 0xc
cmp byte [esi + 0xc], 0
mov dword [esp + 0x1c], edi
je 0x408d80
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
lea eax, [esp + 0x1c]
push eax
push 0x1000
lea ecx, [esp + 0x94]
push ecx
push ebx
call edi
test eax, eax
je 0x408d80
mov eax, dword [esp + 0x1c]
test eax, eax
jbe 0x408d80
add dword [esi + 4], eax
cmp byte [ebp + 8], 0
jne 0x408d5e
mov edx, dword [esp + 0x10]
push edx
push eax
lea eax, [esp + 0x94]
push 1
push eax
call fcn.0050f88e
push 0x1000
lea ecx, [esp + 0xa0]
push 0
push ecx
call fcn.00513690
add esp, 0x1c
cmp byte [esi + 0xc], 0
jne 0x408d00
jmp 0x408d86
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x408d80
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x408d80
dec eax
push eax
lea edx, [esp + 0x90]
push edx
push ecx
call fcn.00514620
add esp, 0xc
cmp byte [ebp + 8], 0
jne 0x408d93
mov eax, dword [esp + 0x10]
push eax
call fcn.0050f9a8
add esp, 4
push ebx
mov ebx, dword [sym.imp.WININET.dll_InternetCloseHandle]
call ebx
mov ecx, dword [esp + 0x18]
push ecx
call ebx
mov edx, dword [esi + 4]
cmp edx, dword [esi]
sete bl
mov dword [esp + 0x10a0], 0xffffffff
cmp dword [esp + 0x48], 0x10
jb 0x408dca
mov eax, dword [esp + 0x34]
push eax
call fcn.00410507
add esp, 4
mov dword [esp + 0x48], 0xf
mov dword [esp + 0x44], 0
mov byte [esp + 0x34], 0
mov al, bl
mov ecx, dword [esp + 0x1098]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1080]
xor ecx, esp
call fcn.0050e8a6
mov esp, ebp
pop ebp
ret 0xc