Function at 0x50bbe0
Capabilities:
Check for unmoving mouse cursor
Log keystrokes via polling

Disassembly:
sub esp, 0x158
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x16c]
xor ebp, ebp
cmp edi, ebp
je case.default.0x50bcf0
cmp byte [edi], 0
je case.default.0x50bcf0
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x50bc10
sub eax, edx
cmp eax, 0x100
ja case.default.0x50bcf0
mov esi, dword [esp + 0x170]
cmp esi, ebp
je case.default.0x50bcf0
push esi
call fcn.0058ed20
add esp, 4
test eax, eax
je case.default.0x50bcf0
mov eax, dword [esi + 0x1e90]
push eax
call fcn.00508aa0
add esp, 4
test eax, eax
je case.default.0x50bcf0
cmp dword [esi + 0x1314], 1
jne case.default.0x50bcf0
lea eax, [esi + 0x12bc]
push eax
xor ebx, ebx
push ebx
push edi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x30], ebx
mov dword [esp + 0x2c], eax
call fcn.004a2bb0
mov ecx, eax
add esp, 0xc
test ecx, ecx
mov dword [esp + 0x1c], ecx
je 0x50bce0
mov eax, dword [esi + 0x12b0]
test eax, eax
mov ebp, dword [ecx + 0x20]
mov ebx, dword [ecx + 0x1c]
mov dword [esp + 0x18], ebp
je 0x50bcca
lea esp, [esp]
cmp eax, ecx
je 0x50bcc6
mov edi, dword [esp + 0x10]
mov eax, dword [eax + 0x40]
inc edi
test eax, eax
mov dword [esp + 0x10], edi
jne 0x50bcb0
jmp 0x50bcca
test eax, eax
jne 0x50bce0
xor ebp, ebp
xor ebx, ebx
xor ecx, ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ecx
mov eax, dword [esp + 0x174]
cmp eax, 3
ja case.default.0x50bcf0
jmp dword [eax*4 + 0x50c500]
test ebx, ebx
je 0x50bf0b
test ecx, ecx
je 0x50bf0b
mov ecx, dword [esi + 0x1e90]
mov eax, dword [ecx + 0x717c]
test eax, eax
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
je 0x50bd99
mov edx, dword [esp + 0x10]
mov eax, dword [esi + 0x1488]
push 0
push edx
push 0x187
push eax
call edi
cmp eax, 0xffffffff
je 0x50bd4c
test eax, eax
jle 0x50bd4c
mov eax, dword [esi + 0x1e90]
mov ecx, dword [eax + 0x717c]
or ecx, 4
jmp 0x50bd5b
mov eax, dword [esi + 0x1e90]
mov ecx, dword [eax + 0x717c]
or ecx, 8
mov dword [eax + 0x717c], ecx
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0x1488]
push 0
push ecx
push 0x199
push edx
call edi
cmp eax, 0xffffffff
mov dword [0x61a3cc], eax
je 0x50bd89
test eax, eax
jl 0x50bd89
cmp eax, 0xf
jle 0x50bd93
mov dword [0x61a3cc], 0x63
mov dword [0x61a3c8], ebp
mov eax, dword [0x6a0f48]
test eax, eax
mov dword [esp + 0x28], 0xffffffff
je 0x50be11
mov eax, dword [esi]
cmp eax, dword [0x6a0f4c]
jne 0x50be11
call dword [sym.imp.USER32.dll_GetFocus]
cmp dword [esi + 0x1488], eax
jne 0x50be11
mov ebp, dword [sym.imp.USER32.dll_GetKeyState]
push 1
call ebp
test ah, ah
js 0x50bdd8
push 2
call ebp
test ah, ah
jns 0x50be11
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.USER32.dll_GetCursorPos]
mov eax, dword [esi + 0x1488]
lea edx, [esp + 0x28]
push edx
push eax
call dword [sym.imp.USER32.dll_ScreenToClient]
movzx ecx, word [esp + 0x2c]
mov edx, dword [esi + 0x1488]
shl ecx, 0x10
or ecx, 1
push ecx
push 0
push 0x202
push edx
call edi
mov eax, dword [esi + 0x1488]
push 0
push 0
push 0x18e
push eax
call edi
mov ecx, dword [esi + 0x1488]
push 0
push 0
push 0x19f
push ecx
mov ebp, eax
call edi
mov edx, dword [esi + 0x1488]
push 0
push 0
push 0xb
push edx
mov dword [esp + 0x24], eax
call edi
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x1488]
push 0
push eax
push 0x182
push ecx
call edi
mov eax, dword [esp + 0x10]
cmp eax, ebp
jg 0x50be6c
dec ebp
jns 0x50be6c
xor ebp, ebp
mov ecx, dword [esp + 0x14]
cmp eax, ecx
jg 0x50be85
mov eax, ecx
dec eax
mov dword [esp + 0x14], eax
jns 0x50be85
mov dword [esp + 0x14], 0
lea edx, [esp + 0x14]
push edx
push ebp
push esi
call fcn.00423690
mov eax, dword [esi + 0x1488]
add esp, 0xc
push 0
push ebp
push 0x197
push eax
call edi
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x50bebf
mov ecx, dword [esi + 0x1488]
push 0
push eax
push 0x19e
push ecx
call edi
mov edx, dword [esi + 0x1488]
push 0
push 1
push 0xb
push edx
call edi
mov eax, dword [esi + 0x1488]
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0x12b0]
push ecx
push edx
call fcn.004e8a00
mov ecx, dword [esp + 0x174]
mov dword [esi + 0x12b0], eax
mov eax, dword [esp + 0x28]
push eax
push ecx
call fcn.004a2c50
add esp, 0x10
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x158
ret
mov eax, dword [esp + 0x178]
test eax, eax
je 0x50c4e3
test ebx, ebx
je 0x50bf59
test eax, eax
jle 0x50bf42
test eax, ebx
jne 0x50c4e3
add eax, ebx
mov dword [esp + 0x178], eax
jmp 0x50bf61
neg eax
test eax, ebx
je 0x50c4e3
mov ecx, ebx
sub ecx, eax
mov dword [esp + 0x178], ecx
jmp 0x50bf61
test eax, eax
jl case.default.0x50bcf0
mov eax, dword [0x6a0f48]
test eax, eax
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
mov dword [esp + 0x28], 0xffffffff
je 0x50bfdf
mov edx, dword [esi]
cmp edx, dword [0x6a0f4c]
jne 0x50bfdf
call dword [sym.imp.USER32.dll_GetFocus]
cmp dword [esi + 0x1488], eax
jne 0x50bfdf
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
push 1
call edi
test ah, ah
js 0x50bfa6
push 2
call edi
test ah, ah
jns 0x50bfdf
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
mov edx, dword [esi + 0x1488]
lea ecx, [esp + 0x28]
push ecx
push edx
call dword [sym.imp.USER32.dll_ScreenToClient]
movzx eax, word [esp + 0x2c]
mov ecx, dword [esi + 0x1488]
shl eax, 0x10
or eax, 1
push eax
push 0
push 0x202
push ecx
call ebp
mov edx, dword [esi + 0x1488]
push 0
push 0
push 0x18e
push edx
call ebp
push 0
push 0
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0x1488]
push 0x19f
push eax
call ebp
mov ecx, dword [esi + 0x1488]
push 0
push 0
push 0xb
push ecx
mov dword [esp + 0x24], eax
call ebp
test ebx, ebx
je 0x50c106
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x50c106
mov eax, dword [esi + 0x1e90]
mov ecx, dword [eax + 0x717c]
test ecx, ecx
mov edx, dword [edi + 0x10]
mov dword [esp + 0x24], edx
je 0x50c0c9
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0x1488]
push 0
push ecx
push 0x187
push edx
call ebp
cmp eax, 0xffffffff
je 0x50c078
test eax, eax
jle 0x50c078
mov eax, dword [esi + 0x1e90]
mov ecx, dword [eax + 0x717c]
or ecx, 4
jmp 0x50c087
mov eax, dword [esi + 0x1e90]
mov ecx, dword [eax + 0x717c]
or ecx, 8
mov dword [eax + 0x717c], ecx
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x1488]
push 0
push eax
push 0x199
push ecx
call ebp
cmp eax, 0xffffffff
mov dword [0x61a3cc], eax
je 0x50c0b5
test eax, eax
jl 0x50c0b5
cmp eax, 0xf
jle 0x50c0bf
mov dword [0x61a3cc], 0x63
mov edx, dword [esp + 0x18]
mov dword [0x61a3c8], edx
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x1488]
push 0
push eax
push 0x182
push ecx
call ebp
mov edx, dword [esi + 0x12b0]
push edi
push edx
call fcn.004e8a00
mov ecx, dword [esp + 0x174]
mov dword [esi + 0x12b0], eax
mov eax, dword [esp + 0x28]
push eax
push ecx
call fcn.004a2c50
add esp, 0x10
mov ecx, dword [esi + 0x1e90]
mov dl, byte [ecx + 0x5f06]
xor ebp, ebp
xor eax, eax
test dl, dl
mov dword [esp + 0x1c], ebp
mov ebx, 1
je 0x50c164
lea edx, [ecx + 0x616c]
lea esp, [esp]
mov edi, dword [esp + 0x178]
test dword [edx], edi
jne 0x50c151
mov edi, dword [esi + 0x1e90]
inc eax
add edx, 4
cmp byte [edi + eax + 0x5f06], 0
jne 0x50c130
jmp 0x50c164
movzx ebp, byte [ecx + eax + 0x5f06]
mov ebx, dword [ecx + eax*4 + 0x616c]
mov dword [esp + 0x1c], ebp
mov edi, dword [esi + 0x12b0]
test edi, edi
mov dword [esp + 0x10], 0
je 0x50c1b1
lea ebp, [ebx + ebx]
lea esp, [esp]
mov eax, dword [edi + 0x1c]
cmp eax, ebp
jge 0x50c1a2
test ebx, eax
je 0x50c1ad
mov edx, dword [edi]
mov eax, dword [esp + 0x16c]
push edx
push eax
call fcn.005f1860
add esp, 8
test eax, eax
jl 0x50c1ad
inc dword [esp + 0x10]
mov edi, dword [edi + 0x40]
test edi, edi
jne 0x50c180
mov ebp, dword [esp + 0x1c]
test ebp, ebp
lea edx, [esp + 0x34]
je 0x50c1d2
mov ecx, dword [esp + 0x16c]
push ecx
push ebp
push str._c_s
push edx
call fcn.005d9929
add esp, 0x10
jmp 0x50c1ea
mov eax, dword [esp + 0x16c]
sub edx, eax
jmp 0x50c1e0
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x50c1e0
mov eax, dword [esi + 0x12b4]
test eax, eax
je 0x50c266
mov eax, dword [esp + 0x16c]
movzx ecx, byte [eax]
push ecx
call fcn.005daf20
mov ebp, dword [esi + 0x12b4]
add esp, 4
test ebp, ebp
mov ebx, eax
je 0x50c266
cmp dword [ebp + 0xc], ebx
jne 0x50c230
mov edx, dword [esp + 0x16c]
mov eax, dword [ebp]
push edx
push eax
call fcn.005f1860
add esp, 8
test eax, eax
je 0x50c239
mov ebp, dword [ebp + 0x40]
test ebp, ebp
jne 0x50c213
jmp 0x50c266
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x20]
mov eax, dword [ebp + 0x10]
mov dword [0x61a3cc], ecx
mov ecx, dword [esi + 0x12b4]
push ebp
push ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x2c], eax
call fcn.004e8a00
add esp, 8
mov dword [esi + 0x12b4], eax
mov edx, dword [esi + 0x1e90]
mov eax, dword [edx + 0x717c]
test eax, eax
mov ebx, dword [esp + 0x16c]
je 0x50c28b
mov eax, dword [0x61a3c8]
cmp eax, 0xffffffff
je 0x50c28b
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x178]
or ebp, 0xffffffff
test edi, edi
push eax
mov dword [0x61a3c8], ebp
push ebx
je 0x50c2f8
push 0
call fcn.004e8850
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x50c342
movzx ecx, byte [ebx]
push ecx
call fcn.005daf20
mov edx, dword [esp + 0x1c]
mov dword [ebp + 0xc], eax
mov eax, dword [esp + 0x28]
push ebp
mov dword [ebp + 0x20], edx
mov dword [ebp + 0x10], eax
mov ecx, dword [esi + 0x12b0]
push edi
push ecx
call fcn.004e8a80
mov edx, dword [esp + 0x30]
push edx
push 0xffffffffffffffff
push ebp
push ebx
mov dword [esi + 0x12b0], eax
call fcn.004a2a50
add esp, 0x20
mov edi, ebp
jmp 0x50c342
mov ecx, dword [esi + 0x12b0]
push ecx
call fcn.004e8850
add esp, 0xc
test eax, eax
je 0x50c33e
mov dword [esi + 0x12b0], eax
movzx edx, byte [ebx]
mov edi, dword [eax + 0x44]
push edx
call fcn.005daf20
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
push edx
push ebp
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x24]
push edi
push ebx
mov dword [edi + 0x20], eax
mov dword [edi + 0x10], ecx
call fcn.004a2a50
add esp, 0x14
mov dword [esp + 0x10], ebp
test edi, edi
je 0x50c47b
mov ecx, dword [esp + 0x10]
mov edx, dword [esi + 0x1488]
lea eax, [esp + 0x34]
push eax
push ecx
push 0x181
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x50c47b
cmp ebp, 0xfffffffe
je 0x50c47b
mov eax, dword [esi + 0x1e90]
mov ecx, dword [eax + 0x717c]
test ecx, ecx
je 0x50c3ce
test cl, 4
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
je 0x50c3a6
mov eax, dword [esi + 0x1488]
push ebp
push 1
push 0x185
push eax
call edi
mov ecx, dword [0x61a3cc]
mov edx, dword [esi + 0x1488]
push ecx
push ebp
push 0x19a
push edx
call edi
mov eax, dword [esi + 0x1e90]
mov dword [eax + 0x717c], 0
jmp 0x50c42b
mov ecx, dword [esp + 0x18]
test ecx, ecx
je 0x50c3dd
mov eax, dword [0x61a3cc]
jmp 0x50c40d
mov edx, dword [edi + 0x10]
push eax
mov eax, dword [esp + 0x17c]
push 2
push 0
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esi]
push edx
push eax
push ebx
push ecx
call fcn.0043a350
mov eax, dword [esp + 0x30]
add esp, 0x20
cmp eax, 0xffffffff
jne 0x50c411
mov eax, 0x63
mov dword [esp + 0x10], eax
mov edx, dword [esi + 0x1488]
push eax
push ebp
push 0x19a
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
mov ebx, dword [esp + 0x30]
cmp ebp, ebx
jg 0x50c434
inc ebx
mov eax, dword [esp + 0x14]
cmp ebp, eax
jg 0x50c441
inc eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push ebx
push esi
call fcn.00423690
mov ecx, dword [esi + 0x1488]
add esp, 0xc
push 0
push ebx
push 0x197
push ecx
call edi
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x50c47b
mov edx, dword [esi + 0x1488]
push 0
push eax
push 0x19e
push edx
call edi
mov eax, dword [esi + 0x1488]
push 0
push 1
push 0xb
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [esi + 0x1488]
push 0
push 0
push ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
mov eax, dword [esp + 0x178]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x158
ret
mov ecx, dword [esp + 0x178]
test ecx, ecx
mov eax, ebx
je 0x50c4f2
and eax, ecx
pop edi
neg eax
pop esi
sbb eax, eax
pop ebp
and eax, ecx
pop ebx
add esp, 0x158
ret
test ebx, ebx
je 0x50c4e3
test ecx, ecx
je 0x50c4e3
mov edx, dword [esp + 0x178]
mov dword [ecx + 0x18], edx
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x158
ret
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x158
ret