Function at 0x140087620
Capabilities:
Connect socket
Resolve dns

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x2340]
mov eax, 0x2440
call fcn.140168340
sub rsp, rax
mov rax, qword [0x1401ef010]
xor rax, rsp
mov qword [rbp + 0x2330], 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 0x1400876e3
lea r8, str.VSocket::Shutdown_:_shutdown_socket_n
lea edx, [r15 + 8]
lea rcx, vtable.VNCLog.0
call fcn.140018c00
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 0x1400876e3
lea r8, str.VSocket::Close_:_closing_socket_n
lea edx, [r15 + 8]
lea rcx, vtable.VNCLog.0
call fcn.140018c00
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 0x140087700
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 0x1400879d9
mov dword [rax + 0x98], 1
lea r12, vtable.VSocket.0
mov qword [rsp + 0x30], r12
lea rcx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rcx, [rbp - 0x48]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov qword [rsp + 0x40], 0xffffffffffffffff
xorps xmm0, xmm0
movdqa xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x38], r14
mov byte [rsp + 0x60], r14b
mov qword [rbp - 0x20], r14
mov qword [rbp - 0x14], r14
mov byte [rbp - 0x18], r14b
xor edx, edx
mov r8d, 0x232c
lea rcx, [rbp - 0xc]
call fcn.140135010
mov dword [rsp + 0x48], r14d
mov word [rsp + 0x61], r14w
mov rax, qword [0x1401fdf80]
mov ecx, dword [rax + 0xd14]
mov dword [rbp + 0x2320], ecx
lea rcx, [rsp + 0x30]
call fcn.140087da0
mov rax, qword [rsp + 0x40]
cmp rax, 0xffffffffffffffff
je 0x1400877eb
mov word [rsp + 0x20], r15w
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x22], ax
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rsp + 0x24], eax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_bind]
mov rax, qword [rsp + 0x40]
mov edi, dword [rbx + 0x2400]
cmp rax, 0xffffffffffffffff
je 0x1400878b7
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov word [rsp + 0x20], r15w
lea rcx, str.localhost
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rsp + 0x24], eax
cmp eax, 0xffffffff
jne 0x140087843
lea rcx, str.localhost
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x140087875
mov rax, qword [rax + 0x18]
mov rdx, qword [rax]
test rdx, rdx
je 0x140087875
mov eax, dword [rdx]
mov dword [rsp + 0x24], eax
movzx ecx, di
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x22], ax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x20]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x140087875
lea rcx, [rsp + 0x30]
call fcn.1400880b0
cmp qword [rsp + 0x40], 0xffffffffffffffff
je 0x1400878b7
lea r8, str.VSocket::Close_:_closing_socket_n
mov edx, 0xa
lea rcx, vtable.VNCLog.0
call fcn.140018c00
mov edx, r15d
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rsp + 0x40], 0xffffffffffffffff
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1400878d5
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x38], r14
lea rdx, [rsp + 0x20]
mov rcx, qword [rbx + 0x2408]
call fcn.140125d20
mov qword [rbx + 0x2408], r14
cmp qword [rbx + 0x18], 0xffffffffffffffff
je 0x14008792b
lea r8, str.VSocket::Close_:_closing_socket_n
mov edx, 0xa
lea rcx, vtable.VNCLog.0
call fcn.140018c00
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 0x140087946
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [rbx + 0x30], r14
mov qword [rbx + 0x10], r14
mov qword [rsp + 0x30], r12
cmp qword [rsp + 0x40], 0xffffffffffffffff
je 0x14008798d
lea r8, str.VSocket::Close_:_closing_socket_n
mov edx, 0xa
lea rcx, vtable.VNCLog.0
call fcn.140018c00
mov edx, r15d
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_shutdown]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rsp + 0x40], 0xffffffffffffffff
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1400879ab
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x38], r14
mov rcx, qword [rbp - 0x20]
test rcx, rcx
je 0x1400879b9
call fcn.140132640
lea rcx, [rbp - 0x48]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea rcx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea rcx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
lea rcx, [rbx + 8]
call fcn.140087cf0
nop
mov rcx, qword [rbp + 0x2330]
xor rcx, rsp
call fcn.140132620
lea r11, [rsp + 0x2440]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret