Function at 0x401770
Capabilities:
Create http request
Download and write a file
Query remote server for available data
Read data from internet
Receive and write data from server to client
Receive data
Set file attributes
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x41b0a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x28], esi
push 0xa
push ecx
lea eax, [esp + 0x50]
mov ecx, esp
mov dword [esp + 0x34], esp
push eax
mov dword [esp + 0x48], 1
call fcn.00411cb3
mov ecx, esi
call fcn.00403d10
mov ecx, dword [esp + 0x44]
push ecx
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntry]
mov eax, dword [0x4234f0]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.WININET.dll_InternetOpenA]
test eax, eax
mov dword [esp + 0x2c], eax
je 0x40195f
mov edx, dword [esp + 0x44]
push 0
push 0x24000000
push 0
push 0
push edx
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov ebp, eax
test ebp, ebp
je 0x40195f
mov eax, dword [esp + 0x48]
push 0
push 2
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
test eax, eax
mov dword [esp + 0x20], eax
jne 0x401837
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x40195f
mov ecx, dword [0x4234f0]
mov dword [esp + 0x24], ecx
mov ebx, dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
push 0
lea edx, [esp + 0x14]
push 0
push edx
push ebp
mov byte [esp + 0x4c], 4
call ebx
mov eax, dword [esp + 0x10]
add eax, 2
push eax
call fcn.00405fe8
mov ecx, dword [esp + 0x14]
mov esi, eax
add ecx, 2
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push ecx
push esi
push ebp
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x401923
mov edx, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x30]
push 0
mov byte [edx + esi], 0
mov ecx, dword [esp + 0x20]
push eax
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call fcn.00405eff
mov eax, dword [esp + 0x20]
add esp, 4
test eax, eax
je 0x40199e
push 0
lea edx, [esp + 0x14]
push 0
push edx
push ebp
call ebx
mov eax, dword [esp + 0x10]
add eax, 2
push eax
call fcn.00405fe8
mov ecx, dword [esp + 0x14]
mov esi, eax
add ecx, 2
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
push ecx
push esi
push ebp
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40189d
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push 0xa
push ecx
lea eax, [esp + 0x50]
mov ecx, esp
mov dword [esp + 0x54], esp
push eax
call fcn.00411cb3
mov ecx, dword [esp + 0x30]
call fcn.00403d10
lea ecx, [esp + 0x24]
mov byte [esp + 0x3c], 3
call fcn.00411f3e
lea ecx, [esp + 0x14]
mov byte [esp + 0x3c], 2
call fcn.00411f3e
lea ecx, [esp + 0x18]
mov byte [esp + 0x3c], 1
call fcn.00411f3e
lea ecx, [esp + 0x44]
mov byte [esp + 0x3c], 0
call fcn.00411f3e
lea ecx, [esp + 0x48]
mov dword [esp + 0x3c], 0xffffffff
call fcn.00411f3e
xor eax, eax
jmp 0x401a1b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebp
call esi
mov ecx, dword [esp + 0x2c]
push ecx
call esi
mov eax, dword [esp + 0x4c]
test eax, eax
jne 0x4019cd
mov edx, dword [esp + 0x48]
push 0x80
push edx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [esp + 0x24]
mov byte [esp + 0x3c], 3
call fcn.00411f3e
lea ecx, [esp + 0x14]
mov byte [esp + 0x3c], 2
call fcn.00411f3e
lea ecx, [esp + 0x18]
mov byte [esp + 0x3c], 1
call fcn.00411f3e
lea ecx, [esp + 0x44]
mov byte [esp + 0x3c], 0
call fcn.00411f3e
lea ecx, [esp + 0x48]
mov dword [esp + 0x3c], 0xffffffff
call fcn.00411f3e
mov eax, 1
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x30
ret 0xc