Function at 0x449590
Capabilities:
Connect socket
Get socket status
Initialize winsock library
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3cc
mov eax, dword [0x50dc94]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, 1
push edi
mov edi, dword [ebp + 0xc]
cmp dword [esi + 0x10], 0
je 0x449905
cmp dword [edi + 0x10], 0
je 0x449905
lea eax, [ebp - 0x39c]
mov dword [ebp - 0x3a0], 0
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x449621
test byte [0x50f810], 8
je 0x449933
push eax
push str._WSAStartup___returned__d
push str.__error
push 0xc8a
push 0
push 0
call fcn.00421090
add esp, 0x18
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ae9c0
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x14], 0x10
xorps xmm0, xmm0
mov dword [ebp - 0x3cc], 0
movlpd qword [ebp - 0x3bc], xmm0
movlpd qword [ebp - 0x3b4], xmm0
mov dword [ebp - 0x3c8], 0
mov dword [ebp - 0x3c4], ebx
mov dword [ebp - 0x3c0], 6
jb 0x449660
mov edi, dword [edi]
cmp dword [esi + 0x14], 0x10
jb 0x449668
mov esi, dword [esi]
lea eax, [ebp - 0x3a0]
push eax
lea eax, [ebp - 0x3cc]
push eax
push edi
push esi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov esi, eax
test esi, esi
je 0x4496bc
test byte [0x50f810], 8
je 0x4496a9
push esi
push str.getaddrinfo_failed_with_error:__d_n
push str.__error
push 0xc97
push 0
push 0
call fcn.00421090
add esp, 0x18
cmp esi, 0x2af9
jne 0x4498d1
xor ebx, ebx
jmp 0x4498d1
mov eax, dword [ebp - 0x3a0]
push dword [eax + 0xc]
push dword [eax + 8]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x44970c
test byte [0x50f810], 8
je 0x4498d1
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Error_at_socket__:__ld_n
push str.__error
push 0xca5
push 0
push 0
call fcn.00421090
add esp, 0x18
jmp 0x4498d1
lea eax, [ebp - 0x3a4]
mov dword [ebp - 0x3a4], ebx
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x449757
test byte [0x50f810], 8
je 0x4498ca
push eax
push str.ioctlsocket_failed_with_error:__ld_n
push str.__error
push 0xcad
push 0
push 0
call fcn.00421090
add esp, 0x18
jmp 0x4498ca
mov eax, dword [ebp - 0x3a0]
push dword [eax + 0x10]
push dword [eax + 0x18]
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x44979d
test byte [0x50f810], 8
je 0x4498ca
push eax
push str.connect___returned__d.
push str.__error
push 0xcb4
push 0
push 0
call fcn.00421090
add esp, 0x18
jmp 0x4498ca
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x4497de
test byte [0x50f810], 8
je 0x4498ca
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.connect_failed_with_error:__d_n
push str.__error
push 0xcb9
push 0
push 0
call fcn.00421090
add esp, 0x18
jmp 0x4498ca
lea eax, [ebp - 0x3ac]
mov dword [ebp - 0x208], esi
push eax
lea eax, [ebp - 0x108]
mov dword [ebp - 0x20c], ebx
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x104], esi
push eax
push 0
push 0
mov dword [ebp - 0x108], ebx
mov dword [ebp - 0x3ac], 3
mov dword [ebp - 0x3a8], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jne 0x44985d
test byte [0x50f810], 8
je 0x449859
push 0xccb
push str.IsTunnelServerReachable
push str._s____d_connect_timeout_n
push str.__error
push 0xccb
push eax
push eax
call fcn.00421090
add esp, 0x1c
xor ebx, ebx
jmp 0x4498ca
lea eax, [ebp - 0x108]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x44989c
xor ebx, ebx
test byte [0x50f810], 8
je 0x44989c
push 0xcd4
push str.IsTunnelServerReachable
push str._s__d_connection_error_on_socket.
push str.__error
push 0xcd4
push ebx
push ebx
call fcn.00421090
add esp, 0x1c
test byte [0x50f810], 2
je 0x4498ca
push 0xcd7
push str.IsTunnelServerReachable
push str._s____d_All_done_
push str.__debug
push 0xcd7
push 0
push 0
call fcn.00421090
add esp, 0x1c
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
cmp dword [ebp - 0x3a0], 0
jne 0x4498ec
push 0
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
mov dword [ebp - 0x3a0], 0
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ae9c0
mov esp, ebp
pop ebp
ret
test byte [0x50f810], 8
je 0x449933
push 0xc7f
push str.IsTunnelServerReachable
push str._s____d_arguments_empty.
push str.__error
push 0xc7f
push 0
push 0
call fcn.00421090
add esp, 0x1c
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ae9c0
mov esp, ebp
pop ebp
ret