Function at 0x40bcc0
Capabilities:
Download and write a file
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x820
mov eax, dword [0x469ea0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x808]
push eax
mov edi, ecx
mov edx, dword [edi + 0x14]
push 0x800
lea ecx, [ebp - 0x804]
push ecx
xor esi, esi
push edx
mov dword [ebp - 0x810], edi
mov dword [ebp - 0x804], esi
mov dword [ebp - 0x808], esi
xor ebx, ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov eax, dword [ebp - 0x808]
test eax, eax
je 0x40beba
jmp 0x40bd2c
mov esi, dword [ebp - 0x80c]
mov edi, dword [ebp - 0x810]
mov ecx, dword [edi + 0x1c]
add esi, eax
mov dword [ebp - 0x80c], esi
fild dword [ebp - 0x80c]
mov dword [ebp - 0x814], ecx
sub esp, 8
fst qword [ebp - 0x81c]
fild dword [ebp - 0x814]
fdiv qword [0x459118]
fdivp st(1)
fstp qword [esp]
push str._PercentDone:
push ecx
push str._FileSize:
push esi
push str._Total:
push eax
push str.Percent:
push 0x46d7d0
call fcn.0040b020
add esp, 8
mov ecx, eax
call fcn.0040a8b0
push eax
call fcn.0040b020
add esp, 8
mov ecx, eax
call fcn.0040a6d0
push eax
call fcn.0040b020
add esp, 8
mov ecx, eax
call fcn.0040a6d0
push eax
call fcn.0040b020
add esp, 8
mov ecx, eax
call fcn.0040aa90
mov esi, eax
push 0xa
mov ecx, esi
call fcn.0040b270
mov eax, dword [esi]
mov eax, dword [eax + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x40bde8
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40bde8
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40be10
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x40be01
or eax, 4
push 0
push eax
call fcn.00409360
lea esp, [esp]
push 0x4590e0
push 0x46d7d0
call fcn.0040b020
mov eax, 0x66666667
imul ebx
sar edx, 2
mov ebx, edx
shr ebx, 0x1f
add esp, 8
add ebx, edx
jne 0x40be10
mov esi, dword [ebp - 0x810]
fild dword [esi + 0x1c]
fdiv qword [0x459118]
fdivr qword [ebp - 0x81c]
call fcn.0043f9f0
fild dword [ebp - 0x80c]
fld qword [0x4590d8]
push 0
lea ecx, [ebp - 0x820]
fdiv st(1), st(0)
push ecx
push 0x800
mov ebx, eax
mov eax, dword [esi + 0x20]
lea edx, [ebp - 0x804]
push edx
push eax
mov dword [esi], ebx
fdivp st(1)
fstp dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40bf5b
mov eax, dword [esi + 0x14]
lea ecx, [ebp - 0x808]
push ecx
push 0x800
lea edx, [ebp - 0x804]
push edx
push eax
call dword [sym.imp.WININET.dll_InternetReadFile]
mov eax, dword [ebp - 0x808]
test eax, eax
jne 0x40bd20
mov edi, esi
push 0xa
mov ecx, 0x46d7d0
call fcn.0040b270
mov ecx, dword [0x46d7d0]
mov eax, dword [ecx + 4]
xor esi, esi
test byte [eax + 0x46d7dc], 6
jne 0x40bef3
mov eax, dword [eax + 0x46d808]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40bef3
mov esi, 4
mov ecx, dword [0x46d7d0]
mov ecx, dword [ecx + 4]
add ecx, 0x46d7d0
test esi, esi
je 0x40bf1c
mov eax, dword [ecx + 0xc]
or eax, esi
cmp dword [ecx + 0x38], 0
jne 0x40bf14
or eax, 4
push 0
push eax
call fcn.00409360
push str.Finished_downloading_
push 0x46d7d0
call fcn.0040b020
push eax
call fcn.0040bc60
mov edx, dword [edi + 0x20]
add esp, 0xc
push edx
mov dword [edi + 0xc], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0043eb21
mov esp, ebp
pop ebp
ret
push str.Write_to_file_failed_
push 0x46d7d0
call fcn.0040b020
push eax
call fcn.0040bc60
mov eax, dword [esi + 0x20]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.0043eb21
mov esp, ebp
pop ebp
ret