Function at 0x480500
Capabilities:
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
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x804]
sub esp, 0x804
push 0xffffffffffffffff
push 0x4ca2a0
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x51c080]
xor eax, ebp
mov dword [ebp + 0x800], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x80c]
mov dword [ebp - 0x2c], eax
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x20], 0xffffffff
xor esi, esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 4], ebx
cmp eax, ebx
je 0x48073a
cmp edi, ebx
je 0x48073a
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x480576
sub eax, edx
sar eax, 1
je 0x48073a
push 0x800
push ebx
lea eax, [ebp]
push eax
call fcn.004ab450
push 0x3ff
push edi
push 0x400
lea ecx, [ebp]
push ecx
call fcn.004a9be0
push 0x5c
lea edx, [ebp]
push edx
call fcn.004a9ce4
add esp, 0x24
cmp eax, ebx
je 0x4805c3
mov word [eax], bx
push ebx
push ebx
lea edx, [ebp]
call fcn.0045e440
add esp, 8
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x480601
lea eax, [ebp]
push eax
push str.Could_not_create_directory___s_
mov ecx, 0x527b30
call fcn.00449000
add esp, 8
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x30], ecx
push 0x5042a0
lea edx, [ebp - 0x30]
push edx
call fcn.004abd6e
push ebx
push 0x80
push 2
push ebx
push ebx
push 0xc0000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x480646
push edi
push str.Could_not_create_File___s_
mov ecx, 0x527b30
call fcn.00449000
add esp, 8
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x34], eax
push 0x5042a0
lea ecx, [ebp - 0x34]
push ecx
call fcn.004abd6e
mov dword [ebp - 0x18], ebx
lea esp, [esp]
mov dword [ebp - 0x24], ebx
push ebx
push ebx
lea edx, [ebp - 0x18]
push edx
mov edi, dword [ebp - 0x2c]
push edi
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
cmp eax, ebx
je 0x480717
mov eax, dword [ebp - 0x18]
push eax
push str.Available_Size___d
mov ecx, 0x527b30
call fcn.00449000
add esp, 8
mov eax, dword [ebp - 0x18]
cmp eax, ebx
jne 0x480697
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], 0xffffffff
jmp 0x48078e
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
mov dword [ebp - 0x1c], esi
cmp esi, ebx
jne 0x4806bc
mov dword [ebp - 0x14], 0x7a
mov dword [ebp - 4], 0xffffffff
jmp 0x48078e
lea ecx, [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x18]
push edx
push esi
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x4806d7
push str.Read_file_data_from_URL_fail__
jmp 0x48070a
mov eax, dword [ebp - 0x24]
cmp eax, ebx
jne 0x4806ed
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], 0xffffffff
jmp 0x48078e
mov dword [ebp - 0x28], ebx
push ebx
lea ecx, [ebp - 0x28]
push ecx
push eax
push esi
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x480729
push str.Write_file_data_fail__
mov ecx, 0x527b30
call fcn.00449000
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], 0xffffffff
jmp 0x48078e
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor esi, esi
mov dword [ebp - 0x1c], esi
jmp 0x480650
mov eax, 0x57
jmp 0x4807b9
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x4807a4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, ebx
je 0x4807af
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x800]
xor ecx, ebp
call fcn.004a998e
add ebp, 0x804
mov esp, ebp
pop ebp
ret 4