Function at 0x4809c0
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f68f6
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
mov eax, dword [0x55800c]
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 + 0x33c]
movzx ebx, word [ebp + 8]
mov dword [ebp - 0x120], eax
mov esi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push eax
mov dword [ebp - 0x118], ecx
mov dword [ebp - 0x11c], 0x28
call esi
lea eax, [edi + 8]
mov dword [ebp - 4], 0
mov dword [ebp - 0x128], eax
push eax
mov dword [ebp - 0x124], 0x29
call esi
mov byte [ebp - 4], 1
mov eax, dword [edi + 0x128]
mov esi, dword [eax]
cmp esi, eax
je 0x480a5c
nop word [eax + eax]
cmp word [esi + 8], bx
je 0x480a7e
mov esi, dword [esi]
cmp esi, eax
jne 0x480a50
mov eax, dword [edi + 0x130]
mov esi, dword [eax]
cmp esi, eax
je 0x480af3
nop dword [eax]
cmp word [esi + 8], bx
je 0x480aa6
mov esi, dword [esi]
cmp esi, eax
jne 0x480a70
jmp 0x480af3
push str.d:_saasultravncwinvncwinvnc_vncserver.cpp_:_removing_unauthorised_client_n
push 9
push 0x558c50
call fcn.0041c840
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 + 0x12c]
jmp 0x480acc
push str.d:_saasultravncwinvncwinvnc_vncserver.cpp_:_removing_authorised_client_n
push 9
push 0x558c50
call fcn.0041c840
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 + 0x134]
push 0xc
push esi
call fcn.004cbf6d
mov eax, 0x1ff
add esp, 0x14
cmp word [ebp - 0x118], ax
ja 0x480af3
movsx eax, bx
mov dword [edi + eax*4 + 0x138], 0
mov esi, dword [edi + 0x354]
lea ebx, [esi + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x480b3c
mov ecx, dword [eax + 0x54]
mov dword [esi + 0x1c], ecx
test ecx, ecx
jne 0x480b19
mov dword [esi + 0x20], ecx
jmp 0x480b20
mov dword [ecx + 0x58], 0
push 0
push 1
push dword [eax + 0x50]
mov dword [eax + 0x5c], 0
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
test eax, eax
je 0x480df7
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call ebx
lea eax, [edi + 8]
mov byte [ebp - 4], 0
push eax
call ebx
cmp dword [edi + 0x134], 0
jne 0x480d54
cmp dword [edi + 0x80], 0
je 0x480d54
push str.d:_saasultravncwinvncwinvnc_vncserver.cpp_:_deleting_desktop_server_n
push 0
push 0x558c50
call fcn.0041c840
mov eax, dword [edi]
add esp, 0xc
mov edx, dword [eax + 0x2dc]
cmp eax, vtable.vncServer.0
jne 0x480e1f
mov ecx, dword [edi + 0x828]
test ecx, ecx
jne 0x480d17
cmp byte [edi + 0x68], cl
jne 0x480d17
mov edx, dword [eax + 0x1f0]
cmp eax, vtable.vncServer.0
jne 0x480e2c
mov ecx, dword [edi + 0xbc]
cmp ecx, 1
je 0x480c67
cmp byte [edi + 0x844], 0
jne 0x480c67
mov edx, dword [eax + 0x1f0]
cmp eax, vtable.vncServer.0
jne 0x480e39
mov eax, dword [edi + 0xbc]
cmp eax, 1
jle 0x480d17
lea ecx, [ebp - 0x114]
call fcn.00484360
mov ecx, 0x518188
lea eax, [ebp - 0x114]
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x480c30
test dl, dl
je 0x480c2c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x480c30
add eax, 2
add ecx, 2
test dl, dl
jne 0x480c10
xor eax, eax
jmp 0x480c35
sbb eax, eax
or eax, 1
test eax, eax
je 0x480d17
push 0
push 0
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x480d17
push str.d:_saasultravncwinvncwinvnc_vncserver.cpp_:_client_disconnect___failed_to_logoff_user__n
push eax
push 0x558c50
call fcn.0041c840
add esp, 0xc
jmp 0x480d17
cmp dword [0x5674b4], 2
je 0x480c89
push str.d:_saasultravncwinvncwinvnc_vncservice.cpp_:_unable_to_lock_workstation___not_NT_n
push 0
push 0x558c50
call fcn.0041c840
add esp, 0xc
jmp 0x480d17
push str.d:_saasultravncwinvncwinvnc_vncservice.cpp_:_locking_workstation_n
push 0xa
push 0x558c50
call fcn.0041c840
add esp, 0xc
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
jne 0x480cca
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.d:_saasultravncwinvncwinvnc_vncservice.cpp_:_unable_to_load_User32_DLL___u__n
push esi
push 0x558c50
call fcn.0041c840
add esp, 0x10
jmp 0x480d17
push str.LockWorkStation
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x480cf7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.d:_saasultravncwinvncwinvnc_vncservice.cpp_:_unable_to_locate_LockWorkStation___requires_Windows_2000_or_above___u__n
push 0
push 0x558c50
call fcn.0041c840
add esp, 0x10
jmp 0x480d10
call eax
test eax, eax
jne 0x480d10
push str.d:_saasultravncwinvncwinvnc_vncservice.cpp_:_call_to_LockWorkstation_failed_n
push eax
push 0x558c50
call fcn.0041c840
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, dword [edi + 0x80]
test esi, esi
je 0x480d36
mov ecx, esi
call fcn.00446eb0
push 0xe2b4
push esi
call fcn.004cbf6d
add esp, 8
push str.d:_saasultravncwinvncwinvnc_vncserver.cpp_:_desktop_deleted_n
push 0
push 0x558c50
mov dword [edi + 0x80], 0
call fcn.0041c840
add esp, 0xc
mov eax, dword [edi]
mov edx, dword [eax + 0x98]
cmp eax, vtable.vncServer.0
jne 0x480e42
lea eax, [edi + 0x38]
push eax
mov dword [ebp - 0x118], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0x358]
mov esi, dword [eax]
cmp esi, eax
je 0x480dae
mov ebx, dword [sym.imp.USER32.dll_PostMessageA]
nop dword [eax]
push 0
push 0
push 0x8004
push dword [esi + 8]
call ebx
mov esi, dword [esi]
cmp esi, dword [edi + 0x358]
jne 0x480d90
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push dword [ebp - 0x118]
call ebx
push str.d:_saasultravncwinvncwinvnc_vncserver.cpp_:_RemoveClient___done_n
push 9
push 0x558c50
call fcn.0041c840
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
push dword [ebp - 0x120]
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.004cbf27
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.004bab00
push 0x55499c
mov eax, ecx
push eax
call fcn.004ce518
mov ecx, edi
call edx
mov ecx, eax
mov eax, dword [edi]
jmp 0x480b96
mov ecx, edi
call edx
mov ecx, eax
mov eax, dword [edi]
jmp 0x480bbe
mov ecx, edi
call edx
jmp 0x480beb
push 0
push 0
push 0x8004
mov ecx, edi
call edx
jmp 0x480db6