Function at 0xb9dd0
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x130
mov eax, dword [0x1a700c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov ebx, edx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 4
mov esi, 1
mov dword [ebp - 0x10], 0
push edi
mov edi, ecx
test ebx, ebx
je 0xba095
nop dword [eax]
test esi, esi
je 0xba095
mov eax, dword [ebx + 0x10]
mov dword [edi + 0x40], eax
lea eax, [edi + 0x24]
push dword [ebx + 0x10]
push dword [ebx + 0x18]
push eax
call fcn.00153810
add esp, 0xc
push dword [ebx + 0xc]
push dword [ebx + 8]
push dword [ebx + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [edi], eax
test eax, eax
je 0xba08a
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], 1
push ecx
push 0x8004667e
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0xb9eac
push str.failed_to_set_non_blocking_flag_on_socket
push 0x17bec4
push 0x350
push str.set_fd_nonblock
push 0x188be0
call fcn.000c0810
add esp, 0x14
test eax, eax
je 0xb9eac
push str.failed_to_set_non_blocking_flag_on_socket
push 0x17bec4
push 0x552
push str.connect_socket_loop
push 0x188be0
call fcn.000c08e0
jmp 0xba04c
push 0
push 1
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
jne 0xb9f04
push str.failed_to_set_cloexec_flag_on_socket
push 0x17bec4
push 0x348
push str.set_fd_cloexec
push 0x188be0
call fcn.000c0810
add esp, 0x14
test eax, eax
je 0xb9f04
push str.failed_to_set_cloexec_flag_on_socket
push 0x17bec4
push 0x554
push str.connect_socket_loop
push 0x188be0
call fcn.000c08e0
jmp 0xba04c
push 4
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0xf000
push eax
push 0x1002
push 0xffff
push dword [edi]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0xb9f4a
push str.failed_to_set_socket_receive_buffer_size
push 0x17bec4
push 0x556
push str.connect_socket_loop
push 0x188be0
call fcn.000c08e0
jmp 0xba04c
push dword [ebx + 0x10]
push dword [ebx + 0x18]
push dword [edi]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0xb9f73
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0xb9f73
mov esi, 1
jmp 0xba055
mov ecx, dword [edi]
call fcn.000b96c0
test eax, eax
je 0xb9fa1
push str.failed_to_set_blocking_flag_on_socket
push 0x17bec4
push 0x55f
push str.connect_socket_loop
push 0x188be0
call fcn.000c08e0
jmp 0xba04c
mov eax, dword [edi]
xorps xmm0, xmm0
mov dword [ebp - 0x128], eax
lea eax, [ebp - 0x20]
push eax
push 0
lea eax, [ebp - 0x12c]
movq qword [ebp - 0x20], xmm0
push eax
push 0
push 0
mov dword [ebp - 0x20], 0x19
mov dword [ebp - 0x12c], 1
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0xba051
lea eax, [ebp - 0x12c]
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0xba051
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x1007
push 0xffff
push dword [edi]
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0xba051
cmp dword [ebp - 0x14], eax
jne 0xba051
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x1c
push eax
lea eax, [edi + 4]
push eax
push dword [edi]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0xba0a8
push str.failed_to_get_the_local_socket_address_structure
push 0x17bec4
push 0x577
push str.connect_socket_loop
push 0x188be0
call fcn.000c0810
add esp, 0x14
mov esi, eax
test esi, esi
je 0xba08a
push dword [edi]
call dword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
je 0xba084
push str.failed_to_close_socket
push 0x17bec4
push 0x588
push str.connect_socket_loop
push 0x188be0
call fcn.000c08e0
add esp, 0x14
mov esi, eax
mov dword [edi], 0xffffffff
mov ebx, dword [ebx + 0x1c]
test ebx, ebx
jne 0xb9e10
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00150cb2
mov esp, ebp
pop ebp
ret
push 4
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0xea60
push eax
push 0x1005
push 0xffff
push dword [edi]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0xba0df
push str.failed_to_set_socket_timeout
push 0x17bec4
push 0x57c
jmp 0xba03d
mov eax, dword [ebp - 0x10]
xor esi, esi
mov dword [edi + 0x20], eax
jmp 0xba08a