Function at 0x140cc94b0
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov rax, qword [0x14100f500]
xor rax, rsp
mov qword [rbp - 0x10], rax
movzx eax, word [rcx + 0x4e4]
lea rdi, str.Unable_to_connect
xor r13d, r13d
mov word [rsp + 0x40], ax
mov r15d, r9d
mov rsi, r8
mov r14, rdx
mov rbx, rcx
test r8, r8
je 0x140cc9527
add rcx, 0x238
call fcn.140cad490
mov rdx, rsi
mov rcx, rbx
call fcn.140cc6920
mov rdx, rsi
mov rcx, rbx
call fcn.140cd0690
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
xorps xmm0, xmm0
mov qword [rsp + 0x108], r12
xor eax, eax
lea rcx, [rbx + 0x2e0]
movups xmmword [rsp + 0x50], xmm0
mov qword [rbp - 0x50], rax
movups xmmword [rsp + 0x60], xmm0
mov dword [rbp - 0x48], eax
movups xmmword [rsp + 0x70], xmm0
mov word [rbp - 0x44], ax
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
call fcn.140cb9a90
test eax, eax
je 0x140cc9606
test r15d, r15d
je 0x140cc962f
cmp dword [rbx + 0x350], r13d
jne 0x140cc962f
cmp qword [rbx + 0x4b0], 0xffffffffffffffff
jne 0x140cc962f
cmp dword [rbx + 0x338], r13d
jne 0x140cc962f
mov rcx, rbx
call fcn.140ca7dc0
mov rcx, rax
mov dword [rsp + 0x30], r15d
lea rax, str.dns_lookup_failed__d
mov r9d, 4
mov qword [rsp + 0x28], rax
lea rdx, [0x140ca7400]
lea rax, str.lws_client_connect_3_connect
mov r8, rbx
mov qword [rsp + 0x20], rax
call fcn.140ca8530
mov rcx, qword [rbx]
lea r8, [rbx + 0x238]
lea r9, [0x140cc9e60]
mov word [rbx + 0x4b8], 0x200
xor edx, edx
mov qword [rsp + 0x20], 0xf4240
call fcn.140cad4b0
mov rax, rbx
mov r12, qword [rsp + 0x108]
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.140cd9320
add rsp, 0x110
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret
movzx eax, word [rbx + 0x4b8]
mov edx, 0x202
mov esi, reloc.WS2_32.dll_recv
mov ecx, 1
mov r12, 0xffffffffffffffff
cmp eax, edx
jne 0x140cc97f8
mov rcx, qword [rbx + 0x4b0]
cmp rcx, r12
je 0x140cc97f3
cmp dword [rbx + 0x350], r13d
jne 0x140cc967a
cmp qword [rbx + 0x248], r13
je 0x140cc977e
lea rdx, [rbx + 0x374]
xor r8d, r8d
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x140cc9db6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2748
je 0x140cc9db6
cmp eax, 0x2735
jne 0x140cc96fe
mov r8d, esi
xor edx, edx
mov rcx, rbx
call fcn.140cad110
test eax, eax
je 0x140cc9daf
mov rcx, rbx
call fcn.140ca7dc0
mov rcx, rax
lea rdx, [0x140ca7400]
lea rax, str.pollfd_failed
mov r9d, 4
mov qword [rsp + 0x28], rax
mov r8, rbx
lea rax, str.lws_client_connect_check
mov qword [rsp + 0x20], rax
call fcn.140ca8530
xor eax, eax
jmp 0x140cc9609
test eax, eax
je 0x140cc9daf
cmp eax, 0x2726
je 0x140cc9daf
cmp eax, 0x2733
je 0x140cc9daf
mov rcx, rbx
call fcn.140ca7dc0
mov rcx, rax
mov dword [rsp + 0x30], 1
lea rax, str.connect_check_FAILED:__d
mov r9d, 4
mov qword [rsp + 0x28], rax
lea rdx, [0x140ca7400]
lea rax, str.lws_client_connect_check
mov r8, rbx
mov qword [rsp + 0x20], rax
call fcn.140ca8530
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.conn_fail:__d
mov edx, gethostbyaddr
mov r9d, eax
lea rcx, [rbp - 0x40]
call fcn.140ca62f0
lea rdi, [rbp - 0x40]
lea r14, str.lws_client_connect_3_connect
mov rcx, rbx
call fcn.140cac990
mov rcx, qword [rbx + 0x4b0]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbx + 0x4b0], r12
lea rcx, [rbx + 0x238]
call fcn.140cad490
cmp qword [rbx + 0x348], 0
jne 0x140cc9852
mov rcx, rbx
call fcn.140caef30
inc r12
cmp byte [rdi + r12], 0
jne 0x140cc97c3
mov r8, r12
mov rdx, rdi
mov rcx, rbx
call fcn.140caefc0
lea r8, str.client_connect3
xor edx, edx
mov rcx, rbx
call fcn.140caef80
xor eax, eax
jmp 0x140cc9609
mov ecx, 1
test r14, r14
je 0x140cc984b
cmp byte [r14], 0x2b
jne 0x140cc984b
lea rsi, [rbx + 0x374]
mov word [rsp + 0x50], cx
xor eax, eax
lea rdx, [r14 + 1]
xorps xmm0, xmm0
lea rcx, [rsp + 0x52]
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], rax
mov r8d, WSASetLastError
mov dword [rsi + 0x18], eax
call fcn.140da1f50
cmp byte [rsp + 0x52], 0x40
mov byte [rbp - 0x43], r13b
jne 0x140cc9842
mov byte [rsp + 0x52], r13b
lea r14, str.lws_client_connect_3_connect
jmp 0x140cc98c7
lea r14, str.lws_client_connect_3_connect
cmp dword [rbx + 0x350], 0
je 0x140cc97db
mov rdi, qword [rbx + 0x348]
mov rcx, rdi
call fcn.140cb9af0
movups xmm0, xmmword [rdi + 0x34]
lea r13, [rbx + 0x374]
xor edx, edx
lea r8, str.lws_free
mov rcx, rdi
movups xmmword [r13], xmm0
mov rsi, r13
movsd xmm1, qword [rdi + 0x44]
movsd qword [r13 + 0x10], xmm1
mov eax, dword [rdi + 0x4c]
mov dword [r13 + 0x18], eax
call fcn.140cae160
movzx ecx, word [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbx + 0x376], ax
mov r15d, 0x1c
cmp word [r13], 2
mov eax, reloc.WS2_32.dll_recv
cmove r15d, eax
cmp qword [rbx + 0x4b0], r12
jne 0x140cc9bde
mov rax, qword [rbx]
mov rcx, qword [rax + 0x5f0]
mov rax, qword [rcx + 0x38]
test rax, rax
je 0x140cc98f4
mov rcx, rbx
call rax
test eax, eax
jne 0x140cc9d72
xor r8d, r8d
test byte [rbx + 0x4d8], 8
je 0x140cc990d
mov eax, 1
mov edi, eax
mov edx, eax
mov ecx, eax
jmp 0x140cc9917
movzx edi, word [rsi]
mov edx, 1
mov ecx, edi
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rbx + 0x4b0], rax
cmp rax, r12
jne 0x140cc9998
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.conn_fail:_skt_creation:_errno__d
mov edx, gethostbyaddr
mov r9d, eax
lea rcx, [rbp - 0x40]
call fcn.140ca62f0
mov rcx, rbx
lea rdi, [rbp - 0x40]
call fcn.140ca7dc0
mov rcx, rax
lea rsi, str.lws_client_connect_3_connect
lea rax, [rbp - 0x40]
mov r9d, 2
mov qword [rsp + 0x30], rax
lea rdx, [0x140ca7400]
lea rax, [0x140ec28e4]
mov r8, rbx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
call fcn.140ca8530
lea r14, str.lws_client_connect_3_connect
jmp 0x140cc97a1
mov r8d, dword [rbx + 0x4d8]
mov rdx, rax
mov rcx, qword [rbx + 8]
shr r8d, 3
and r8d, 1
call fcn.140cc6280
test eax, eax
je 0x140cc9a18
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea r8, str.conn_fail:_skt_options:_errno__d
mov edx, gethostbyaddr
mov r9d, eax
lea rcx, [rbp - 0x40]
call fcn.140ca62f0
mov rcx, rbx
lea rdi, [rbp - 0x40]
call fcn.140ca7dc0
mov rcx, rax
lea rdx, [0x140ca7400]
lea rax, [rbp - 0x40]
mov r9d, 2
mov qword [rsp + 0x30], rax
mov r8, rbx
lea rax, [0x140ec28e4]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
call fcn.140ca8530
jmp 0x140cc978d
mov r8d, dword [rbx + 0x4c8]
movzx edx, byte [rbx + 0x4f6]
mov rcx, qword [rbx + 0x4b0]
call fcn.140cc6470
test eax, eax
je 0x140cc9a70
mov rcx, rbx
call fcn.140ca7dc0
mov rcx, rax
lea rsi, str.lws_client_connect_3_connect
lea rax, str.unable_to_set_ip_options
mov r9d, 2
mov qword [rsp + 0x28], rax
lea rdx, [0x140ca7400]
mov r8, rbx
mov qword [rsp + 0x20], rsi
call fcn.140ca8530
jmp 0x140cc9a77
lea rsi, str.lws_client_connect_3_connect
mov rax, qword [rbx]
mov word [rbx + 0x4b8], 0x202
mov rcx, qword [rax + 0x5f0]
mov rax, qword [rcx + 0x48]
test rax, rax
je 0x140cc9afb
mov rcx, rbx
call rax
test eax, eax
je 0x140cc9afb
lea r8, str.conn_fail:_sock_accept
mov edx, gethostbyaddr
lea rcx, [rbp - 0x40]
call fcn.140ca62f0
mov rcx, rbx
lea rdi, [rbp - 0x40]
call fcn.140ca7dc0
mov rcx, rax
lea rdx, [0x140ca7400]
lea rax, [rbp - 0x40]
mov r9d, 2
mov qword [rsp + 0x30], rax
mov r8, rbx
lea rax, [0x140ec28e4]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
call fcn.140ca8530
lea r14, str.lws_client_connect_3_connect
jmp 0x140cc978d
mov rcx, qword [rbx]
mov rdx, rbx
call fcn.140cac620
test eax, eax
je 0x140cc9b2f
lea r8, str.conn_fail:_insert_fd
mov edx, gethostbyaddr
lea rcx, [rbp - 0x40]
call fcn.140ca62f0
lea rdi, [rbp - 0x40]
lea r14, str.lws_client_connect_3_connect
jmp 0x140cc978d
xor edx, edx
mov r8d, 0x300
mov rcx, rbx
call fcn.140cad110
test eax, eax
je 0x140cc9b5d
lea r8, str.conn_fail:_change_pollfd
mov edx, gethostbyaddr
lea rcx, [rbp - 0x40]
call fcn.140ca62f0
jmp 0x140cc977a
cmp qword [rbx + 0x10], 0
jne 0x140cc9b73
mov rax, qword [rbx + 8]
mov rcx, qword [rax + 0x250]
mov qword [rbx + 0x10], rcx
mov r8, qword [rbx + 8]
mov edx, 2
mov rcx, rbx
mov r8d, dword [r8 + 0x35c]
call fcn.140cb9d70
mov edx, 6
mov r8d, 0x5e
mov rcx, rbx
call fcn.140ca7920
test rax, rax
je 0x140cc9bd7
cmp byte [rax], 0
je 0x140cc9bd7
mov r8, qword [rbx + 0x4b0]
xor r9d, r9d
mov rcx, qword [rbx + 8]
mov rdx, rbx
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
call fcn.140cc00e0
test eax, eax
jns 0x140cc9bd7
lea r8, str.conn_fail:_socket_bind
jmp 0x140cc9b4a
lea r14, str.lws_client_connect_3_connect
test byte [rbx + 0x4d8], 8
je 0x140cc9c21
cmp byte [rsp + 0x52], 0
lea r13, [rsp + 0x50]
mov rdi, r12
je 0x140cc9c0e
lea rax, [rsp + 0x52]
nop dword [rax + rax]
inc rdi
cmp byte [rax + rdi], 0
jne 0x140cc9c00
add edi, 2
jmp 0x140cc9c46
lea rax, [rsp + 0x53]
inc rdi
cmp byte [rax + rdi], 0
jne 0x140cc9c13
add edi, 3
jmp 0x140cc9c46
lea rdi, str.Unable_to_connect
test r13, r13
je 0x140cc9785
mov r8d, r15d
lea rcx, [rbx + 0x374]
mov rdx, r13
call fcn.140da1510
mov edi, r15d
mov rcx, qword [rbx + 0x10]
mov r8d, 0x69
and dword [rbx + 0x4d4], 0xffffefff
mov rdx, rbx
mov rax, qword [rbx + 0x4b0]
mov r9, qword [rbx + 0x428]
mov rcx, qword [rcx + 8]
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], rax
call fcn.140ca7dd0
test eax, eax
jne 0x140cc97db
mov rcx, qword [rbx + 0x4b0]
mov r8d, edi
mov rdx, r13
call qword [sym.imp.WS2_32.dll_connect]
mov edi, eax
call fcn.140cade10
mov qword [rbx + 0x420], rax
mov dword [rbx + 0x40c], 0
cmp edi, r12d
jne 0x140cc9db6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
test eax, eax
je 0x140cc9d01
add eax, 0xffffd8da
cmp eax, 0x22
ja 0x140cc9ce4
movabs rcx, 0x40000e001
bt rcx, rax
jb 0x140cc9d01
call fcn.140cade10
sub eax, dword [rbx + 0x420]
lea rdi, str.Unable_to_connect
mov dword [rbx + 0x40c], eax
jmp 0x140cc9785
mov rcx, rbx
lea rdi, str.Unable_to_connect
call fcn.140cc5dd0
test eax, eax
jne 0x140cc9785
cmp esi, 0x2748
je 0x140cc9db6
mov rcx, qword [rbx]
lea r8, [rbx + 0x238]
lea r9, [0x140cc9480]
mov eax, dword [rcx + 0x898]
imul rdx, rax, 0xf4240
mov qword [rsp + 0x20], rdx
xor edx, edx
call fcn.140cad4b0
xor edx, edx
lea rdi, str.Unable_to_connect
mov r8d, reloc.WS2_32.dll_recv
mov rcx, rbx
call fcn.140cad110
test eax, eax
je 0x140cc9606
jmp 0x140cc9785
test dword [rbx + 0x4b8], 0x10000000
je 0x140cc9d9a
cmp qword [rbx + 0x10], 0
je 0x140cc9d9a
mov r8d, 0x27
lea rdx, str.waiting_for_event_loop_watcher_to_close
mov rcx, rbx
call fcn.140caefc0
cmp dword [rbx + 0x4c0], r12d
jne 0x140cc97db
mov rcx, rbx
call fcn.140caec70
xor eax, eax
jmp 0x140cc9609
call fcn.140cade10
sub eax, dword [rbx + 0x420]
lea rdx, [rbx + 0x358]
movsxd rcx, dword [rbx + 0x4b0]
lea r8, [rsp + 0x40]
mov dword [rbx + 0x40c], eax
mov dword [rsp + 0x40], 0x1c
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, r12d
jne 0x140cc9e0e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
call fcn.140cfb87c
mov r8, rax
lea rdx, str.getsockname:__s_n
mov ecx, 2
call fcn.140ca84f0
lea rcx, [rbx + 0x238]
call fcn.140cad490
mov rcx, rbx
call fcn.140caef30
mov rax, qword [rbx + 0x10]
test rax, rax
je 0x140cc9e49
mov r8, qword [rbx + 0x428]
xor r9d, r9d
mov edx, 0x1d
mov qword [rsp + 0x20], 0
mov rcx, rbx
call qword [rax + reloc.WS2_32.dll_htonl]
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.140cc9090
jmp 0x140cc9609