Function at 0x14016047e
Capabilities:
Connect socket
Get socket status

Disassembly:
jmp 0x140216710
mov dword [rsp + 0x20], r9d
mov byte [rsp + 0x18], r8b
mov word [rsp + 0x10], dx
mov dword [rsp + 8], ecx
push rbp
push rdi
mov eax, 0x8738
call fcn.140161e46
sub rsp, rax
lea rbp, [rsp + 0x30]
lea rdi, [rsp + 0x30]
mov ecx, 0x2042
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov ecx, dword [rsp + 0x8758]
mov rax, qword [0x1404ee780]
xor rax, rbp
mov qword [rbp + 0x86f8], rax
lea rcx, reloc.WS2_32.dll_accept
call fcn.14016a9fb
xor r8d, r8d
mov edx, 1
mov ecx, 2
call fcn.1401620bc
mov dword [rbp + 0x34], eax
cmp dword [rbp + 0x34], 0xffffffff
jne 0x1402167a5
call fcn.1401693b2
mov rdx, rax
lea rcx, str.make_connection:_socket_creation_failed___s___n
call fcn.140164be6
mov eax, 0xffffffff
jmp 0x140216b86
cmp dword [rbp + 0x34], 0
jne 0x1402167c9
lea rcx, str.make_connection:_Socket_0_is_reserved___Please_report_this____n
call fcn.140164be6
mov ecx, dword [rbp + 0x34]
call fcn.14016a66d
mov eax, 0xffffffff
jmp 0x140216b86
cmp dword [rbp + 0x34], 0x1000
jl 0x1402167f9
mov r8d, 0x1000
mov edx, dword [rbp + 0x34]
lea rcx, str.make_connection:_New_socket__d_is_greater_than_can_we_handle__Increase_the_value_of_MAXCONN__currently__d__for_your_OS_to_fix_this__n
call fcn.140164be6
mov ecx, dword [rbp + 0x34]
call fcn.14016a66d
mov eax, 0xffffffff
jmp 0x140216b86
mov edx, dword [rbp + 0x8738]
mov ecx, dword [rbp + 0x34]
call fcn.14016adca
mov eax, 2
mov word [rbp + 8], ax
mov ecx, dword [rbp + 0x8720]
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rbp + 0xc], eax
movzx ecx, word [rbp + 0x8728]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp + 0xa], ax
movzx eax, byte [rbp + 0x8730]
test eax, eax
jne 0x1402168a7
movzx eax, word [rbp + 0x8728]
mov ecx, dword [rbp + 0x8720]
and ecx, 0xff
mov edx, dword [rbp + 0x8720]
shr edx, 8
and edx, 0xff
mov r8d, dword [rbp + 0x8720]
shr r8d, 0x10
and r8d, 0xff
mov r9d, dword [rbp + 0x8720]
shr r9d, 0x18
and r9d, 0xff
mov dword [rbp + 0x86f4], r9d
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov r9d, edx
mov eax, dword [rbp + 0x86f4]
mov edx, eax
lea rcx, str.Connecting_to__d._d._d._d:_i_n
call fcn.140166856
mov edx, 1
mov ecx, dword [rbp + 0x34]
call fcn.140163a4d
movsxd rax, dword [rbp + 0x34]
lea rcx, [0x140521da0]
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp + 8]
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.WS2_32.dll_connect]
mov dword [rbp + 0x54], eax
cmp dword [rbp + 0x54], 0xffffffff
jne 0x140216a95
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x140216a5c
mov dword [rbp + 0x80], 0
mov dword [rbp + 0x80c4], 0
jmp 0x140216915
mov eax, dword [rbp + 0x80c4]
inc eax
mov dword [rbp + 0x80c4], eax
mov eax, dword [rbp + 0x80]
cmp dword [rbp + 0x80c4], eax
jae 0x140216946
mov eax, dword [rbp + 0x80c4]
movsxd rcx, dword [rbp + 0x34]
lea rdx, [0x140521da0]
mov rcx, qword [rdx + rcx*8]
cmp qword [rbp + rax*8 + 0x88], rcx
jne 0x140216944
jmp 0x140216946
jmp 0x140216907
mov eax, dword [rbp + 0x80]
cmp dword [rbp + 0x80c4], eax
jne 0x14021698b
cmp dword [rbp + 0x80], 0x1000
jae 0x14021698b
movsxd rax, dword [rbp + 0x34]
lea rcx, [0x140521da0]
mov edx, dword [rbp + 0x80c4]
mov rax, qword [rcx + rax*8]
mov qword [rbp + rdx*8 + 0x88], rax
mov eax, dword [rbp + 0x80]
inc eax
mov dword [rbp + 0x80], eax
xor eax, eax
test eax, eax
jne 0x1402168fb
mov eax, dword [rbp + 0x8738]
mov dword [rbp + 0x80a8], eax
mov dword [rbp + 0x80ac], 0
lea rax, [rbp + 0x80a8]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rbp + 0x80]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_select]
mov dword [rbp + 0x54], eax
cmp dword [rbp + 0x54], 0
jne 0x140216a09
movzx eax, byte [rbp + 0x8730]
test eax, eax
jne 0x1402169f5
mov r8d, dword [rbp + 0x8738]
mov edx, dword [rbp + 0x34]
lea rcx, str.make_connection:_connection_failed__socket__d__timeout_after__ds___n
call fcn.140164be6
mov ecx, dword [rbp + 0x34]
call fcn.140161e5a
mov eax, 0xffffffff
jmp 0x140216b86
cmp dword [rbp + 0x54], 0xffffffff
je 0x140216a5c
movsxd rax, dword [rbp + 0x34]
lea rcx, [0x140521da0]
lea rdx, [rbp + 0x80]
mov rcx, qword [rcx + rax*8]
call fcn.1401602ee
test eax, eax
je 0x140216a30
jmp 0x140216a95
movzx eax, byte [rbp + 0x8730]
test eax, eax
jne 0x140216a4a
mov edx, dword [rbp + 0x34]
lea rcx, str.make_connection:_connection_failed__socket__d__not_writeable___n
call fcn.140164be6
mov ecx, dword [rbp + 0x34]
call fcn.140161e5a
mov eax, 0xffffffff
jmp 0x140216b86
movzx eax, byte [rbp + 0x8730]
test eax, eax
jne 0x140216a7e
call fcn.1401693b2
mov r8, rax
mov edx, dword [rbp + 0x34]
lea rcx, str.make_connection:_connect_failed__socket__d___s___n
call fcn.140164be6
mov ecx, dword [rbp + 0x34]
call fcn.140161e5a
mov eax, 0xffffffff
jmp 0x140216b86
mov dword [rbp + 0x80e4], 0
jmp 0x140216aaf
mov eax, dword [rbp + 0x80e4]
inc eax
mov dword [rbp + 0x80e4], eax
mov eax, dword [0x140515b90]
cmp dword [rbp + 0x80e4], eax
jae 0x140216ae3
mov eax, dword [rbp + 0x80e4]
lea rcx, [0x140515b98]
movsxd rdx, dword [rbp + 0x34]
lea r8, [0x140521da0]
mov rdx, qword [r8 + rdx*8]
cmp qword [rcx + rax*8], rdx
jne 0x140216ae1
jmp 0x140216ae3
jmp 0x140216aa1
mov eax, dword [0x140515b90]
cmp dword [rbp + 0x80e4], eax
jne 0x140216b2b
cmp dword [0x140515b90], 0x1000
jae 0x140216b2b
movsxd rax, dword [rbp + 0x34]
lea rcx, [0x140521da0]
mov edx, dword [rbp + 0x80e4]
lea r8, [0x140515b98]
mov rax, qword [rcx + rax*8]
mov qword [r8 + rdx*8], rax
mov eax, dword [0x140515b90]
inc eax
mov dword [0x140515b90], eax
xor eax, eax
test eax, eax
jne 0x140216a95
mov eax, dword [rbp + 0x34]
cmp dword [0x140515b40], eax
jg 0x140216b4b
mov eax, dword [rbp + 0x34]
inc eax
mov dword [0x140515b40], eax
mov r9, qword [0x1404ee050]
lea r8, [0x140160c44]
lea rdx, [0x14016b9d7]
mov ecx, dword [rbp + 0x34]
call fcn.140215950
mov ecx, dword [rbp + 0xc]
call qword [sym.imp.WS2_32.dll_ntohl]
movsxd rcx, dword [rbp + 0x34]
lea rdx, [0x14050db40]
mov rcx, qword [rdx + rcx*8]
mov dword [rcx + 4], eax
mov eax, dword [rbp + 0x34]
mov rdi, rax
lea rcx, [rbp - 0x30]
lea rdx, reloc.WS2_32.dll_closesocket
call fcn.140168bb0
mov rax, rdi
mov rcx, qword [rbp + 0x86f8]
xor rcx, rbp
call fcn.140165226
lea rsp, [rbp + 0x8708]
pop rdi
pop rbp
ret