Function at 0x1400bb750
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push rbx
sub rsp, 0x2c0
mov rax, qword [0x14020cc08]
xor rax, rsp
mov qword [rsp + 0x2b0], rax
cmp qword [rcx + 0x260], 0xffffffffffffffff
mov rbx, rcx
jne 0x1400bbac8
mov ecx, dword [rcx + 0x1cc]
sub ecx, 1
je 0x1400bb8cb
sub ecx, 1
je 0x1400bb871
cmp ecx, 1
je 0x1400bb7b5
lea rdx, str.503_Invalid_sequence_of_commands._r_n
mov rcx, rbx
call fcn.1400b82d0
mov rcx, rbx
call fcn.1400b8cb0
jmp 0x1400bb871
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 0x1400bb8a9
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 [0x14020e0e8]
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 0x1400bb88a
mov rcx, rbx
call fcn.1400bb0a0
mov rdi, qword [rsp + 0x2d8]
mov rcx, qword [rsp + 0x2b0]
xor rcx, rsp
call fcn.1401a8fd0
add rsp, 0x2c0
pop rbx
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1400bb869
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.500_Failed_to_connect_to_port__d._r_n
mov r8d, eax
jmp 0x1400bb8b9
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.1400b82d0
mov rcx, rbx
call fcn.1400b8cb0
jmp 0x1400bb869
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 0x1400bbaa3
lea rcx, [rsp + 0x190]
call fcn.1400012c0
lea rcx, [rsp + 0x70]
call fcn.1400012c0
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 [0x14020e0e8]
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.140178c40
mov r8d, dword [rbx + 0x1dc]
lea rdx, [0x1401b0f64]
lea rcx, [rsp + 0x70]
call fcn.140178c40
mov rdx, qword [rsp + 0x78]
mov rcx, qword [rsp + 0x198]
lea r9, [rsp + 0x38]
lea r8, [rsp + 0x40]
call qword [0x140203ae8]
test eax, eax
jne 0x1400bba70
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 0x1400bba36
mov rcx, rbx
call fcn.1400bb0a0
mov rcx, qword [rsp + 0x38]
call qword [0x140203af0]
jmp 0x1400bba87
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x1400bba63
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.1400b82d0
mov rcx, rbx
call fcn.1400b8cb0
mov rcx, qword [rsp + 0x38]
call qword [0x140203af0]
jmp 0x1400bba87
lea rdx, str.500_Failed_to_get_port_address._r_n
mov rcx, rbx
call fcn.1400b82d0
mov rcx, rbx
call fcn.1400b8cb0
lea rcx, [rsp + 0x70]
call fcn.140177510
lea rcx, [rsp + 0x190]
call fcn.140177510
jmp 0x1400bb871
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.1400b82d0
mov rcx, rbx
call fcn.1400b8cb0
jmp 0x1400bb871
call fcn.1400bb0a0
jmp 0x1400bb871