Function at 0x4aa220
Capabilities:
Check internet connectivity via wininet
Download url
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x583088
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x5f0524]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
je 0x4aa489
cmp dword [ebp - 0x10], 0x20
je 0x4aa489
xorps xmm0, xmm0
mov dword [ebp - 0x38], vtable.s::system::network::win::CCallback.0
mov dword [ebp - 0x34], 0
movlpd qword [ebp - 0x30], xmm0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 0
mov eax, dword [esi + 0x50]
test eax, eax
je 0x4aa2b7
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x54]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 0x58]
mov dword [ebp - 0x20], eax
call fcn.00481260
mov ecx, dword [esi + 0x48]
mov dword [ebp - 0x14], eax
mov edx, dword [eax]
mov edi, dword [ecx]
mov ecx, eax
call dword [edx + 0xa4]
mov ecx, dword [esi + 0x48]
push eax
call dword [edi + 0x210]
mov ecx, dword [esi + 0x3c]
mov eax, dword [ecx]
call dword [eax + 0x2c]
test eax, eax
jne 0x4aa31d
mov ecx, dword [esi + 0x40]
mov eax, dword [ecx]
call dword [eax + 0x2c]
test eax, eax
jne 0x4aa31d
mov ecx, dword [esi + 0x48]
lea eax, [ebp - 0x38]
mov edi, dword [esi + 0x34]
xor edx, edx
cmp dword [esi + 0x50], edx
cmove eax, edx
push eax
mov eax, dword [ecx]
push edx
call dword [eax + 0x50]
push eax
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x50]
push eax
push 0
call dword [sym.imp.urlmon.dll_URLDownloadToFileW]
mov ebx, eax
jmp 0x4aa360
mov eax, dword [esi + 0x34]
mov ecx, dword [esi + 0x40]
mov edi, dword [esi + 0x3c]
mov ebx, dword [esi + 0x48]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ecx]
call dword [eax + 0x50]
push eax
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x50]
push eax
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x50]
mov ecx, dword [ebp - 0x18]
push eax
mov eax, dword [ecx]
call dword [eax + 0x50]
push eax
call fcn.004a9fa0
xor ecx, ecx
mov ebx, 1
test eax, eax
cmovne ebx, ecx
mov ecx, dword [ebp - 0x14]
add ecx, 4
mov eax, dword [ecx]
call dword [eax + 4]
test ebx, ebx
jne 0x4aa489
lea edi, [esi + 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [esi + 0x38], bl
jne 0x4aa38b
mov byte [esi + 0x44], 1
jmp 0x4aa482
mov ecx, dword [esi + 0x48]
mov eax, dword [ecx]
call dword [eax + 0x50]
mov ecx, eax
call fcn.0043bf50
mov ecx, dword [esi + 0x48]
mov ebx, eax
push 0
push 0x8000080
push 3
mov edx, dword [ecx]
push 0
push 3
push SysReAllocStringLen
mov dword [ebp - 0x1c], ebx
call dword [edx + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x4aa482
mov eax, dword [ebx]
mov ecx, ebx
push 1
push 0
push 0
mov eax, dword [eax + 0xb8]
push 1
push 0
call eax
mov ebx, eax
push ebx
call fcn.0052147f
add esp, 4
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push 0
push ecx
push ebx
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4aa454
cmp dword [ebp - 0x10], 0
jbe 0x4aa454
mov ecx, dword [esi + 0x4c]
push 0x5b9058
mov eax, dword [ecx]
call dword [eax + 0x210]
xor edi, edi
cmp dword [ebp - 0x10], edi
jbe 0x4aa44d
nop dword [eax]
cmp edi, ebx
jae 0x4aa44d
mov ecx, dword [esi + 0x4c]
mov eax, dword [ebp - 0x14]
mov edx, dword [ecx]
movzx eax, byte [edi + eax]
push eax
call dword [edx + 0xe4]
inc edi
cmp edi, dword [ebp - 0x10]
jb 0x4aa430
mov byte [esi + 0x44], 1
lea edi, [esi + 0x18]
push dword [ebp - 0x14]
call fcn.0051f847
mov ecx, dword [ebp - 0x1c]
add esp, 4
add ecx, 4
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi + 0x48]
mov eax, dword [ecx]
call dword [eax + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov word [esi + 0x30], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret