Function at 0x4052dc
Capabilities:
Act as tcp client
Check internet connectivity via wininet
Connect tcp socket
Connect udp socket
Initialize winsock library
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdfc
mov eax, 0x440974
push ebx
push esi
push edi
call fcn.0040e948
mov ax, 0x101
lea edx, [ebp - 0x1f4]
push edx
push eax
call sub.WSOCK32.DLL_WSAStartup
push 0
push 0x448e08
call sub.WININET.DLL_InternetGetConnectedState
test eax, eax
je 0x405403
mov word [ebp - 0x4c], 8
mov word [ebp - 0x4c], 0x14
lea ecx, [ebp - 8]
lea eax, [ebp - 0x20]
push ecx
inc dword [ebp - 0x40]
push 0x447fd4
push eax
call fcn.0040268e
add esp, 0xc
lea edx, [ebp - 0x20]
add dword [ebp - 0x40], 4
push edx
lea ecx, [ebp - 0x38]
push ecx
call fcn.004055cc
add esp, 8
lea ebx, [ebp - 0x38]
add dword [ebp - 0x40], 4
mov eax, dword [ebx]
push eax
call sub.WSOCK32.DLL_gethostbyname
mov dword [ebp - 0x60], eax
dec dword [ebp - 0x40]
mov word [ebp - 0x4c], 8
dec dword [ebp - 0x40]
mov esi, dword [ebp - 0x28]
sub esi, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x38]
test ebx, ebx
je 0x405395
cmp esi, 0x80
jbe 0x40538b
push ebx
call fcn.0040c294
pop ecx
jmp 0x405395
push esi
push ebx
call fcn.004197d0
add esp, 8
dec dword [ebp - 0x40]
dec dword [ebp - 0x40]
dec dword [ebp - 0x40]
dec dword [ebp - 0x40]
mov esi, dword [ebp - 0x10]
sub esi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x20]
test ebx, ebx
je 0x4053c9
cmp esi, 0x80
jbe 0x4053bf
push ebx
call fcn.0040c294
pop ecx
jmp 0x4053c9
push esi
push ebx
call fcn.004197d0
add esp, 8
dec dword [ebp - 0x40]
dec dword [ebp - 0x40]
dec dword [ebp - 0x40]
cmp dword [ebp - 0x60], 0
jne 0x4053ee
call sub.WSOCK32.DLL_WSAGetLastError
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x4054fd
mov word [ebp - 0x4c], 0
jmp 0x405414
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x4054fd
mov word [ebp - 0x4c], 0x50
push 6
push 1
push 2
call sub.WSOCK32.DLL_socket
mov dword [ebp - 0x64], eax
mov word [ebp - 0x4c], 0
jmp 0x40543b
cmp dword [ebp - 0x64], 0xffffffff
jne 0x40545f
call sub.WSOCK32.DLL_WSAGetLastError
push dword [ebp - 0x64]
call sub.WSOCK32.DLL_closesocket
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x4054fd
mov word [ebp - 0x204], 2
mov ecx, dword [ebp - 0x60]
mov eax, dword [ecx + 0xc]
mov edx, dword [eax]
mov ecx, dword [edx]
mov dword [ebp - 0x200], ecx
mov ax, word [ebp + 0x10]
push eax
call sub.WSOCK32.DLL_htons
mov word [ebp - 0x202], ax
lea edx, [ebp - 0x204]
push 0x10
push edx
push dword [ebp - 0x64]
call sub.WSOCK32.DLL_connect
inc eax
jne 0x4054b8
call sub.WSOCK32.DLL_WSAGetLastError
push dword [ebp - 0x64]
call sub.WSOCK32.DLL_closesocket
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x4054fd
push 0
push dword [ebp + 0xc]
call fcn.0040e6cc
pop ecx
push eax
push dword [ebp + 0xc]
push dword [ebp - 0x64]
call sub.WSOCK32.DLL_send
test eax, eax
jne 0x4054e9
push dword [ebp - 0x64]
call sub.WSOCK32.DLL_closesocket
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
jmp 0x4054fd
push dword [ebp - 0x64]
call sub.WSOCK32.DLL_closesocket
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret