Function at 0x458a70
Capabilities:
Check internet connectivity via wininet
Create http request
Download and write a file
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52907e
mov eax, dword fs:[0]
push eax
mov eax, 0x800c0
call fcn.004f50c0
mov eax, dword [0x581980]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 4], 1
mov dword [ebp - 0xc4], esp
xor ebx, ebx
xor eax, eax
mov esi, 7
mov dword [ecx + 0x14], esi
mov dword [ecx + 0x10], ebx
push ebx
lea edx, [ebp + 0x24]
mov word [ecx], ax
push edx
or eax, 0xffffffff
call fcn.00402710
call fcn.004588a0
add esp, 0x1c
push ebx
lea eax, [ebp - 0xcc]
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
push 0x40
lea ecx, [ebp - 0x60]
push ebx
push ecx
call fcn.004f50f0
sub esp, 0x10
mov ecx, esp
mov dword [ebp - 0xbc], esp
push ebx
lea eax, [ebp + 0x24]
xor edx, edx
push eax
mov dword [ecx + 0x14], esi
mov dword [ecx + 0x10], ebx
or eax, 0xffffffff
mov word [ecx], dx
call fcn.00402710
call fcn.004588a0
add esp, 0x1c
lea edi, [esi + 1]
cmp al, bl
jne 0x458b5c
cmp dword [ebp + 0x1c], edi
jb 0x458b38
mov ecx, dword [ebp + 8]
push ecx
call fcn.004f287e
add esp, 4
xor edx, edx
mov dword [ebp + 0x1c], esi
mov dword [ebp + 0x18], ebx
mov word [ebp + 8], dx
cmp dword [ebp + 0x38], edi
jb 0x458b55
mov eax, dword [ebp + 0x24]
push eax
call fcn.004f287e
add esp, 4
xor al, al
jmp 0x458e79
mov eax, dword [ebp + 0x24]
cmp dword [ebp + 0x38], edi
jae 0x458b67
lea eax, [ebp + 0x24]
push ebx
push 0x80
push 2
push ebx
push 2
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xbc], eax
cmp eax, 0xffffffff
jne 0x458bcc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x1c], edi
jb 0x458ba8
mov ecx, dword [ebp + 8]
push ecx
call fcn.004f287e
add esp, 4
xor edx, edx
mov dword [ebp + 0x1c], esi
mov dword [ebp + 0x18], ebx
mov word [ebp + 8], dx
cmp dword [ebp + 0x38], edi
jb 0x458b55
mov eax, dword [ebp + 0x24]
push eax
call fcn.004f287e
add esp, 4
xor al, al
jmp 0x458e79
test byte [ebp - 0xcc], 4
push ebx
push ebx
push ebx
jne 0x458be0
push 4
lea ecx, [ebp - 0x60]
push ecx
jmp 0x458be5
push ebx
lea edx, [ebp - 0x60]
push edx
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [ebp - 0xb8], eax
cmp eax, ebx
jne 0x458c2e
cmp dword [ebp + 0x1c], edi
jb 0x458c06
mov eax, dword [ebp + 8]
push eax
call fcn.004f287e
add esp, 4
xor ecx, ecx
mov dword [ebp + 0x1c], esi
mov dword [ebp + 0x18], ebx
mov word [ebp + 8], cx
cmp dword [ebp + 0x38], edi
jb 0x458b55
mov edx, dword [ebp + 0x24]
push edx
call fcn.004f287e
add esp, 4
xor al, al
jmp 0x458e79
mov eax, dword [str.Accept:___r_n_r_n]
mov ecx, dword [0x56dee8]
mov edx, dword [0x56deec]
mov dword [ebp - 0x20], eax
mov eax, dword [0x56def0]
mov dword [ebp - 0x1c], ecx
xor ecx, ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x6c], ebx
mov word [ebp - 0x7c], cx
mov byte [ebp - 4], 2
lea eax, [ebp - 0x20]
mov dword [ebp - 0x84], 0xf
mov dword [ebp - 0x88], ebx
mov byte [ebp - 0x98], bl
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x458c80
sub eax, edx
push eax
lea edx, [ebp - 0x20]
push edx
lea ecx, [ebp - 0x98]
call fcn.00403590
lea eax, [ebp - 0x98]
push eax
lea ebx, [ebp - 0xb4]
mov byte [ebp - 4], 3
call fcn.004570c0
add esp, 4
mov edi, eax
lea esi, [ebp - 0x7c]
mov byte [ebp - 4], 4
call fcn.00402120
mov esi, 8
cmp dword [ebp - 0xa0], esi
jb 0x458cdc
mov ecx, dword [ebp - 0xb4]
push ecx
call fcn.004f287e
add esp, 4
xor ebx, ebx
xor edx, edx
cmp dword [ebp - 0x84], 0x10
mov dword [ebp - 0xa0], 7
mov dword [ebp - 0xa4], ebx
mov word [ebp - 0xb4], dx
jb 0x458d0f
mov eax, dword [ebp - 0x98]
push eax
call fcn.004f287e
add esp, 4
mov edi, dword [ebp - 0x7c]
cmp dword [ebp - 0x68], esi
jae 0x458d1a
lea edi, [ebp - 0x7c]
cmp dword [ebp + 0x1c], esi
mov esi, dword [ebp + 8]
jae 0x458d25
lea esi, [ebp + 8]
push ebx
push 0x84000100
lea ecx, [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push edi
mov edi, dword [ebp - 0xb8]
push esi
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov esi, eax
cmp esi, ebx
jne 0x458d71
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea esi, [ebp - 0x7c]
call fcn.00402850
lea esi, [ebp + 8]
call fcn.00402850
lea esi, [ebp + 0x24]
call fcn.00402850
xor al, al
jmp 0x458e79
push ebx
lea edx, [ebp - 0xc4]
push edx
lea eax, [ebp - 0xc8]
push eax
push 0x20000005
push esi
mov dword [ebp - 0xc8], ebx
mov dword [ebp - 0xc4], 4
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
jne 0x458db4
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0xc8], ebx
call esi
push edi
call esi
jmp 0x458d52
push 0x80000
lea ecx, [ebp - 0x800cc]
push ebx
push ecx
call fcn.004f50f0
mov edi, dword [sym.imp.WININET.dll_InternetReadFile]
add esp, 0xc
lea edx, [ebp - 0xc0]
push edx
push 0x20000
lea eax, [ebp - 0x800cc]
push eax
push esi
call edi
test eax, eax
je 0x458e2e
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
nop
mov eax, dword [ebp - 0xc0]
test eax, eax
je 0x458e40
push 0
lea ecx, [ebp - 0xc0]
push ecx
push eax
mov eax, dword [ebp - 0xbc]
lea edx, [ebp - 0x800cc]
push edx
push eax
call ebx
lea ecx, [ebp - 0xc0]
push ecx
push 0x20000
lea edx, [ebp - 0x800cc]
push edx
push esi
call edi
test eax, eax
jne 0x458df0
mov eax, dword [ebp - 0xbc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x458d52
mov ecx, dword [ebp - 0xbc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
mov edx, dword [ebp - 0xb8]
push edx
call esi
lea esi, [ebp - 0x7c]
call fcn.00402850
lea esi, [ebp + 8]
call fcn.00402850
lea esi, [ebp + 0x24]
call fcn.00402850
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004f2889
mov esp, ebp
pop ebp
ret