Function at 0x414ec0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x27c
mov eax, dword [0x4b6e40]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0xc]
push 0x63
lea eax, [ebp - 0x7b]
push 0
push eax
mov dword [ebp - 0x26c], esi
mov byte [ebp - 0x7c], 0
call fcn.0041c510
push 0x10
push edi
mov dword [ebp - 0x274], 1
call fcn.00401037
add esp, 0x14
test eax, eax
push 0x64
lea eax, [ebp - 0xe0]
je 0x414f44
push edi
push eax
call fcn.004014ec
push 0x64
lea eax, [ebp - 0x7c]
push edi
push eax
call fcn.004014ec
lea eax, [ebp - 0xe0]
push eax
call fcn.00401334
lea eax, [ebp - 0x7c]
push eax
call fcn.00401334
add esp, 0x20
jmp 0x414f7b
push ebx
push eax
call fcn.004014ec
push 0x64
lea eax, [ebp - 0x7c]
push ebx
push eax
call fcn.004014ec
lea eax, [ebp - 0xe0]
push eax
call fcn.00401334
lea eax, [ebp - 0x7c]
push eax
call fcn.00401334
push 0x64
lea eax, [ebp - 0x7c]
push eax
push ebx
call fcn.0040130c
add esp, 0x2c
xorps xmm0, xmm0
mov eax, 2
movq qword [ebp - 0x154], xmm0
mov word [ebp - 0x154], ax
lea eax, [ebp - 0x7c]
push eax
movq qword [ebp - 0x14c], xmm0
call dword [sym.imp.WS2_32.dll_inet_addr]
push esi
mov dword [ebp - 0x150], eax
call fcn.0041c260
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_htons]
push str.sockets
mov word [ebp - 0x152], ax
call fcn.004017d0
add esp, 4
test eax, eax
je 0x414fed
push esi
lea eax, [ebp - 0x7c]
push eax
push str.SystemSocketConnect_to__s_port__s
push 0x495ff1
push 2
push 3
call fcn.004017f8
add esp, 0x18
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x415022
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.SystemSocketConnect_error__d_opening_socket.
push 0x495ff1
push 1
push 3
call fcn.004017f8
add esp, 0x14
jmp 0x4152c5
push str.sockets
mov dword [ebp - 0x270], 1
call fcn.004017d0
add esp, 4
test eax, eax
je 0x415053
push str.SystemSocketConnect_Initiating_connect
push 0x495ff1
push 0
push 3
call fcn.004017f8
add esp, 0x10
push 0x64
lea eax, [ebp - 0x144]
push eax
push str.BIND_ADDRESS
push 0
call fcn.004017d5
add esp, 0x10
test eax, eax
jne 0x415194
push 0x14
lea eax, [ebp - 0x18]
push eax
push str.BIND_PORT
push 0
call fcn.004017d5
add esp, 0x10
test eax, eax
je 0x4150a0
push 0x14
push dword [ebp - 0x26c]
lea eax, [ebp - 0x18]
push eax
call fcn.004014ec
add esp, 0xc
xorps xmm0, xmm0
mov eax, 2
movq qword [ebp - 0x164], xmm0
mov word [ebp - 0x164], ax
lea eax, [ebp - 0x144]
push eax
movq qword [ebp - 0x15c], xmm0
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x160], eax
lea eax, [ebp - 0x18]
push eax
call fcn.0041c260
add esp, 4
push eax
call dword [sym.imp.WS2_32.dll_htons]
push 4
mov word [ebp - 0x162], ax
lea eax, [ebp - 0x274]
push eax
push 4
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x41513e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.SystemSocketConnect_REUSE_error__d
push 0x495ff1
push 1
push 3
call fcn.004017f8
push esi
call fcn.0040137a
add esp, 0x18
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c3d0
mov esp, ebp
pop ebp
ret
push 0x10
lea eax, [ebp - 0x164]
push eax
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x415194
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x144]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.SystemSocketConnect_bind_error__d_BIND_ADDRESS_s_BIND_PORT_s
push 0x495ff1
push 3
push 3
call fcn.004017f8
push esi
call fcn.0040137a
add esp, 0x20
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c3d0
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x270]
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x4151bd
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.SystemSocketConnect_FIONBIO_error__d.
jmp 0x41500c
push 0x10
lea eax, [ebp - 0x154]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4152c8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x415213
push dword [ebp - 0x26c]
push edi
push ebx
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.SystemSocketConnect_error__d_initiating_connect_to__s__s__s.
push 0x495ff1
push 4
push 3
call fcn.004017f8
push esi
call fcn.0040137a
add esp, 0x24
jmp 0x4152c5
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x27c], eax
lea eax, [ebp - 0x27c]
push eax
push 0
lea eax, [ebp - 0x268]
push eax
push 0
lea eax, [esi + 1]
push eax
mov dword [ebp - 0x278], 0
mov dword [ebp - 0x264], esi
mov dword [ebp - 0x268], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x4152a1
lea eax, [ebp - 0x268]
push eax
push esi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4152a1
push str.sockets
call fcn.004017d0
add esp, 4
test eax, eax
je 0x4152c8
push str.Connection_established.
push 0x495ff1
push 0
push 3
call fcn.004017f8
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041c3d0
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x26c]
push edi
push ebx
push str.SystemSocketConnect_timeout_on_connect_node_s_ip_s_port_s.
push 0x495ff1
push 3
push 3
call fcn.004017f8
push esi
call fcn.0040137a
add esp, 0x20
or esi, 0xffffffff
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041c3d0
mov esp, ebp
pop ebp
ret