Function at 0x40a870
Capabilities:
Check internet connectivity via wininet
Delete file
Get common file path
Initialize winsock library

Disassembly:
sub esp, 0x29c
mov eax, dword [0x41a190]
xor eax, esp
mov dword [esp + 0x298], eax
push esi
push edi
mov edi, dword [esp + 0x2a8]
lea eax, [esp + 0x10]
push eax
push 0x101
mov esi, ecx
call sub.WSOCK32.dll_WSAStartup
test eax, eax
jne 0x40abc5
push ebx
push ebp
lea ebx, [esi + 0x2a6]
push ebx
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push ebx
call fcn.00402c00
push eax
push 0x4238d8
call fcn.00401580
add esp, 4
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov ebp, dword [sym.imp.KERNEL32.dll_OpenEventA]
push 0x4220a0
push 1
push 0x1f0003
call ebp
test eax, eax
jne 0x40abc3
push 0x4220a0
push eax
push 1
push eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0xc]
lea ecx, [edx + esi + 4]
mov dword [esp + 0x10], eax
call fcn.00409bd0
test eax, eax
je 0x40abc3
push eax
push 0
push 0
push 0
push 0
mov ecx, esi
call fcn.00409b90
push edi
mov ecx, esi
call fcn.0040a580
test al, al
je 0x40ab7f
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x18]
mov edi, dword [ecx + esi + 4]
add edi, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x4239b8
call fcn.00401580
mov edx, dword [esi + 4]
add esp, 4
push eax
mov eax, dword [edx + 0x18]
mov edx, dword [edi]
lea ecx, [eax + esi + 4]
push ecx
call edx
add esp, 0xc
push 0
push 0x42374c
call fcn.00401580
add esp, 4
push eax
lea eax, [esp + 0x1b0]
push eax
call fcn.004059c0
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0xc]
lea eax, [edx + esi + 4]
push eax
lea ecx, [esp + 0x1b8]
push ecx
call fcn.00405980
add esp, 0x14
lea edx, [esp + 0x1a8]
push edx
push 1
push 0x1f0003
call ebp
test eax, eax
jne 0x40abc3
lea eax, [esp + 0x1a8]
push eax
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x40a9e0
mov ecx, esi
call fcn.00409ca0
test al, al
je 0x40aa7d
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x18]
mov edi, dword [edx + esi + 4]
push 0x42399c
add edi, 4
call fcn.00401580
push eax
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x18]
mov eax, dword [edi]
lea edx, [ecx + esi + 4]
push edx
call eax
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x18]
mov edi, dword [edx + esi + 4]
push 0x423980
add edi, 4
call fcn.00401580
push eax
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x18]
mov eax, dword [edi]
lea edx, [ecx + esi + 4]
push edx
call eax
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x14]
mov eax, dword [edx + esi + 4]
lea ecx, [edx + esi + 4]
mov edx, dword [eax]
add esp, 0x18
push ebx
call edx
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x18]
mov edi, dword [ecx + esi + 4]
push 0x423960
add edi, 4
call fcn.00401580
mov edx, dword [esi + 4]
push eax
mov eax, dword [edx + 0x18]
mov edx, dword [edi]
lea ecx, [eax + esi + 4]
push ecx
call edx
add esp, 0xc
mov edi, dword [sym.imp.WININET.dll_InternetGetConnectedState]
push 0
lea eax, [esp + 0x18]
push eax
call edi
test eax, eax
jne 0x40aab6
mov ecx, dword [esp + 0x10]
push 0xea60
push ecx
call ebp
test eax, eax
sete al
test al, al
jne 0x40ab7f
push 0
lea edx, [esp + 0x18]
push edx
call edi
test eax, eax
je 0x40aa90
mov ecx, esi
call fcn.00409ca0
test al, al
je 0x40ab5e
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x18]
mov edi, dword [ecx + esi + 4]
push 0x423940
add edi, 4
call fcn.00401580
mov edx, dword [esi + 4]
push eax
mov eax, dword [edx + 0x18]
mov edx, dword [edi]
lea ecx, [eax + esi + 4]
push ecx
call edx
add esp, 0xc
mov ecx, esi
call fcn.0040a5e0
test al, al
je 0x40ab34
mov ecx, esi
call fcn.00409d80
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x18]
mov edi, dword [ecx + esi + 4]
push 0x423920
add edi, 4
call fcn.00401580
mov edx, dword [esi + 4]
push eax
mov eax, dword [edx + 0x18]
mov edx, dword [edi]
lea ecx, [eax + esi + 4]
push ecx
call edx
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x40ab5e
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x18]
mov edi, dword [ecx + esi + 4]
push 0x423900
add edi, 4
call fcn.00401580
mov edx, dword [esi + 4]
push eax
mov eax, dword [edx + 0x18]
mov edx, dword [edi]
lea ecx, [eax + esi + 4]
push ecx
call edx
add esp, 0xc
lea ecx, [esi + 0x129]
call fcn.004090e0
mov eax, dword [esi + 0x2a2]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call ebp
test eax, eax
jne 0x40a9e0
mov edx, dword [esi + 4]
mov eax, dword [edx + 0x18]
mov edi, dword [eax + esi + 4]
add edi, 4
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 0x42380c
call fcn.00401580
mov ecx, dword [esi + 4]
mov edx, dword [ecx + 0x18]
mov ecx, dword [edi]
add esp, 4
push eax
lea eax, [edx + esi + 4]
push eax
call ecx
mov edx, dword [esp + 0x1c]
add esp, 0xc
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call sub.WSOCK32.dll_WSACleanup
pop ebp
pop ebx
mov ecx, dword [esp + 0x2a0]
pop edi
pop esi
xor ecx, esp
call fcn.0040acd2
add esp, 0x29c
ret 4