Function at 0x42c358
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
mov dword [ebp - 4], 1
mov eax, dword [ebp + 0xc]
movsx ecx, byte [eax]
push ecx
call dword [sym.imp.MSVCRT.dll_isdigit]
add esp, 4
test eax, eax
je 0x42c3be
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x78], eax
cmp dword [ebp - 0x78], 0xffffffff
jne 0x42c3b9
push str.Connect__inet_addr___failed__error_INADDR_NONE
mov ecx, dword [ebp + 8]
call fcn.00425695
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp + 0x14]
mov dword [edx], 0
or eax, 0xffffffff
jmp 0x42c660
jmp 0x42c443
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x80], eax
cmp dword [ebp - 0x80], 0
jne 0x42c425
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x458768
call fcn.0042bf64
add esp, 8
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push str._nAddress__s_Not_Found_______err___s_n
lea edx, [ebp - 0x6c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp + 8]
call fcn.00425695
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
or eax, 0xffffffff
jmp 0x42c660
mov ecx, dword [ebp - 0x80]
movsx edx, word [ecx + 0xa]
push edx
mov eax, dword [ebp - 0x80]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
push edx
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
cmp dword [ebp + 0x18], 0
jne 0x42c4b2
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov edx, dword [ebp + 0x14]
cmp dword [edx], 0xffffffff
jne 0x42c4b2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x458768
call fcn.0042bf64
add esp, 8
push eax
push str.socket___failed__error___s__n
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [ebp - 0x6c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00425695
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0
or eax, 0xffffffff
jmp 0x42c660
mov word [ebp - 0x7c], 2
mov dx, word [ebp + 0x10]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x7a], ax
lea eax, [ebp - 4]
push eax
push 0x8004667e
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x42c54b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x2734
je 0x42c54b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x458768
call fcn.0042bf64
add esp, 8
push eax
mov eax, dword [ebp - 8]
push eax
push str.Connect_Ioctl___failed__error___d__s_n
lea ecx, [ebp - 0x6c]
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea edx, [ebp - 0x6c]
push edx
mov ecx, dword [ebp + 8]
call fcn.00425695
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp + 0x14]
mov dword [edx], 0
or eax, 0xffffffff
jmp 0x42c660
push 0x3f
push 0x465
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x20]
push ecx
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x42c5d4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x2734
je 0x42c5d4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x458768
call fcn.0042bf64
add esp, 8
push eax
mov ecx, dword [ebp - 8]
push ecx
push str.WSAAsyncSelect__error___d__s_n
lea edx, [ebp - 0x6c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp + 8]
call fcn.00425695
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp + 0x14]
mov dword [eax], 0
or eax, 0xffffffff
jmp 0x42c660
push 0x10
lea ecx, [ebp - 0x7c]
push ecx
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
push eax
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x42c65b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x2734
je 0x42c65b
cmp dword [ebp - 8], 0x2733
je 0x42c65b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x458768
call fcn.0042bf64
add esp, 8
push eax
mov ecx, dword [ebp - 8]
push ecx
push str.connect___failed__error___d__s_n
lea edx, [ebp - 0x6c]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp + 0x14]
mov dword [edx], 0
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp + 8]
call fcn.00425695
or eax, 0xffffffff
jmp 0x42c660
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx]
mov esp, ebp
pop ebp
ret