Function at 0x480610
Capabilities:
Lock the desktop
Shutdown system

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54a4ab
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
mov eax, dword [0x5b0008]
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 0x4806ae
nop word [eax + eax]
cmp word [esi + 8], bx
je 0x4806d0
mov eax, dword [esi]
mov esi, eax
cmp eax, ecx
jne 0x4806a0
mov ecx, dword [edi + 0xbc]
mov esi, dword [ecx]
cmp esi, ecx
je 0x480745
nop
cmp word [esi + 8], bx
je 0x4806f8
mov eax, dword [esi]
mov esi, eax
cmp eax, ecx
jne 0x4806c0
jmp 0x480745
push str.vncServer::RemoveClient_:_removing_unauthorised_client_n
push 9
push 0x5b0d48
call fcn.0041ccb0
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 0x48071e
push str.vncServer::RemoveClient_:_removing_authorised_client_n
push 9
push 0x5b0d48
call fcn.0041ccb0
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.005187dc
mov eax, 0x1ff
add esp, 0x14
cmp word [ebp - 0x118], ax
ja 0x480745
movsx eax, bx
mov dword [edi + eax*4 + 0xc4], 0
mov ecx, dword [edi + 0x2e0]
call fcn.0050d590
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 0x4808a1
cmp dword [edi + 0xa8], 0
je 0x4808a1
push str.vncServer::RemoveClient_:_deleting_desktop_server_n
push 0
push 0x5b0d48
call fcn.0041ccb0
mov eax, dword [0x5bdff0]
add esp, 0xc
cmp dword [eax + 0xe28], 0
jne 0x480864
cmp byte [edi + 0x88], 0
jne 0x480864
mov ecx, dword [eax + 0x778]
cmp ecx, 1
je 0x48082c
cmp dword [eax + 0x78c], 0
jne 0x48082c
cmp ecx, 1
jle 0x480837
lea ecx, [ebp - 0x114]
call fcn.00425ab0
mov ecx, 0x569fa8
lea eax, [ebp - 0x114]
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x480800
test dl, dl
je 0x4807fc
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x480800
add eax, 2
add ecx, 2
test dl, dl
jne 0x4807e0
xor eax, eax
jmp 0x480805
sbb eax, eax
or eax, 1
test eax, eax
je 0x480832
push 0
push 0
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x480832
push str.vncServer::RemoveClient_:_client_disconnect___failed_to_logoff_user__n
push eax
push 0x5b0d48
call fcn.0041ccb0
add esp, 0xc
jmp 0x480832
call dword [sym.imp.USER32.dll_LockWorkStation]
mov eax, dword [0x5bdff0]
cmp dword [eax + 0xe20], 0
je 0x480864
cmp dword [eax + 0xa54], 0
je 0x480864
push str.vncServer::RemoveClient_:_last_client_disconnect___restart_server_for_rdpmode_n
push 0
push 0x5b0d48
mov byte [0x5b31af], 1
call fcn.0041ccb0
add esp, 0xc
mov esi, dword [edi + 0xa8]
test esi, esi
je 0x480883
mov ecx, esi
call fcn.0044d850
push 0xe9b8
push esi
call fcn.005187dc
add esp, 8
push str.vncServer::RemoveClient_:_desktop_deleted_n
push 0
push 0x5b0d48
mov dword [edi + 0xa8], 0
call fcn.0041ccb0
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 0x5b0d48
call fcn.0041ccb0
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.00518799
mov esp, ebp
pop ebp
ret 4