Function at 0x40baa0
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, 0x420
mov eax, dword [0x453d00]
xor eax, ebp
mov dword [ebp - 4], eax
fldz
push ebx
push esi
fstp dword [ebp - 0x408]
push edi
lea eax, [ebp - 0x40c]
push eax
mov edi, ecx
mov edx, dword [edi + 8]
push 0x400
lea ecx, [ebp - 0x404]
push ecx
xor ebx, ebx
push edx
mov dword [ebp - 0x414], edi
mov dword [ebp - 0x404], ebx
mov dword [ebp - 0x40c], ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov eax, dword [ebp - 0x40c]
cmp eax, ebx
je 0x40bc8c
nop
mov ecx, dword [edi + 0x10]
add ebx, eax
mov dword [ebp - 0x410], ebx
fild dword [ebp - 0x410]
mov dword [ebp - 0x410], ecx
sub esp, 8
fst qword [ebp - 0x41c]
fild dword [ebp - 0x410]
fdiv qword [0x446170]
fdivp st(1)
fstp qword [esp]
push str._PercentDone:
push ecx
push str._FileSize:
push ebx
push str._Total:
push eax
push str.Percent:
push 0x4568a0
call fcn.0040ac80
add esp, 8
mov ecx, eax
call fcn.0040a510
push eax
call fcn.0040ac80
add esp, 8
mov ecx, eax
call fcn.0040a330
push eax
call fcn.0040ac80
add esp, 8
mov ecx, eax
call fcn.0040a330
push eax
call fcn.0040ac80
add esp, 8
mov ecx, eax
call fcn.0040a6f0
mov esi, eax
push 0xa
mov ecx, esi
call fcn.0040aed0
mov eax, dword [esi]
mov eax, dword [eax + 4]
xor edi, edi
test byte [eax + esi + 0xc], 6
jne 0x40bbbc
mov eax, dword [eax + esi + 0x38]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40bbbc
mov edi, 4
mov ecx, dword [esi]
mov ecx, dword [ecx + 4]
add ecx, esi
test edi, edi
je 0x40bbe0
mov eax, dword [ecx + 0xc]
or eax, edi
cmp dword [ecx + 0x38], 0
jne 0x40bbd5
or eax, 4
push 0
push eax
call fcn.00409210
lea ecx, [ecx]
push 0x446138
push 0x4568a0
call fcn.0040ac80
fld dword [ebp - 0x408]
fdiv qword [0x446130]
add esp, 8
fstp dword [ebp - 0x408]
fld dword [ebp - 0x408]
fldz
fucompp
fnstsw ax
test ah, 0x44
jp 0x40bbe0
mov esi, dword [ebp - 0x414]
fild dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
push 0
lea edx, [ebp - 0x420]
fdiv qword [0x446170]
push edx
push 0x400
lea eax, [ebp - 0x404]
push eax
push ecx
fdivr qword [ebp - 0x41c]
fstp dword [ebp - 0x408]
fld dword [ebp - 0x408]
fstp dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40bd26
mov ecx, dword [esi + 8]
lea edx, [ebp - 0x40c]
push edx
push 0x400
lea eax, [ebp - 0x404]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov eax, dword [ebp - 0x40c]
mov edi, esi
test eax, eax
jne 0x40bb00
push 0xa
mov ecx, 0x4568a0
call fcn.0040aed0
mov edx, dword [0x4568a0]
mov eax, dword [edx + 4]
xor esi, esi
test byte [eax + 0x4568ac], 6
jne 0x40bcc5
mov eax, dword [eax + 0x4568d8]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x34]
call eax
cmp eax, 0xffffffff
jne 0x40bcc5
mov esi, 4
mov ecx, dword [0x4568a0]
mov ecx, dword [ecx + 4]
add ecx, 0x4568a0
test esi, esi
je 0x40bcee
mov eax, dword [ecx + 0xc]
or eax, esi
cmp dword [ecx + 0x38], 0
jne 0x40bce6
or eax, 4
push 0
push eax
call fcn.00409210
push str.Finished_downloading_
push 0x4568a0
call fcn.0040ac80
push eax
call fcn.0040b8c0
mov edx, dword [edi + 0x14]
add esp, 0xc
push edx
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.0042d3b1
mov esp, ebp
pop ebp
ret
push str.Write_to_file_failed_
push 0x4568a0
call fcn.0040ac80
push eax
call fcn.0040b8c0
mov eax, dword [esi + 0x14]
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.0042d3b1
mov esp, ebp
pop ebp
ret