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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x2350]
mov eax, 0x2450
call fcn.140148660
sub rsp, rax
mov rax, qword [0x14021b0e0]
xor rax, rsp
mov qword [rbp + 0x2340], rax
mov rbx, rcx
lea rax, vtable.vncSockConnect.0
mov qword [rcx], rax
mov rax, qword [rcx + 0x18]
mov r15d, 2
cmp rax, 0xffffffffffffffff
je 0x140089da3
lea r8, str.VSocket::Shutdown_:_shutdown_socket_n
lea edx, [r15 + 8]
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov edx, r15d
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, qword [rbx + 0x18]
cmp rax, 0xffffffffffffffff
je 0x140089da3
lea r8, str.VSocket::Close_:_closing_socket_n
lea edx, [r15 + 8]
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov edx, r15d
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbx + 0x18], 0xffffffffffffffff
mov rcx, qword [rbx + 0x30]
xor r14d, r14d
test rcx, rcx
je 0x140089dc0
mov rax, qword [rcx]
lea edx, [r14 + 1]
call qword [rax]
mov qword [rbx + 0x30], r14
mov qword [rbx + 0x10], r14
mov rax, qword [rbx + 0x2408]
test rax, rax
je 0x14008a141
mov dword [rax + 0x98], 1
lea r12, vtable.VSocket.0
mov qword [rsp + 0x40], r12
lea rcx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [rbp - 0x38]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov qword [rsp + 0x50], 0xffffffffffffffff
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x48], r14
mov byte [rsp + 0x70], r14b
mov qword [rbp - 0x10], r14
mov qword [rbp - 4], r14
mov byte [rbp - 8], r14b
xor edx, edx
mov r8d, 0x232c
lea rcx, [rbp + 4]
call fcn.14014a5c0
mov dword [rsp + 0x58], r14d
mov word [rsp + 0x71], r14w
mov rax, qword [0x14022a710]
mov ecx, dword [rax + 0xd14]
mov dword [rbp + 0x2330], ecx
mov dword [rsp + 0x30], 1
cmp qword [rsp + 0x50], 0xffffffffffffffff
je 0x140089ec4
lea r8, str.VSocket::Close_:_closing_socket_n
mov edx, 0xa
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov edx, r15d
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rsp + 0x50], 0xffffffffffffffff
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140089ec4
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x48], r14
xor r8d, r8d
lea edx, [r8 + 1]
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsp + 0x50], rax
cmp rax, 0xffffffffffffffff
je 0x140089f53
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 4
mov rcx, rax
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x140089f0e
lea rcx, [rsp + 0x40]
call fcn.14008a8d0
mov rax, qword [rsp + 0x50]
cmp rax, 0xffffffffffffffff
je 0x140089f53
mov word [rsp + 0x30], r15w
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x32], ax
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rsp + 0x34], eax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_bind]
mov rax, qword [rsp + 0x50]
mov edi, dword [rbx + 0x2400]
cmp rax, 0xffffffffffffffff
je 0x14008a01f
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
mov word [rsp + 0x30], r15w
lea rcx, str.localhost
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rsp + 0x34], eax
cmp eax, 0xffffffff
jne 0x140089fab
lea rcx, str.localhost
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x140089fdd
mov rax, qword [rax + 0x18]
mov rdx, qword [rax]
test rdx, rdx
je 0x140089fdd
mov eax, dword [rdx]
mov dword [rsp + 0x34], eax
movzx ecx, di
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x32], ax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x30]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x140089fdd
lea rcx, [rsp + 0x40]
call fcn.14008a8d0
cmp qword [rsp + 0x50], 0xffffffffffffffff
je 0x14008a01f
lea r8, str.VSocket::Close_:_closing_socket_n
mov edx, 0xa
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov edx, r15d
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rsp + 0x50], 0xffffffffffffffff
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x14008a03d
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x48], r14
lea rdx, [rsp + 0x30]
mov rcx, qword [rbx + 0x2408]
call fcn.1400b2390
mov qword [rbx + 0x2408], r14
cmp qword [rbx + 0x18], 0xffffffffffffffff
je 0x14008a093
lea r8, str.VSocket::Close_:_closing_socket_n
mov edx, 0xa
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov edx, r15d
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rbx + 0x18]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rbx + 0x18], 0xffffffffffffffff
mov rcx, qword [rbx + 0x30]
test rcx, rcx
je 0x14008a0ae
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [rbx + 0x30], r14
mov qword [rbx + 0x10], r14
mov qword [rsp + 0x40], r12
cmp qword [rsp + 0x50], 0xffffffffffffffff
je 0x14008a0f5
lea r8, str.VSocket::Close_:_closing_socket_n
mov edx, 0xa
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov edx, r15d
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rsp + 0x50], 0xffffffffffffffff
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x14008a113
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x48], r14
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x14008a121
call fcn.140147b10
lea rcx, [rbp - 0x38]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea rcx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
lea rcx, [rbx + 8]
call fcn.14008a510
nop
mov rcx, qword [rbp + 0x2340]
xor rcx, rsp
call fcn.140147af0
lea r11, [rsp + 0x2450]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret