Function at 0x140059950
Capabilities:
Connect socket
Resolve dns
Set socket configuration

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x60]
sub rsp, 0x160
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rsp + 0x1b8], rbx
mov rax, qword [0x1400f2120]
xor rax, rsp
mov qword [rbp + 0x50], rax
mov r12, r8
mov r13, rdx
mov r15, rcx
mov qword [rbp - 0x80], rdx
mov qword [rbp - 0x78], r8
xor eax, eax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
xor ebx, ebx
mov qword [rsp + 0x40], rbx
mov esi, ebx
movzx eax, byte [rcx + 0x28]
dec al
cmp al, 1
ja 0x140059a87
mov qword [rbp - 0x58], SafeArrayLock
mov qword [rbp - 0x60], rbx
mov byte [rbp - 0x70], bl
lea r8d, [rbx + 0x2f]
lea rdx, str._Connector::NewConnect__Connection_alredy_exist
lea rcx, [rbp - 0x70]
call fcn.140006800
nop
mov dword [r15], 0xffffffff
lea rcx, [r15 + 8]
lea rax, [rbp - 0x70]
cmp rcx, rax
je 0x140059a18
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp - 0x70]
call fcn.140006930
nop
mov rax, qword [rbp - 0x58]
cmp rax, 0x10
jb 0x140059a6f
inc rax
mov rcx, qword [rbp - 0x70]
cmp rax, 0x1000
jb 0x140059a69
test cl, 0x1f
je 0x140059a3c
call fcn.140078f8c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140059a4b
call fcn.140078f8c
int3
sub rcx, rax
cmp rcx, 8
jae 0x140059a5a
call fcn.140078f8c
int3
cmp rcx, 0x27
jbe 0x140059a66
call fcn.140078f8c
int3
mov rcx, rax
call fcn.14002a780
nop
mov rcx, r13
call fcn.140006530
nop
mov rcx, r12
call fcn.140006530
xor eax, eax
jmp 0x140059f99
xor eax, eax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x4c], ebx
mov dword [rsp + 0x50], 1
cmp qword [r8 + 0x18], 0x10
jb 0x140059abf
mov rdx, qword [r8]
jmp 0x140059ac2
mov rdx, r12
cmp qword [r13 + 0x18], 0x10
jb 0x140059acf
mov rcx, qword [r13]
jmp 0x140059ad2
mov rcx, r13
lea r9, [rsp + 0x40]
lea r8, [rsp + 0x48]
call qword [sym.imp.WS2_32.dll_getaddrinfo]
mov r14d, eax
mov dword [rsp + 0x38], eax
test eax, eax
je 0x140059c6f
mov r8, r13
lea rdx, str._Connector::NewConnect__Setup_connection_parameters_failed__
lea rcx, [rbp - 0x30]
call fcn.14000e020
nop
lea r8, [0x1400a75e0]
mov rdx, rax
lea rcx, [rbp - 0x50]
call fcn.14000cf40
nop
mov r8, r12
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.14000f830
nop
mov dword [r15], 0xffffffff
lea rcx, [r15 + 8]
cmp rcx, rax
je 0x140059b49
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
call fcn.140006930
nop
mov rax, qword [rbp - 0x58]
cmp rax, 0x10
jb 0x140059b9f
inc rax
mov rcx, qword [rbp - 0x70]
cmp rax, 0x1000
jb 0x140059b9a
test cl, 0x1f
je 0x140059b6d
call fcn.140078f8c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140059b7c
call fcn.140078f8c
int3
sub rcx, rax
cmp rcx, 8
jae 0x140059b8b
call fcn.140078f8c
int3
cmp rcx, 0x27
jbe 0x140059b97
call fcn.140078f8c
int3
mov rcx, rax
call fcn.14002a780
mov qword [rbp - 0x58], SafeArrayLock
mov qword [rbp - 0x60], rbx
mov byte [rbp - 0x70], 0
mov rax, qword [rbp - 0x38]
cmp rax, 0x10
jb 0x140059c05
inc rax
mov rcx, qword [rbp - 0x50]
cmp rax, 0x1000
jb 0x140059c00
test cl, 0x1f
je 0x140059bd3
call fcn.140078f8c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140059be2
call fcn.140078f8c
int3
sub rcx, rax
cmp rcx, 8
jae 0x140059bf1
call fcn.140078f8c
int3
cmp rcx, 0x27
jbe 0x140059bfd
call fcn.140078f8c
int3
mov rcx, rax
call fcn.14002a780
mov qword [rbp - 0x38], SafeArrayLock
mov qword [rbp - 0x40], rbx
mov byte [rbp - 0x50], 0
mov rax, qword [rbp - 0x18]
cmp rax, 0x10
jb 0x140059a6f
inc rax
mov rcx, qword [rbp - 0x30]
cmp rax, 0x1000
jb 0x140059a69
test cl, 0x1f
je 0x140059c41
call fcn.140078f8c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140059c50
call fcn.140078f8c
int3
sub rcx, rax
cmp rcx, 8
jae 0x140059c5f
call fcn.140078f8c
int3
cmp rcx, 0x27
jbe 0x140059a66
call fcn.140078f8c
int3
mov rdi, qword [rsp + 0x40]
test rdi, rdi
je 0x140059ee5
nop dword [rax]
mov r8d, dword [rdi + 0xc]
mov edx, dword [rdi + 8]
mov ecx, dword [rdi + 4]
call qword [sym.imp.WS2_32.dll_socket]
mov rsi, rax
mov byte [rsp + 0x30], 1
mov dword [rsp + 0x20], 1
lea r9, [rsp + 0x30]
mov edx, 6
lea r8d, [rdx - 5]
mov rcx, rax
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x38], eax
mov rcx, rsi
test eax, eax
jne 0x140059dcd
mov r8d, dword [rdi + 0x10]
mov rdx, qword [rdi + 0x20]
call qword [sym.imp.WS2_32.dll_connect]
mov r14d, eax
mov dword [rsp + 0x38], eax
test eax, eax
je 0x140059dc1
lea rdx, [rsp + 0x38]
lea rcx, [rbp + 0x10]
call fcn.140058840
mov rbx, rax
mov r8, r13
lea rdx, str._Connector::NewConnect__Attempt_to_connect_to
lea rcx, [rbp - 0x10]
call fcn.14000e020
nop
lea r8, [0x1400a75e0]
mov rdx, rax
lea rcx, [rbp + 0x30]
call fcn.14000cf40
nop
mov r8, r12
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.14000f830
nop
lea r8, str._failed_:_wsaerror
mov rdx, rax
lea rcx, [rbp - 0x50]
call fcn.14000cf40
nop
mov r8, rbx
mov rdx, rax
lea rcx, [rbp - 0x30]
call fcn.1400587b0
nop
mov dword [r15], 0xffffffff
lea rcx, [r15 + 8]
cmp rcx, rax
je 0x140059d70
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
call fcn.140006930
nop
lea rcx, [rbp - 0x30]
call fcn.140006530
nop
lea rcx, [rbp - 0x50]
call fcn.140006530
nop
lea rcx, [rbp - 0x70]
call fcn.140006530
nop
lea rcx, [rbp + 0x30]
call fcn.140006530
nop
lea rcx, [rbp - 0x10]
call fcn.140006530
nop
lea rcx, [rbp + 0x10]
call fcn.140006530
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rdi, qword [rdi + 0x28]
test rdi, rdi
jne 0x140059c80
mov rdi, qword [rsp + 0x40]
xor ebx, ebx
jmp 0x140059ee5
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
lea rdx, [rsp + 0x38]
lea rcx, [rbp - 0x30]
call fcn.140058840
nop
mov r8, rax
lea rdx, str._Connector::NewConnect__Setup_socket_option_failed_:_wsaerror
lea rcx, [rbp - 0x50]
call fcn.14000cee0
nop
mov dword [r15], 0xffffffff
lea rcx, [r15 + 8]
cmp rcx, rax
je 0x140059e21
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
call fcn.140006930
nop
mov rax, qword [rbp - 0x38]
cmp rax, 0x10
jb 0x140059e77
inc rax
mov rcx, qword [rbp - 0x50]
cmp rax, 0x1000
jb 0x140059e72
test cl, 0x1f
je 0x140059e45
call fcn.140078f8c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140059e54
call fcn.140078f8c
int3
sub rcx, rax
cmp rcx, 8
jae 0x140059e63
call fcn.140078f8c
int3
cmp rcx, 0x27
jbe 0x140059e6f
call fcn.140078f8c
int3
mov rcx, rax
call fcn.14002a780
mov qword [rbp - 0x38], SafeArrayLock
mov qword [rbp - 0x40], 0
mov byte [rbp - 0x50], 0
mov rax, qword [rbp - 0x18]
cmp rax, 0x10
jb 0x140059a6f
inc rax
mov rcx, qword [rbp - 0x30]
cmp rax, 0x1000
jb 0x140059a69
test cl, 0x1f
je 0x140059eb7
call fcn.140078f8c
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x140059ec6
call fcn.140078f8c
int3
sub rcx, rax
cmp rcx, 8
jae 0x140059ed5
call fcn.140078f8c
int3
cmp rcx, 0x27
jbe 0x140059a66
call fcn.140078f8c
int3
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
test r14d, r14d
je 0x140059f57
lea rdx, [rsp + 0x38]
lea rcx, [rbp - 0x10]
call fcn.140058840
nop
mov r8, rax
lea rdx, str._Connector::NewConnect_
lea rcx, [rbp + 0x10]
call fcn.14000cee0
nop
mov dword [r15], 0xffffffff
lea rcx, [r15 + 8]
cmp rcx, rax
je 0x140059f36
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
call fcn.140006930
nop
lea rcx, [rbp + 0x10]
call fcn.140006530
nop
lea rcx, [rbp - 0x10]
call fcn.140006530
mov rcx, rsi
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x140059a6f
mov byte [r15 + 0x28], 1
mov qword [r15 + 0x30], rsi
mov ecx, 0x120
call fcn.1400573bc
mov qword [rsp + 0x38], rax
test rax, rax
je 0x140059f7f
mov rcx, rax
call fcn.14005c0b0
mov rbx, rax
mov qword [r15 + 0x38], rbx
mov rcx, r13
call fcn.140006530
nop
mov rcx, r12
call fcn.140006530
mov eax, 1
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.140057d50
mov rbx, qword [rsp + 0x1b8]
add rsp, 0x160
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret