Function at 0x140086710
Capabilities:
Lock the desktop
Shutdown system

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r14
sub rsp, 0x160
mov rax, qword [0x14021b0e0]
xor rax, rsp
mov qword [rsp + 0x150], rax
movsx rsi, dx
mov rdi, rcx
lea r14, [rcx + 0x548]
mov qword [rsp + 0x20], r14
mov dword [rsp + 0x28], 0x28
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea rbp, [rdi + 0x28]
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x38], 0x29
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, qword [rdi + 0x120]
mov rbx, qword [rcx]
cmp rbx, rcx
je 0x140086797
cmp word [rbx + 0x10], si
je 0x1400867c6
mov rax, qword [rbx]
mov rbx, rax
cmp rax, rcx
jne 0x140086786
mov rcx, qword [rdi + 0x130]
mov rbx, qword [rcx]
cmp rbx, rcx
je 0x140086853
nop word [rax + rax]
cmp word [rbx + 0x10], si
je 0x1400867fc
mov rax, qword [rbx]
mov rbx, rax
cmp rax, rcx
jne 0x1400867b0
jmp 0x140086853
lea r8, str.vncServer::RemoveClient_:_removing_unauthorised_client_n
mov edx, 9
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov rcx, qword [rbx + 8]
mov rax, qword [rbx]
mov qword [rcx], rax
mov rcx, qword [rbx]
mov rax, qword [rbx + 8]
mov qword [rcx + 8], rax
dec qword [rdi + 0x128]
jmp 0x140086830
lea r8, str.vncServer::RemoveClient_:_removing_authorised_client_n
mov edx, 9
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov rcx, qword [rbx + 8]
mov rax, qword [rbx]
mov qword [rcx], rax
mov rcx, qword [rbx]
mov rax, qword [rbx + 8]
mov qword [rcx + 8], rax
dec qword [rdi + 0x138]
mov edx, 0x18
mov rcx, rbx
call fcn.140147b54
mov eax, 0x1ff
cmp si, ax
ja 0x140086853
mov qword [rdi + rsi*8 + 0x140], 0
mov rcx, qword [rdi + 0x570]
call fcn.1400b1d00
nop
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp qword [rdi + 0x138], 0
jne 0x140086986
cmp qword [rdi + 0x108], 0
je 0x140086986
lea r8, str.vncServer::RemoveClient_:_deleting_desktop_server_n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov rax, qword [0x14022a710]
cmp dword [rax + 0xe28], 0
jne 0x140086945
cmp byte [rdi + 0xd0], 0
jne 0x140086945
mov ecx, dword [rax + 0x778]
cmp ecx, 1
je 0x14008690a
cmp dword [rax + 0x78c], 0
jne 0x14008690a
cmp ecx, 1
jle 0x140086917
lea rcx, [rsp + 0x40]
call fcn.140021a10
cmp byte [rsp + 0x40], 0
je 0x140086910
xor edx, edx
xor ecx, ecx
call qword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x140086910
lea r8, str.vncServer::RemoveClient_:_client_disconnect___failed_to_logoff_user__n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140018d00
jmp 0x140086910
call qword [sym.imp.USER32.dll_LockWorkStation]
mov rax, qword [0x14022a710]
cmp dword [rax + 0xe20], 0
je 0x140086945
cmp dword [rax + 0xa54], 0
je 0x140086945
mov byte [0x14021fa63], 1
lea r8, str.vncServer::RemoveClient_:_last_client_disconnect___restart_server_for_rdpmode_n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov rbx, qword [rdi + 0x108]
test rbx, rbx
je 0x140086966
mov rcx, rbx
call fcn.14004d4a0
mov edx, 0xeb28
mov rcx, rbx
call fcn.140147b54
mov qword [rdi + 0x108], 0
lea r8, str.vncServer::RemoveClient_:_desktop_deleted_n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov rax, qword [rdi]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x8004
mov rcx, rdi
call qword [rax + 0x108]
lea r8, str.vncServer::RemoveClient_:_RemoveClient___done_n
mov edx, 9
lea rcx, vtable.VNCLog.0
call fcn.140018d00
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.140147af0
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret