Function at 0x1400bb8c0
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x2c0
mov rax, qword [0x14020cc58]
xor rax, rsp
mov qword [rsp + 0x2b0], rax
cmp qword [rcx + 0x260], 0xffffffffffffffff
mov rbx, rcx
jne 0x1400bbc38
mov ecx, dword [rcx + 0x1cc]
sub ecx, 1
je 0x1400bba3b
sub ecx, 1
je 0x1400bb9e1
cmp ecx, 1
je 0x1400bb925
lea rdx, str.503_Invalid_sequence_of_commands._r_n
mov rcx, rbx
call fcn.1400b8440
mov rcx, rbx
call fcn.1400b8e20
jmp 0x1400bb9e1
movsx ecx, word [rbx + 0x1d8]
mov edx, 1
mov qword [rsp + 0x2d8], rdi
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
cmp rax, 0xffffffffffffffff
mov qword [rbx + 0x260], rax
je 0x1400bba19
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 1
mov rcx, rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rdx, qword [0x14020e120]
mov rcx, qword [rbx + 0x260]
mov rdx, qword [rdx + 0x20]
mov r9d, gethostbyname
mov r8d, 0x403
call qword [sym.imp.WS2_32.dll_WSAAsyncSelect]
cmp word [rbx + 0x1d8], 2
mov rcx, qword [rbx + 0x260]
mov eax, reloc.WS2_32.dll_recv
mov r8d, 0x1c
lea rdx, [rbx + 0x1d8]
cmove r8d, eax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1400bb9fa
mov rcx, rbx
call fcn.1400bb210
mov rdi, qword [rsp + 0x2d8]
mov rcx, qword [rsp + 0x2b0]
xor rcx, rsp
call fcn.1401a8ec0
add rsp, 0x2c0
pop rbx
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1400bb9d9
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.500_Failed_to_connect_to_port__d._r_n
mov r8d, eax
jmp 0x1400bba29
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.500_Failed_to_create_port_socket__d._r_n
mov r8d, eax
mov rcx, rbx
call fcn.1400b8440
mov rcx, rbx
call fcn.1400b8e20
jmp 0x1400bb9d9
mov edx, 1
lea ecx, [rdx + 1]
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
cmp rax, 0xffffffffffffffff
mov qword [rbx + 0x260], rax
je 0x1400bbc13
lea rcx, [rsp + 0x190]
call fcn.14017d460
lea rcx, [rsp + 0x70]
call fcn.14017d460
mov rcx, qword [rbx + 0x260]
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 1
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rdx, qword [0x14020e120]
mov rcx, qword [rbx + 0x260]
mov rdx, qword [rdx + 0x20]
mov r9d, gethostbyname
mov r8d, 0x403
call qword [sym.imp.WS2_32.dll_WSAAsyncSelect]
movzx ecx, byte [rbx + 0x1da]
movzx eax, byte [rbx + 0x1db]
movzx r9d, byte [rbx + 0x1d9]
movzx r8d, byte [rbx + 0x1d8]
xor r11d, r11d
mov qword [rsp + 0x48], r11
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov qword [rsp + 0x40], r11
lea rcx, [rsp + 0x190]
lea rdx, str._d._d._d._d
mov qword [rsp + 0x50], r11
mov qword [rsp + 0x58], r11
mov qword [rsp + 0x60], r11
mov qword [rsp + 0x68], r11
mov dword [rsp + 0x44], 2
mov dword [rsp + 0x4c], 6
mov dword [rsp + 0x48], 1
call fcn.1401788c0
mov r8d, dword [rbx + 0x1dc]
lea rdx, [0x1401b0f64]
lea rcx, [rsp + 0x70]
call fcn.1401788c0
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x198]
lea r9, [rsp + 0x38]
lea r8, [rsp + 0x40]
call qword [0x140203b38]
test eax, eax
jne 0x1400bbbe0
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rbx + 0x260]
mov r8d, dword [rdx + 0x10]
mov rdx, qword [rdx + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1400bbba6
mov rcx, rbx
call fcn.1400bb210
mov rcx, qword [rsp + 0x38]
call qword [0x140203b40]
jmp 0x1400bbbf7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1400bbbd3
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.500_Failed_to_connect_to_port__d._r_n
mov rcx, rbx
mov r8d, eax
call fcn.1400b8440
mov rcx, rbx
call fcn.1400b8e20
mov rcx, qword [rsp + 0x38]
call qword [0x140203b40]
jmp 0x1400bbbf7
lea rdx, str.500_Failed_to_get_port_address._r_n
mov rcx, rbx
call fcn.1400b8440
mov rcx, rbx
call fcn.1400b8e20
lea rcx, [rsp + 0x70]
call fcn.1400012c0
lea rcx, [rsp + 0x190]
call fcn.1400012c0
jmp 0x1400bb9e1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.500_Failed_to_create_port_socket__d._r_n
mov rcx, rbx
mov r8d, eax
call fcn.1400b8440
mov rcx, rbx
call fcn.1400b8e20
jmp 0x1400bb9e1
call fcn.1400bb210
jmp 0x1400bb9e1