Function at 0x408070
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, 0x4028
call fcn.0040e930
mov eax, dword [0x48e0ec]
xor eax, esp
mov dword [esp + 0x4024], eax
mov eax, dword [esp + 0x4030]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x4038]
push edi
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
xor ebp, ebp
mov dword [esp + 0x30], eax
push ebp
push ebp
push ebp
push ebp
push str.SpotifyInstaller_1.0
mov byte [0x495ae0], 1
mov edi, 0x32
call dword [sym.imp.WININET.dll_InternetOpenA]
mov ebx, eax
mov dword [esp + 0x10], ebx
test ebx, ebx
jne 0x4080dc
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ebp, eax
jmp 0x408260
push 0
push 0x80000200
push 0
push 0
push esi
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x40810f
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov ebp, eax
mov edi, 0x34
jmp 0x40825d
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
lea ecx, [esp + 0x14]
push 0
push ecx
lea ecx, [esp + 0x24]
mov dword [esp + 0x24], ebp
push ecx
push 0x20000005
push eax
mov dword [esp + 0x28], 4
call esi
push 0
lea eax, [esp + 0x18]
mov dword [esp + 0x28], ebp
push eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x1c], 4
push eax
push 0x20000013
push dword [esp + 0x30]
call esi
cmp dword [esp + 0x24], 0xc8
je 0x40816c
mov edi, 0x33
jmp 0x408251
mov eax, dword [esp + 0x1c]
xor esi, esi
cmp byte [0x495ac4], 0
mov bl, 1
mov dword [0x495adc], eax
mov dword [0x48e038], eax
mov dword [0x48e03c], ebp
mov dword [0x495ad8], ebp
jne 0x408248
nop word [eax + eax]
push 0x495aec
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
push 0x495aec
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
lea eax, [esp + 0x18]
push eax
push 0x4000
lea eax, [esp + 0x3c]
push eax
push dword [esp + 0x2c]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4082ca
mov eax, dword [esp + 0x18]
test bl, bl
je 0x4081fc
xor bl, bl
cmp eax, 2
jb 0x4081fc
cmp byte [esp + 0x34], 0x4d
jne 0x4082a4
cmp byte [esp + 0x35], 0x5a
jne 0x4082a4
test eax, eax
je 0x4082ba
push 0
lea ecx, [esp + 0x30]
push ecx
push eax
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x4082ab
mov eax, dword [esp + 0x18]
cmp dword [esp + 0x2c], eax
jne 0x4082b3
add dword [0x495ad8], eax
add esi, dword [esp + 0x18]
cmp byte [0x495ac4], 0
je 0x4081a0
mov edi, 0x13
mov ebx, dword [esp + 0x10]
push dword [esp + 0x20]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push ebx
call esi
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
sub eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x4034]
mov dword [0x48e030], eax
mov eax, edi
pop edi
pop esi
mov dword [0x48e048], ebp
pop ebp
pop ebx
xor ecx, esp
mov dword [0x48e034], 0
mov dword [0x48e04c], 0
call fcn.00423c9a
add esp, 0x4028
ret
mov edi, 0x36
jmp 0x40824d
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ebp, eax
mov edi, 0xb
jmp 0x40824d
xor eax, eax
mov edi, 0x36
cmp esi, dword [esp + 0x1c]
cmove edi, eax
jmp 0x40824d
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ebp, eax
jmp 0x40824d