Function at 0x47a9a0
Capabilities:
Lock the desktop
Shutdown system

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5415fb
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
mov eax, dword [0x5a6008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
movzx ecx, word [ebp + 8]
lea eax, [edi + 0x2c8]
movzx ebx, word [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push eax
mov dword [ebp - 0x118], ecx
mov dword [ebp - 0x120], eax
mov dword [ebp - 0x11c], 0x28
call esi
lea eax, [edi + 0x1c]
mov dword [ebp - 4], 0
push eax
mov dword [ebp - 0x128], eax
mov dword [ebp - 0x124], 0x29
call esi
mov byte [ebp - 4], 1
mov edx, dword [edi + 0xb4]
mov eax, dword [edx]
cmp eax, edx
je 0x47aa3e
nop word [eax + eax]
cmp word [eax + 8], bx
je 0x47aa60
mov ecx, dword [eax]
mov eax, ecx
cmp ecx, edx
jne 0x47aa30
mov edx, dword [edi + 0xbc]
mov eax, dword [edx]
cmp eax, edx
je 0x47aad5
nop
cmp word [eax + 8], bx
je 0x47aa88
mov ecx, dword [eax]
mov eax, ecx
cmp ecx, edx
jne 0x47aa50
jmp 0x47aad5
push str.vncServer::RemoveClient_:_removing_unauthorised_client_n
push 9
push 0x5a6c48
call fcn.0041d720
mov edx, dword [eax + 4]
mov ecx, dword [eax]
mov dword [edx], ecx
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
dec dword [edi + 0xb8]
jmp 0x47aaae
push str.vncServer::RemoveClient_:_removing_authorised_client_n
push 9
push 0x5a6c48
call fcn.0041d720
mov edx, dword [eax + 4]
mov ecx, dword [eax]
mov dword [edx], ecx
mov edx, dword [eax]
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
dec dword [edi + 0xc0]
push 0xc
push eax
call fcn.0051137c
mov eax, 0x1ff
add esp, 0x14
cmp word [ebp - 0x118], ax
ja 0x47aad5
movsx eax, bx
mov dword [edi + eax*4 + 0xc4], 0
mov ecx, dword [edi + 0x2e0]
call fcn.00506140
lea eax, [edi + 0x1c]
mov byte [ebp - 4], 0
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push eax
call ebx
cmp dword [edi + 0xc0], 0
jne 0x47ac31
cmp dword [edi + 0xa8], 0
je 0x47ac31
push str.vncServer::RemoveClient_:_deleting_desktop_server_n
push 0
push 0x5a6c48
call fcn.0041d720
mov eax, dword [0x5b6e6c]
add esp, 0xc
cmp dword [eax + 0xe28], 0
jne 0x47abf4
cmp byte [edi + 0x88], 0
jne 0x47abf4
mov ecx, dword [eax + 0x778]
cmp ecx, 1
je 0x47abbc
cmp dword [eax + 0x78c], 0
jne 0x47abbc
cmp ecx, 1
jle 0x47abc7
lea ecx, [ebp - 0x114]
call fcn.00426170
mov ecx, 0x560f28
lea eax, [ebp - 0x114]
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x47ab90
test dl, dl
je 0x47ab8c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x47ab90
add eax, 2
add ecx, 2
test dl, dl
jne 0x47ab70
xor eax, eax
jmp 0x47ab95
sbb eax, eax
or eax, 1
test eax, eax
je 0x47abc2
push 0
push 0
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x47abc2
push str.vncServer::RemoveClient_:_client_disconnect___failed_to_logoff_user__n
push eax
push 0x5a6c48
call fcn.0041d720
add esp, 0xc
jmp 0x47abc2
call dword [sym.imp.USER32.dll_LockWorkStation]
mov eax, dword [0x5b6e6c]
cmp dword [eax + 0xe20], 0
je 0x47abf4
cmp dword [eax + 0xa54], 0
je 0x47abf4
push str.vncServer::RemoveClient_:_last_client_disconnect___restart_server_for_rdpmode_n
push 0
push 0x5a6c48
mov byte [0x5ab8a3], 1
call fcn.0041d720
add esp, 0xc
mov esi, dword [edi + 0xa8]
test esi, esi
je 0x47ac13
mov ecx, esi
call fcn.00449480
push 0xe9b8
push esi
call fcn.0051137c
add esp, 8
push str.vncServer::RemoveClient_:_desktop_deleted_n
push 0
push 0x5a6c48
mov dword [edi + 0xa8], 0
call fcn.0041d720
add esp, 0xc
mov eax, dword [edi]
mov ecx, edi
push 0
push 0
push 0x8004
call dword [eax + 0x84]
push str.vncServer::RemoveClient_:_RemoveClient___done_n
push 9
push 0x5a6c48
call fcn.0041d720
add esp, 0xc
lea eax, [edi + 0x2c8]
push eax
call ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00511339
mov esp, ebp
pop ebp
ret 4