Function at 0x405620
Capabilities:
Check internet connectivity via wininet
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
and esp, 0xfffffff8
mov eax, 0x4081c
call fcn.00442260
mov eax, dword [0x467e60]
xor eax, esp
mov dword [esp + 0x40818], eax
push ebx
push esi
push edi
mov esi, ecx
call fcn.00404e40
cmp eax, 0xffffffff
jne 0x40566c
mov ecx, esi
call fcn.00404f70
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40818]
xor ecx, esp
call fcn.0043cefb
mov esp, ebp
pop ebp
ret
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
xor ebx, ebx
mov dword [esp + 0x14], eax
cmp dword [esi + 0x20], ebx
je 0x4059ec
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 8]
mov edx, dword [ecx + 0xc84]
mov ecx, dword [ecx + 0xc80]
mov byte [eax + 8], 1
test edx, edx
jne 0x4056a6
xorps xmm0, xmm0
movsd qword [eax], xmm0
jmp 0x4056de
movd xmm1, ecx
movd xmm0, edx
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
shr edx, 0x1f
addsd xmm1, qword [ecx*8 + 0x461400]
addsd xmm0, qword [edx*8 + 0x461400]
divsd xmm1, xmm0
mulsd xmm1, qword [0x4613f0]
movsd qword [eax], xmm1
mov eax, dword [esi + 8]
mov byte [eax + 0xb], bl
push 0
call dword [sym.imp.WININET.dll_InternetAttemptConnect]
test eax, eax
jne 0x405888
lea eax, [esp + 0xc]
push eax
push 0x40800
lea eax, [esp + 0x28]
push eax
mov eax, dword [esi + 0x14]
push dword [eax + 4]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x405870
mov eax, dword [esp + 0xc]
test eax, eax
je 0x405838
add ebx, eax
movd xmm0, ebx
cvtdq2pd xmm0, xmm0
mov eax, ebx
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x461400]
movsd qword [esp + 0x18], xmm0
call edi
sub eax, dword [esp + 0x14]
movsd xmm1, qword [esp + 0x18]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
mov edi, dword [esp + 0xc]
addsd xmm0, qword [eax*8 + 0x461400]
divsd xmm1, xmm0
movsd qword [esi + 0x28], xmm1
test edi, edi
je 0x405870
mov eax, dword [esi + 0x18]
test eax, eax
je 0x405870
push 0
lea ecx, [esp + 0x14]
push ecx
push edi
lea ecx, [esp + 0x2c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405870
cmp dword [esp + 0x10], edi
jne 0x405870
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ecx, dword [esi + 0xc]
mov eax, dword [esp + 0xc]
add dword [ecx + 0xc80], eax
mov eax, dword [esi + 0xc]
movsd xmm2, qword [0x4613f0]
mov ecx, dword [eax + 0xc84]
mov edx, dword [eax + 0xc80]
mov eax, dword [esi + 8]
test ecx, ecx
jne 0x4057e4
xorps xmm0, xmm0
movsd qword [eax], xmm0
jmp 0x405818
movd xmm1, edx
movd xmm0, ecx
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
shr edx, 0x1f
shr ecx, 0x1f
addsd xmm1, qword [edx*8 + 0x461400]
addsd xmm0, qword [ecx*8 + 0x461400]
divsd xmm1, xmm0
mulsd xmm1, xmm2
movsd qword [eax], xmm1
cmp dword [esi + 0x20], 0
je 0x4058e7
cmp dword [esp + 0xc], 0
je 0x4058e7
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
jmp 0x4056e4
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx + 0xc80]
cmp eax, dword [ecx + 0xc84]
mov ecx, esi
je 0x40585f
push 4
call fcn.00405a30
movsd xmm2, qword [0x4613f0]
jmp 0x4058e7
push 2
call fcn.00405a30
movsd xmm2, qword [0x4613f0]
jmp 0x4058e7
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0xc84]
mov edx, dword [eax + 0xc80]
mov eax, dword [esi + 8]
mov byte [eax + 0xa], 1
jmp 0x40589e
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0xc84]
mov edx, dword [eax + 0xc80]
mov eax, dword [esi + 8]
mov byte [eax + 0xb], 1
movsd xmm2, qword [0x4613f0]
test ecx, ecx
jne 0x4058b3
xorps xmm0, xmm0
movsd qword [eax], xmm0
jmp 0x4058ea
movd xmm1, edx
movd xmm0, ecx
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
shr edx, 0x1f
shr ecx, 0x1f
addsd xmm1, qword [edx*8 + 0x461400]
addsd xmm0, qword [ecx*8 + 0x461400]
divsd xmm1, xmm0
mulsd xmm1, xmm2
movsd qword [eax], xmm1
xorps xmm0, xmm0
mov ecx, dword [esi + 8]
cmp byte [ecx + 0xa], 0
je 0x40594d
mov eax, dword [esi + 0x18]
test eax, eax
je 0x405908
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x18], 0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x54]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x58]
mov eax, dword [esi + 8]
xorps xmm0, xmm0
movsd qword [eax], xmm0
mov dword [eax + 8], 0x1000000
mov eax, dword [esi + 0xc]
mov dword [eax + 0xc80], 0
mov eax, dword [esi + 0xc]
mov dword [eax + 0xc84], 0
mov dword [esi + 0x1c], 0
jmp 0x4059ec
cmp byte [ecx + 9], 0
je 0x405978
mov eax, dword [esi + 0x18]
test eax, eax
je 0x405968
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x18], 0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x58]
mov ecx, esi
call fcn.00405490
jmp 0x4059ec
mov eax, dword [esi + 0xc]
mov edx, dword [eax + 0xc84]
mov eax, dword [eax + 0xc80]
mov byte [ecx + 0xb], 1
test edx, edx
jne 0x405995
movsd qword [ecx], xmm0
jmp 0x4059c9
movd xmm1, eax
movd xmm0, edx
cvtdq2pd xmm1, xmm1
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
shr edx, 0x1f
addsd xmm1, qword [eax*8 + 0x461400]
addsd xmm0, qword [edx*8 + 0x461400]
divsd xmm1, xmm0
mulsd xmm1, xmm2
movsd qword [ecx], xmm1
mov eax, dword [esi + 0x18]
test eax, eax
je 0x4059de
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x18], 0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x18]
mov dword [esi + 0x1c], 1
mov ecx, esi
call fcn.00404f70
mov ecx, dword [esp + 0x40824]
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0043cefb
mov esp, ebp
pop ebp
ret