Function at 0x1400bb890
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 0x1400bbc08
mov ecx, dword [rcx + 0x1cc]
sub ecx, 1
je 0x1400bba0b
sub ecx, 1
je 0x1400bb9b1
cmp ecx, 1
je 0x1400bb8f5
lea rdx, str.503_Invalid_sequence_of_commands._r_n
mov rcx, rbx
call fcn.1400b8410
mov rcx, rbx
call fcn.1400b8df0
jmp 0x1400bb9b1
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 0x1400bb9e9
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 0x1400bb9ca
mov rcx, rbx
call fcn.1400bb1e0
mov rdi, qword [rsp + 0x2d8]
mov rcx, qword [rsp + 0x2b0]
xor rcx, rsp
call fcn.1401a8fb0
add rsp, 0x2c0
pop rbx
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1400bb9a9
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.500_Failed_to_connect_to_port__d._r_n
mov r8d, eax
jmp 0x1400bb9f9
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.1400b8410
mov rcx, rbx
call fcn.1400b8df0
jmp 0x1400bb9a9
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 0x1400bbbe3
lea rcx, [rsp + 0x190]
call fcn.140177280
lea rcx, [rsp + 0x70]
call fcn.140177280
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.1401789a0
mov r8d, dword [rbx + 0x1dc]
lea rdx, [0x1401b0f64]
lea rcx, [rsp + 0x70]
call fcn.1401789a0
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 0x1400bbbb0
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 0x1400bbb76
mov rcx, rbx
call fcn.1400bb1e0
mov rcx, qword [rsp + 0x38]
call qword [0x140203b40]
jmp 0x1400bbbc7
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1400bbba3
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.1400b8410
mov rcx, rbx
call fcn.1400b8df0
mov rcx, qword [rsp + 0x38]
call qword [0x140203b40]
jmp 0x1400bbbc7
lea rdx, str.500_Failed_to_get_port_address._r_n
mov rcx, rbx
call fcn.1400b8410
mov rcx, rbx
call fcn.1400b8df0
lea rcx, [rsp + 0x70]
call fcn.14017d580
lea rcx, [rsp + 0x190]
call fcn.14017d580
jmp 0x1400bb9b1
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.1400b8410
mov rcx, rbx
call fcn.1400b8df0
jmp 0x1400bb9b1
call fcn.1400bb1e0
jmp 0x1400bb9b1