Function at 0x1002640
Capabilities:
Check internet connectivity via wininet
Create http request
Delete file
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:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 0x14], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x10], 0
push 0xffff
call fcn.01002c90
add esp, 4
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
je 0x10026ae
jmp 0x10027ad
push 0x80
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x10026f1
jmp 0x10027ad
push 0
push 0
push 0
push 0
push 0x100113c
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x1002712
jmp 0x10027ad
push 0
push 0x80000000
push 0
push 0
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x1002736
jmp 0x10027ad
push 0
push 0
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
test eax, eax
jne 0x100274e
jmp 0x10027ad
cmp dword [ebp - 0x18], 0
jne 0x1002756
jmp 0x10027a6
cmp dword [ebp - 0x18], 0xffff
jbe 0x1002766
mov dword [ebp - 0x18], 0xffff
lea edx, [ebp - 0x24]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x1002782
jmp 0x10027ad
push 0
lea eax, [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10027a0
jmp 0x10027ad
cmp dword [ebp - 0x18], 0
ja 0x1002736
mov dword [ebp - 0x14], 1
cmp dword [ebp - 8], 0
je 0x10027bd
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], 0
je 0x10027cd
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 4], 0
je 0x10027dd
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0xc], 0
je 0x10027ed
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x14], 0
jne 0x10027fd
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.01002c80
add esp, 4
mov eax, dword [ebp - 0x14]
mov esp, ebp
pop ebp
ret 8