Function at 0x5016f150
Capabilities:
Check for unmoving mouse cursor

Disassembly:
push ebx
push esi
add esp, 0xfffffff8
mov ecx, edx
mov esi, eax
mov eax, dword [ecx]
sub eax, 0x11
je 0x5016f171
sub eax, 5
je 0x5016f17d
sub eax, 0x3eb
je 0x5016f198
jmp 0x5016f451
mov dword [ecx + 0xc], 1
jmp case.default.0x5016f1b7
cmp dword [ecx + 4], 0
je case.default.0x5016f1b7
mov edx, 2
mov eax, esi
call sym.vcl120.bpl__Extctrls_TCustomTrayIcon_Refresh_qqri
jmp case.default.0x5016f1b7
mov eax, dword [ecx + 8]
cdq
cmp eax, 0x206
jg 0x5016f1d6
je case.0x5016f1b7.515
add eax, 0xfffffe00
cmp eax, 5
ja case.default.0x5016f1b7
jmp dword [eax*4 + 0x5016f1be]
cmp eax, 0x209
jg 0x5016f1fa
je case.0x5016f1b7.515
sub eax, 0x207
je 0x5016f3bf
dec eax
je 0x5016f3fd
jmp case.default.0x5016f1b7
add eax, 0xfffffbfd
sub eax, 2
jb 0x5016f437
je 0x5016f440
jmp case.default.0x5016f1b7
cmp word [esi + 0x8a], 0
je case.default.0x5016f1b7
call fcn.5016f110
mov ebx, eax
push esp
call sub.user32.dll_GetCursorPos
mov eax, dword [esp]
push eax
mov eax, dword [esp + 8]
push eax
mov ecx, ebx
mov edx, esi
mov eax, dword [esi + 0x8c]
call dword [esi + 0x88]
jmp case.default.0x5016f1b7
cmp word [esi + 0x82], 0
je 0x5016f284
call fcn.5016f110
mov ebx, eax
or bl, byte [0x5016f470]
push esp
call sub.user32.dll_GetCursorPos
push ebx
mov eax, dword [esp + 4]
push eax
mov eax, dword [esp + 0xc]
push eax
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x84]
call dword [esi + 0x80]
mov byte [esi + 0x3d], 1
jmp case.default.0x5016f1b7
call fcn.5016f110
mov ebx, eax
or bl, byte [0x5016f470]
push esp
call sub.user32.dll_GetCursorPos
cmp byte [esi + 0x3d], 0
je 0x5016f2b9
cmp word [esi + 0x72], 0
je 0x5016f2b9
mov edx, esi
mov eax, dword [esi + 0x74]
call dword [esi + 0x70]
mov byte [esi + 0x3d], 0
cmp word [esi + 0x92], 0
je case.default.0x5016f1b7
push ebx
mov eax, dword [esp + 4]
push eax
mov eax, dword [esp + 0xc]
push eax
xor ecx, ecx
mov edx, esi
mov eax, dword [esi + 0x94]
call dword [esi + 0x90]
jmp case.default.0x5016f1b7
cmp word [esi + 0x82], 0
je case.default.0x5016f1b7
call fcn.5016f110
mov ebx, eax
or bl, byte [0x5016f474]
push esp
call sub.user32.dll_GetCursorPos
push ebx
mov eax, dword [esp + 4]
push eax
mov eax, dword [esp + 0xc]
push eax
mov cl, 1
mov edx, esi
mov eax, dword [esi + 0x84]
call dword [esi + 0x80]
jmp case.default.0x5016f1b7
call fcn.5016f110
mov ebx, eax
or bl, byte [0x5016f474]
push esp
call sub.user32.dll_GetCursorPos
cmp word [esi + 0x92], 0
je 0x5016f360
push ebx
mov eax, dword [esp + 4]
push eax
mov eax, dword [esp + 0xc]
push eax
mov cl, 1
mov edx, esi
mov eax, dword [esi + 0x94]
call dword [esi + 0x90]
cmp dword [esi + 0x50], 0
je case.default.0x5016f1b7
mov eax, dword [0x50243f9c]
mov eax, dword [eax]
mov eax, dword [eax + 0x170]
push eax
call sub.user32.dll_SetForegroundWindow
mov eax, dword [0x50243f9c]
mov eax, dword [eax]
call sym.vcl120.bpl__Forms_TApplication_ProcessMessages_qqrv
mov eax, dword [esi + 0x50]
mov byte [eax + 0x61], 0
mov edx, dword [esi + 4]
mov dword [eax + 0x64], edx
mov ecx, dword [esp + 4]
mov edx, dword [esp]
mov ebx, dword [eax]
call dword [ebx + 0x40]
jmp case.default.0x5016f1b7
cmp word [esi + 0x7a], 0
je case.default.0x5016f1b7
mov edx, esi
mov eax, dword [esi + 0x7c]
call dword [esi + 0x78]
jmp case.default.0x5016f1b7
cmp word [esi + 0x82], 0
je case.default.0x5016f1b7
call fcn.5016f110
mov ebx, eax
or bl, byte [0x5016f478]
push esp
call sub.user32.dll_GetCursorPos
push ebx
mov eax, dword [esp + 4]
push eax
mov eax, dword [esp + 0xc]
push eax
mov cl, 2
mov edx, esi
mov eax, dword [esi + 0x84]
call dword [esi + 0x80]
jmp case.default.0x5016f1b7
cmp word [esi + 0x92], 0
je case.default.0x5016f1b7
call fcn.5016f110
mov ebx, eax
or bl, byte [0x5016f478]
push esp
call sub.user32.dll_GetCursorPos
push ebx
mov eax, dword [esp + 4]
push eax
mov eax, dword [esp + 0xc]
push eax
mov cl, 2
mov edx, esi
mov eax, dword [esi + 0x94]
call dword [esi + 0x90]
jmp case.default.0x5016f1b7
mov eax, dword [esi + 0x44]
and dword [eax + 0xc], 0xffffffef
jmp case.default.0x5016f1b7
cmp word [esi + 0x6a], 0
je case.default.0x5016f1b7
mov edx, esi
mov eax, dword [esi + 0x6c]
call dword [esi + 0x68]
jmp case.default.0x5016f1b7
mov eax, dword [ecx]
cmp eax, dword [sym.vcl120.bpl__Extctrls_TCustomTrayIcon_RM_TaskbarCreated]
jne case.default.0x5016f1b7
cmp byte [esi + 0x60], 0
je case.default.0x5016f1b7
xor edx, edx
mov eax, esi
call sym.vcl120.bpl__Extctrls_TCustomTrayIcon_Refresh_qqri
pop ecx
pop edx
pop esi
pop ebx
ret