Function at 0x631ece65
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1f8
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0xc], 0x633d0cb4
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Connecting_to:__s_n
mov dword [esp], 0x1e
call fcn.631a9790
mov dword [ebp - 0x10], 7
cmp dword [ebp + 0xc], 2
jne 0x631eceb5
mov dword [ebp - 0xc], str._IPv4_
mov dword [ebp - 0x10], 4
cmp dword [ebp + 0xc], 0x17
jne 0x631ecec9
mov dword [ebp - 0xc], str._IPv6_
mov dword [ebp - 0x10], 5
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
lea eax, [ebp - 0xb4]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.631dc0d0
test eax, eax
je 0x631ecf59
lea eax, [ebp - 0xb4]
mov dword [esp], eax
call fcn.631ea410
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Resolved__s_to:__s_n
mov dword [esp], 0x1e
call fcn.631a9790
lea eax, [ebp - 0xa0]
mov dword [esp + 4], eax
lea eax, [ebp - 0xb4]
mov dword [esp], eax
call fcn.631e9927
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x631ecfac
jmp 0x631ecf85
mov eax, dword [ebp - 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Couldnt_resolve:__s__s_n
mov dword [esp], 0x1e
call fcn.631a9970
mov eax, 0xffffffff
jmp 0x631ed213
call fcn.631e9415
mov dword [esp + 8], eax
mov dword [esp + 4], str.NET_TCPConnect:_socket:__s_n
mov dword [esp], 0x1e
call fcn.631a9970
mov eax, 0xffffffff
jmp 0x631ed213
mov dword [ebp - 0x1c8], 1
lea eax, [ebp - 0x1c8]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x8004667e
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_ioctlsocket]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x631ed014
call fcn.631e9415
mov dword [esp + 8], eax
mov dword [esp + 4], str.NET_TCPIPSocket:_ioctl_FIONBIO:__s_n
mov dword [esp], 0x1e
call fcn.631a9970
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, 0xffffffff
jmp 0x631ed213
mov dword [esp + 8], pe_nt_image_headers32
lea eax, [ebp - 0xa0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_connect]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x631ed210
mov eax, dword [sym.imp.WSOCK32.DLL_WSAGetLastError]
call eax
mov dword [ebp - 0xb8], eax
mov eax, dword [ebp - 0xb8]
cmp eax, 0x2734
je 0x631ed06a
mov eax, dword [ebp - 0xb8]
cmp eax, 0x2733
jne 0x631ed1dc
mov dword [ebp - 0x1bc], 0
mov dword [ebp - 0x14], 0
jmp 0x631ed090
mov eax, dword [ebp - 0x14]
mov eax, dword [ebp + eax*4 - 0x1b8]
cmp dword [ebp - 0x18], eax
je 0x631ed09d
add dword [ebp - 0x14], 1
mov eax, dword [ebp - 0x1bc]
cmp dword [ebp - 0x14], eax
jb 0x631ed07d
jmp 0x631ed09e
nop
mov eax, dword [ebp - 0x1bc]
cmp dword [ebp - 0x14], eax
jne 0x631ed0d0
mov eax, dword [ebp - 0x1bc]
cmp eax, 0x3f
ja 0x631ed0d0
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov dword [ebp + eax*4 - 0x1b8], edx
mov eax, dword [ebp - 0x1bc]
add eax, 1
mov dword [ebp - 0x1bc], eax
mov dword [ebp - 0x1c4], 2
mov dword [ebp - 0x1c0], 0
mov eax, dword [ebp - 0x18]
add eax, 1
mov edx, eax
lea eax, [ebp - 0x1c4]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
lea eax, [ebp - 0x1bc]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], edx
mov eax, dword [sym.imp.WSOCK32.DLL_select]
call eax
sub esp, 0x14
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jns 0x631ed15d
call fcn.631e9415
mov dword [esp + 8], eax
mov dword [esp + 4], str.NET_TcpConnect:_select___syscall_failed:__s_n
mov dword [esp], 0x1e
call fcn.631a9970
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, 0xffffffff
jmp 0x631ed213
cmp dword [ebp - 0x1c], 0
jle 0x631ed1aa
mov dword [ebp - 0x1cc], 4
lea eax, [ebp - 0x1cc]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0xb8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1007
mov dword [esp + 4], 0xffff
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_getsockopt]
call eax
sub esp, 0x14
test eax, eax
jne 0x631ed1dc
mov eax, dword [ebp - 0x18]
jmp 0x631ed213
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], str.NET_TcpConnect:_Connecting_to:__s_timed_out_n
mov dword [esp], 0x1e
call fcn.631a9970
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, 0xffffffff
jmp 0x631ed213
call fcn.631e9415
mov dword [esp + 8], eax
mov dword [esp + 4], str.NET_TCPOpenConnection:_connect:__s_n
mov dword [esp], 0x1e
call fcn.631a9970
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.WSOCK32.DLL_closesocket]
call eax
sub esp, 4
mov eax, 0xffffffff
jmp 0x631ed213
mov eax, dword [ebp - 0x18]
leave
ret