Function at 0x1400836c0
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 [0x1401ef010]
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 0x140083747
cmp word [rbx + 0x10], si
je 0x140083776
mov rax, qword [rbx]
mov rbx, rax
cmp rax, rcx
jne 0x140083736
mov rcx, qword [rdi + 0x130]
mov rbx, qword [rcx]
cmp rbx, rcx
je 0x140083803
nop word [rax + rax]
cmp word [rbx + 0x10], si
je 0x1400837ac
mov rax, qword [rbx]
mov rbx, rax
cmp rax, rcx
jne 0x140083760
jmp 0x140083803
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 0x1400837e0
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.140131344
mov eax, 0x1ff
cmp si, ax
ja 0x140083803
mov qword [rdi + rsi*8 + 0x140], 0
mov rcx, qword [rdi + 0x570]
call fcn.140124280
nop
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp qword [rdi + 0x138], 0
jne 0x140083936
cmp qword [rdi + 0x108], 0
je 0x140083936
lea r8, str.vncServer::RemoveClient_:_deleting_desktop_server_n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140017a50
mov rax, qword [0x1401fdf60]
cmp dword [rax + 0xe28], 0
jne 0x1400838f5
cmp byte [rdi + 0xd0], 0
jne 0x1400838f5
mov ecx, dword [rax + 0x778]
cmp ecx, 1
je 0x1400838ba
cmp dword [rax + 0x78c], 0
jne 0x1400838ba
cmp ecx, 1
jle 0x1400838c7
lea rcx, [rsp + 0x40]
call fcn.140021270
cmp byte [rsp + 0x40], 0
je 0x1400838c0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x1400838c0
lea r8, str.vncServer::RemoveClient_:_client_disconnect___failed_to_logoff_user__n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140017a50
jmp 0x1400838c0
call qword [sym.imp.USER32.dll_LockWorkStation]
mov rax, qword [0x1401fdf60]
cmp dword [rax + 0xe20], 0
je 0x1400838f5
cmp dword [rax + 0xa54], 0
je 0x1400838f5
mov byte [0x1401f32c3], 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 0x140083916
mov rcx, rbx
call fcn.14004bc00
mov edx, 0xeb30
mov rcx, rbx
call fcn.140131344
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.1401312e0
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret