Function at 0x540840
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xec
mov eax, dword [0x62a040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, ecx
mov dword [ebp - 0x50], eax
mov esi, edx
cmp edi, 0x201
je 0x540870
cmp edi, 0x204
jne 0x540877
push eax
call dword [sym.imp.USER32.dll_SetFocus]
mov eax, edi
mov byte [ebp - 0x2d], 0
sub eax, 0x201
je 0x54095a
sub eax, 1
je 0x540945
sub eax, 2
jne 0x5408a6
test byte [esi + 0x20], 2
je 0x5408a6
mov ecx, esi
call fcn.00542460
mov ebx, dword [ebp + 0x10]
test byte [esi + 0x20], 2
jne 0x540e5f
mov eax, dword [ebp + 0x14]
lea edx, [ebp - 0x1c]
mov ecx, esi
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 3
call fcn.00543d60
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x10]
and eax, 8
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0xc]
and eax, 4
mov dword [ebp - 0x4c], eax
mov eax, ebx
and eax, 0x20
mov dword [ebp - 0x3c], eax
je 0x5409c5
cmp edi, 0x201
jne 0x5409d5
mov ebx, dword [ebp - 0xc]
mov ecx, esi
mov edx, ebx
mov eax, dword [ebx]
shr eax, 2
not al
and al, 1
movzx eax, al
push eax
call fcn.005438c0
or edx, 0xffffffff
mov eax, dword ds:[esi + 0x78]
test eax, eax
je 0x540c0b
cmp eax, edi
je 0x540c0b
cmp eax, 0x201
jne 0x540bfe
mov edx, 0xd
jmp 0x540c0b
test byte [esi + 0x20], 2
je 0x5408a6
call dword [sym.imp.USER32.dll_ReleaseCapture]
jmp 0x5408a6
mov ecx, dword [esi + 0x20]
mov ebx, dword [ebp + 0x10]
test cl, 0x20
je 0x5408a9
mov edx, dword [esi + 0x60]
lea eax, [edx - 8]
cmp ebx, eax
jl 0x5408a9
lea eax, ds:[edx + 8]
cmp ebx, eax
jge 0x5408a9
push dword [ebp - 0x50]
or ecx, 2
mov byte [ebp - 0x2d], 1
mov dword [esi + 0x20], ecx
mov dword [esi + 0xc0], ebx
mov dword [esi + 0xc4], edx
call dword [sym.imp.USER32.dll_SetCapture]
push 0
push 0x64
push 1
push dword [ebp - 0x50]
call dword [sym.imp.USER32.dll_SetTimer]
push 0x1b
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov edi, edi
jmp 0x5408b3
cmp edi, 0x201
je 0x5409dd
cmp edi, 0x204
je 0x5409dd
mov ebx, dword [ebp - 0xc]
jmp 0x540af7
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x540a12
push 0
push 0
push 0x41c
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esi + 0xf0], 0xffffffff
mov dword [esi + 0xf4], 0xffffffff
mov dword [esi + 0x114], 0xffffffff
mov ecx, dword [ebp - 8]
and ebx, 0x10
mov dword [ebp - 0x54], ebx
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 0x44], ecx
je 0x540c28
test byte [esi + 0x2c], 1
mov dword [ebp - 0x34], 0
mov dword [esi + 0x6c], ebx
je 0x540ad2
test byte ds:[ebx], 2
jne 0x540ad2
cmp byte [ebp - 0x2d], 0
jne 0x540ad2
mov edx, dword ds:[ebx + 0x20]
lea eax, [ebp - 0xe8]
push eax
push ecx
push ecx
mov ecx, esi
call fcn.005439e0
test al, al
je 0x540ad2
mov ecx, dword [ebp - 0xe8]
mov eax, 1
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x34], eax
test cl, 4
je 0x540a9c
nop
cmp edx, dword [ebp - 0xb4]
jl 0x540a9c
cmp edx, dword [ebp - 0xac]
mov dword [ebp - 0x40], 0
cmovl eax, dword [ebp - 0x40]
mov dword [ebp - 0x34], eax
and ecx, 0x18
cmp cl, 0x18
jne 0x540ad2
cmp edx, dword [ebp - 0x94]
jl 0x540ad2
cmp edx, dword [ebp - 0x8c]
jge 0x540ad2
xor eax, eax
mov edx, ebx
cmp edi, 0x204
mov ecx, esi
sete al
push eax
push dword [ebp - 0x4c]
push dword [ebp - 0x48]
call fcn.005441e0
jmp 0x540af7
xor eax, eax
mov edx, ebx
cmp edi, 0x204
mov ecx, esi
sete al
push eax
push dword [ebp - 0x4c]
push dword [ebp - 0x48]
call fcn.005441e0
cmp dword [ebp - 0x34], 0
jne 0x540c25
or edx, 0xffffffff
cmp edi, 0x201
je 0x540918
cmp edi, 0x204
je 0x540918
jmp 0x540b20
cmp edi, 0x207
je 0x540918
cmp edi, 0x202
je 0x540baf
jmp 0x540b40
cmp edi, 0x205
je 0x540baf
cmp edi, 0x208
je 0x540baf
cmp edi, 0x203
jne 0x540b9f
mov edx, 0x10
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
cmp dword [ebp - 0x3c], 0
jne 0x540e5f
cmp edx, 0xffffffff
je 0x540e5f
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
push ebx
push edi
push ecx
mov ecx, esi
call fcn.00542840
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057c26f
mov esp, ebp
pop ebp
ret 0x10
nop
cmp edi, 0x206
jne 0x540b61
mov edx, 0x11
jmp 0x540b61
mov eax, dword [esi + 0x78]
mov ecx, dword [ebp + 0x10]
test eax, eax
je 0x540bf2
cmp dword [esi + 0x7c], ecx
jne 0x540bf2
mov edi, dword [ebp + 0x14]
cmp dword [esi + 0x80], edi
jne 0x540bf2
cmp eax, 0x201
jne 0x540be5
mov edx, 0xd
mov dword [esi + 0x78], 0
jmp 0x540b64
xor edx, edx
cmp eax, 0x204
setne dl
add edx, 0xe
mov dword [esi + 0x78], 0
jmp 0x540b64
xor edx, edx
cmp eax, 0x204
setne dl
add edx, 0xe
mov ecx, dword ds:[ebp + 0x10]
mov dword [esi + 0x78], edi
mov edi, dword [ebp + 0x14]
mov dword [esi + 0x7c], ecx
mov dword [esi + 0x80], edi
jmp 0x540b67
mov ecx, dword [ebp - 8]
or eax, 0xffffffff
mov byte [ebp - 0x2f], 0
test byte [ebp - 0x10], 0xf
mov byte [ebp - 0x3c], 0
mov byte [ebp - 0x2e], 0
jne 0x540f05
cmp byte [ebp - 0x2d], 0
jne 0x540f05
test ebx, ebx
je 0x540c5c
mov eax, dword [ebx + 0x20]
mov dword [ebp - 0x38], eax
jmp 0x540c63
mov dword [ebp - 0x38], 0xffffffff
test ecx, ecx
je 0x540c6c
mov eax, dword [ecx + 4]
jmp 0x540c6f
or eax, 0xffffffff
mov ebx, dword [ebp + 0x10]
mov edx, dword [esi + 0x198]
mov ecx, dword [esi + 0x19c]
mov dword [ebp - 0x40], eax
mov eax, ebx
sub eax, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x14]
sub eax, ecx
mov dword [ebp - 0x10], eax
lea eax, [edx + ebx]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x14]
add eax, ecx
push 2
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push eax
push 0
push dword [esi]
call dword [sym.imp.USER32.dll_MapWindowPoints]
push dword [esi]
call dword [sym.imp.USER32.dll_SetCapture]
xor eax, eax
mov dword [ebp - 0x34], eax
jmp 0x540cc0
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x540d3d
mov eax, dword [ebp - 0x70]
add eax, 0xfffffe00
cmp eax, 5
ja case.0x540ce7.515
jmp dword [eax*4 + 0x540f10]
call dword [sym.imp.USER32.dll_ReleaseCapture]
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x34], eax
jmp 0x540d46
mov eax, dword ds:[ebp - 0x60]
cmp eax, dword [ebp - 0x14]
jl 0x540d17
cmp eax, dword [ebp - 0xc]
jge 0x540d17
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x10]
jl 0x540d17
cmp eax, dword [ebp - 8]
jl 0x540d46
push dword [esi]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
setne byte [ebp - 0x2d]
jmp 0x540d6c
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x74]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x540d46
lea ecx, [ecx]
call dword [sym.imp.USER32.dll_WaitMessage]
push dword [esi]
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x540d68
call dword [sym.imp.USER32.dll_GetCapture]
jmp 0x540d60
cmp eax, dword [esi]
je 0x540cc0
mov byte [ebp - 0x2d], 0
mov ecx, dword [ebp - 0x38]
cmp ecx, 0xffffffff
jne 0x540d7d
mov dword [ebp - 0x38], 0
jmp 0x540d94
mov eax, dword [esi + 0xcc]
cmp ecx, dword [eax]
jae 0x540e5f
mov eax, dword [eax + 8]
mov eax, dword [eax + ecx*4]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x40]
cmp eax, 0xffffffff
je 0x540db0
mov edx, eax
mov ecx, esi
call fcn.00542890
mov dword [ebp - 0x44], eax
test eax, eax
je 0x540e5f
cmp byte [ebp - 0x2d], 0
je 0x540dd0
cmp dword ds:[ebp - 0x54], 0
mov byte [ebp - 0x2f], 1
je 0x540de9
test byte [esi + 0x2c], 1
je 0x540de9
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 0x20]
jmp 0x540dec
cmp edi, 0x201
jne 0x540e72
cmp dword [ebp - 0x34], 0x202
je 0x540e8b
or eax, 0xffffffff
cmp dword [ebp - 0x48], 0
jne 0x540e33
cmp dword [ebp - 0x4c], 0
jne 0x540e33
lea ecx, [ebp - 0x44]
mov edx, eax
push ecx
lea ecx, [ebp - 0x54]
push ecx
push 4
push eax
mov ecx, esi
call fcn.00543f60
mov edx, dword [ebp - 0x54]
lea eax, [ebp - 0x2c]
push eax
push 1
push dword [ebp - 0x44]
mov ecx, esi
call fcn.00543ca0
nop
test al, al
je 0x540e33
push 0
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x50]
call dword [sym.imp.USER32.dll_InvalidateRect]
cmp byte [ebp - 0x2f], 0
je 0x540e45
push dword [ebp + 0x14]
mov edx, ebx
mov ecx, esi
call fcn.00548340
mov al, byte [ebp - 0x2e]
test al, al
je 0x540e5f
mov esi, dword [esi]
call dword [sym.imp.USER32.dll_GetMessagePos]
push eax
push esi
push 0x7b
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0057c26f
mov esp, ebp
pop ebp
ret 0x10
cmp edi, 0x204
jne 0x540de9
cmp dword [ebp - 0x34], 0x205
jne 0x540de9
cmp dword [ebp - 0x54], 0
je 0x540ea6
mov eax, dword [ebp - 0x3c]
mov ecx, 1
test byte [esi + 0x2c], 1
movzx eax, al
cmovne eax, ecx
mov dword [ebp - 0x3c], eax
mov ecx, dword [esi]
lea edx, [ebp - 0x58]
call fcn.00548c60
cmp dword [ebp - 0x58], ebx
jne 0x540ee5
mov ecx, dword [ebp + 0x14]
cmp dword [ebp - 0x54], ecx
jne 0x540ee5
mov eax, dword ds:[ebp + 0xc]
xor edx, edx
push eax
mov eax, dword [ebp - 0x44]
cmp edi, 0x201
push eax
mov eax, dword [ebp - 0x38]
setne dl
push eax
push ecx
push ebx
add edx, 0xd
mov ecx, esi
call fcn.00542840
cmp edi, 0x204
sete al
cmp byte [ebp - 0x3c], 0
mov byte [ebp - 0x2e], al
jne 0x540e48
jmp 0x540f00
jmp 0x540de9
mov ebx, dword [ebp + 0x10]
jmp 0x540dec