Function at 0x140083560
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 [0x1401f0010]
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 0x1400835e7
cmp word [rbx + 0x10], si
je 0x140083616
mov rax, qword [rbx]
mov rbx, rax
cmp rax, rcx
jne 0x1400835d6
mov rcx, qword [rdi + 0x130]
mov rbx, qword [rcx]
cmp rbx, rcx
je 0x1400836a3
nop word [rax + rax]
cmp word [rbx + 0x10], si
je 0x14008364c
mov rax, qword [rbx]
mov rbx, rax
cmp rax, rcx
jne 0x140083600
jmp 0x1400836a3
lea r8, str.vncServer::RemoveClient_:_removing_unauthorised_client_n
mov edx, 9
lea rcx, vtable.VNCLog.0
call fcn.140017a50
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 0x140083680
lea r8, str.vncServer::RemoveClient_:_removing_authorised_client_n
mov edx, 9
lea rcx, vtable.VNCLog.0
call fcn.140017a50
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.140131f54
mov eax, 0x1ff
cmp si, ax
ja 0x1400836a3
mov qword [rdi + rsi*8 + 0x140], 0
mov rcx, qword [rdi + 0x570]
call fcn.140124e90
nop
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp qword [rdi + 0x138], 0
jne 0x1400837d6
cmp qword [rdi + 0x108], 0
je 0x1400837d6
lea r8, str.vncServer::RemoveClient_:_deleting_desktop_server_n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140017a50
mov rax, qword [0x1401fef68]
cmp dword [rax + 0xe28], 0
jne 0x140083795
cmp byte [rdi + 0xd0], 0
jne 0x140083795
mov ecx, dword [rax + 0x778]
cmp ecx, 1
je 0x14008375a
cmp dword [rax + 0x78c], 0
jne 0x14008375a
cmp ecx, 1
jle 0x140083767
lea rcx, [rsp + 0x40]
call fcn.140021210
cmp byte [rsp + 0x40], 0
je 0x140083760
xor edx, edx
xor ecx, ecx
call qword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x140083760
lea r8, str.vncServer::RemoveClient_:_client_disconnect___failed_to_logoff_user__n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140017a50
jmp 0x140083760
call qword [sym.imp.USER32.dll_LockWorkStation]
mov rax, qword [0x1401fef68]
cmp dword [rax + 0xe20], 0
je 0x140083795
cmp dword [rax + 0xa54], 0
je 0x140083795
mov byte [0x1401f42c3], 1
lea r8, str.vncServer::RemoveClient_:_last_client_disconnect___restart_server_for_rdpmode_n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140017a50
mov rbx, qword [rdi + 0x108]
test rbx, rbx
je 0x1400837b6
mov rcx, rbx
call fcn.14004baa0
mov edx, 0xeb30
mov rcx, rbx
call fcn.140131f54
mov qword [rdi + 0x108], 0
lea r8, str.vncServer::RemoveClient_:_desktop_deleted_n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140017a50
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.140017a50
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x150]
xor rcx, rsp
call fcn.140131ef0
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret