Function at 0x482740
Capabilities:
Lock the desktop
Shutdown system

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56874b
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
mov eax, dword [0x5d60c4]
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 ecx, dword [edi + 0xb4]
mov esi, dword [ecx]
cmp esi, ecx
je 0x4827de
nop word [eax + eax]
cmp word [esi + 8], bx
je 0x482800
mov eax, dword [esi]
mov esi, eax
cmp eax, ecx
jne 0x4827d0
mov ecx, dword [edi + 0xbc]
mov esi, dword [ecx]
cmp esi, ecx
je 0x482875
nop
cmp word [esi + 8], bx
je 0x482828
mov eax, dword [esi]
mov esi, eax
cmp eax, ecx
jne 0x4827f0
jmp 0x482875
push str.vncServer::RemoveClient_:_removing_unauthorised_client_n
push 9
push 0x5d6df8
call fcn.0041d510
mov ecx, dword [esi + 4]
mov eax, dword [esi]
mov dword [ecx], eax
mov ecx, dword [esi]
mov eax, dword [esi + 4]
mov dword [ecx + 4], eax
dec dword [edi + 0xb8]
jmp 0x48284e
push str.vncServer::RemoveClient_:_removing_authorised_client_n
push 9
push 0x5d6df8
call fcn.0041d510
mov ecx, dword [esi + 4]
mov eax, dword [esi]
mov dword [ecx], eax
mov ecx, dword [esi]
mov eax, dword [esi + 4]
mov dword [ecx + 4], eax
dec dword [edi + 0xc0]
push 0xc
push esi
call fcn.0052b7cc
mov eax, 0x1ff
add esp, 0x14
cmp word [ebp - 0x118], ax
ja 0x482875
movsx eax, bx
mov dword [edi + eax*4 + 0xc4], 0
mov esi, dword [edi + 0x2e0]
lea ebx, [esi + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x4828be
mov ecx, dword [eax + 0x48]
mov dword [esi + 0x1c], ecx
test ecx, ecx
jne 0x48289b
mov dword [esi + 0x20], ecx
jmp 0x4828a2
mov dword [ecx + 0x4c], 0
push 0
push 1
push dword [eax + 0x44]
mov dword [eax + 0x50], 0
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
je 0x482a5f
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call ebx
lea eax, [edi + 0x1c]
mov byte [ebp - 4], 0
push eax
call ebx
cmp dword [edi + 0xc0], 0
jne 0x482a11
cmp dword [edi + 0xa8], 0
je 0x482a11
push str.vncServer::RemoveClient_:_deleting_desktop_server_n
push 0
push 0x5d6df8
call fcn.0041d510
mov eax, dword [0x5e44e8]
add esp, 0xc
cmp dword [eax + 0xe28], 0
jne 0x4829d4
cmp byte [edi + 0x88], 0
jne 0x4829d4
mov ecx, dword [eax + 0x778]
cmp ecx, 1
je 0x48299c
cmp dword [eax + 0x78c], 0
jne 0x48299c
cmp ecx, 1
jle 0x4829a7
lea ecx, [ebp - 0x114]
call fcn.00426610
mov ecx, 0x5b9638
lea eax, [ebp - 0x114]
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x482970
test dl, dl
je 0x48296c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x482970
add eax, 2
add ecx, 2
test dl, dl
jne 0x482950
xor eax, eax
jmp 0x482975
sbb eax, eax
or eax, 1
test eax, eax
je 0x4829a2
push 0
push 0
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x4829a2
push str.vncServer::RemoveClient_:_client_disconnect___failed_to_logoff_user__n
push eax
push 0x5d6df8
call fcn.0041d510
add esp, 0xc
jmp 0x4829a2
call dword [sym.imp.USER32.dll_LockWorkStation]
mov eax, dword [0x5e44e8]
cmp dword [eax + 0xe20], 0
je 0x4829d4
cmp dword [eax + 0xa54], 0
je 0x4829d4
push str.vncServer::RemoveClient_:_last_client_disconnect___restart_server_for_rdpmode_n
push 0
push 0x5d6df8
mov byte [0x5d960f], 1
call fcn.0041d510
add esp, 0xc
mov esi, dword [edi + 0xa8]
test esi, esi
je 0x4829f3
mov ecx, esi
call fcn.0044e790
push 0xe9b4
push esi
call fcn.0052b7cc
add esp, 8
push str.vncServer::RemoveClient_:_desktop_deleted_n
push 0
push 0x5d6df8
mov dword [edi + 0xa8], 0
call fcn.0041d510
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 0x5d6df8
call fcn.0041d510
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.0052b789
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
lea ecx, [ebp - 0x118]
call fcn.004aa800
push 0x5d2f20
mov eax, ecx
push eax
call fcn.0052e096
int3