Function at 0x408aa0
Capabilities:
Check http status code
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
lea ebp, [esp - 0x1f44]
mov eax, 0x1fc4
call fcn.0041c330
mov eax, dword [0x42b35c]
xor eax, ebp
mov dword [ebp + 0x1f40], eax
mov eax, dword [ebp + 0x1f4c]
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push ebx
push 0x426628
push ebx
push str.AskPartnerCobranding
mov edi, ecx
mov dword [ebp - 0x7c], eax
mov esi, edx
mov dword [ebp - 0x6c], ebx
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x74], eax
cmp eax, ebx
je 0x408b0f
push ebx
push 0x80000000
push ebx
push ebx
push edi
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov dword [ebp - 0x68], eax
cmp eax, ebx
jne 0x408b16
mov ecx, dword [ebp - 0x74]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
xor eax, eax
jmp 0x408da4
push 7
push 0x427458
push edi
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x80], 4
call fcn.0040d753
add esp, 0xc
test eax, eax
jne 0x408b76
mov ecx, dword [ebp - 0x68]
push ebx
lea edx, [ebp - 0x80]
push edx
lea eax, [ebp - 0x78]
push eax
push 0x20000013
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x408b6e
mov eax, dword [ebp - 0x78]
cmp eax, 0xc8
je 0x408b65
cmp eax, 0xc9
jne 0x408d8f
mov dword [ebp - 0x6c], 1
jmp 0x408b79
mov dword [ebp - 0x6c], ebx
jmp 0x408d8f
mov dword [ebp - 0x6c], ebx
cmp dword [ebp + 0x1f50], ebx
je 0x408cc9
cmp esi, ebx
je 0x408d8f
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x408ba0
xor eax, eax
jmp 0x408bbd
lea edi, [eax + eax]
mov eax, edi
call fcn.004145e0
mov eax, esi
mov edx, 3
mov ecx, edi
mov esi, esp
mov dword [ebp - 0x64], esp
call fcn.00401000
push 0x427468
push eax
lea edx, [ebp - 0x70]
push edx
call fcn.0040da79
push 0x1f9f
lea eax, [ebp - 0x5f]
push ebx
push eax
mov dword [ebp - 0x64], ebx
mov byte [ebp - 0x60], bl
call fcn.00414620
mov eax, dword [ebp - 0x68]
add esp, 0x18
lea ecx, [ebp - 0x64]
push ecx
push 0x1fa0
lea edx, [ebp - 0x60]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x408caf
mov ecx, dword [ebp - 0x64]
cmp ecx, ebx
je 0x408caf
mov eax, dword [ebp - 0x70]
cmp eax, ebx
je 0x408c25
push eax
push ecx
lea ecx, [ebp - 0x60]
push 1
push ecx
call fcn.0040dc2e
add esp, 0x10
lea edx, [ebp - 0x60]
push edx
mov byte [ebp - 0x60], bl
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
cmp edi, 0x3fffffff
jle 0x408c41
xor eax, eax
jmp 0x408c57
lea eax, [edi + edi]
call fcn.004145e0
mov esi, esp
push 3
mov edx, edi
lea eax, [ebp - 0x60]
call fcn.00408a70
mov ecx, eax
lea esi, [ecx + 2]
lea esp, [esp]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x408c60
sub ecx, esi
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x7c]
call fcn.00406fc0
push 0x1f9f
lea eax, [ebp - 0x5f]
push ebx
push eax
mov dword [ebp - 0x64], ebx
mov byte [ebp - 0x60], bl
call fcn.00414620
mov eax, dword [ebp - 0x68]
add esp, 0xc
lea ecx, [ebp - 0x64]
push ecx
push 0x1fa0
lea edx, [ebp - 0x60]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x408c03
mov eax, dword [ebp - 0x70]
cmp eax, ebx
je 0x408cbf
push eax
call fcn.0040dd27
add esp, 4
call fcn.0040d916
jmp 0x408d8f
push 0x1f9f
lea ecx, [ebp - 0x5f]
push ebx
push ecx
mov dword [ebp - 0x64], ebx
mov byte [ebp - 0x60], bl
call fcn.00414620
mov ecx, dword [ebp - 0x68]
add esp, 0xc
lea edx, [ebp - 0x64]
push edx
push 0x1fa0
lea eax, [ebp - 0x60]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x408d8f
cmp dword [ebp - 0x64], ebx
je 0x408d8f
lea edx, [ebp - 0x60]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
cmp edi, 0x3fffffff
jle 0x408d22
xor eax, eax
jmp 0x408d38
lea eax, [edi + edi]
call fcn.004145e0
mov esi, esp
push 3
mov edx, edi
lea eax, [ebp - 0x60]
call fcn.00408a70
mov ecx, eax
lea esi, [ecx + 2]
lea ecx, [ecx]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x408d40
sub ecx, esi
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x7c]
call fcn.00406fc0
push 0x1f9f
lea eax, [ebp - 0x5f]
push ebx
push eax
mov dword [ebp - 0x64], ebx
mov byte [ebp - 0x60], bl
call fcn.00414620
mov eax, dword [ebp - 0x68]
add esp, 0xc
lea ecx, [ebp - 0x64]
push ecx
push 0x1fa0
lea edx, [ebp - 0x60]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x408d00
mov ecx, dword [ebp - 0x68]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ecx
call esi
mov edx, dword [ebp - 0x74]
push edx
call esi
mov eax, dword [ebp - 0x6c]
lea esp, [ebp - 0x8c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1f40]
xor ecx, ebp
call fcn.0040cc45
add ebp, 0x1f44
mov esp, ebp
pop ebp
ret