Function at 0x40a505
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
xor ebx, ebx
mov edi, 0x200
cmp dword [ebp + 0xc], edi
mov dword [ebp - 4], edx
mov esi, ecx
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], 0x205
mov dword [ebp - 0xc], 0x202
je 0x40a856
cmp dword [esi + 0x70], ebx
jne 0x40a54c
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [esi + 0x70], eax
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
cmp dword [0x420c00], edi
jl 0x40a565
mov dword [ebp - 8], 0x7b
cmp dword [esi + 0x48], ebx
je 0x40a577
mov eax, dword [ebp - 8]
mov dword [ebp - 8], 0x202
mov dword [ebp - 0xc], eax
cmp dword [0x421014], ebx
jne 0x40a592
mov eax, 0x400
cmp dword [ebp + 0xc], eax
je 0x40a58f
inc eax
cmp dword [ebp + 0xc], eax
jne 0x40a592
mov dword [ebp - 8], eax
cmp dword [ebp + 8], 0x32
jne 0x40a856
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 8]
je 0x40a5ad
cmp eax, dword [ebp - 0xc]
jne 0x40a856
cmp eax, dword [ebp - 0xc]
jne 0x40a5b7
mov dword [ebp - 0x10], ebx
jmp 0x40a5d3
lea eax, [esi + 0x84]
cmp dword [eax], ebx
jne 0x40a5cd
mov edx, dword [ebp - 4]
mov ecx, esi
call fcn.004106d5
jmp 0x40a5d3
mov dword [eax], 0x14
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x11
call edi
push 0x10
and eax, 0xffff8000
mov dword [ebp + 8], eax
call edi
test ax, ax
jns 0x40a5f7
mov dword [ebp - 0x14], 1
jmp 0x40a604
cmp word [ebp + 8], bx
je 0x40a604
mov dword [ebp - 0x14], 2
mov eax, 0x202
cmp dword [ebp + 0xc], eax
jne 0x40a613
mov dword [0x421014], eax
push 0x190
push dword [esi + 4]
call dword [sym.imp.USER32.dll_LoadMenuA]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x40a856
push ebx
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
mov edi, eax
mov edx, edi
mov ecx, esi
mov dword [ebp + 0xc], edi
call fcn.0040a440
mov eax, dword [esi + 0x40]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x40a682
mov eax, dword [0x421010]
cmp eax, ebx
mov edi, 0x300
jne 0x40a666
push edi
call fcn.00410e47
pop ecx
mov dword [0x421010], eax
push edi
push ebx
push eax
call fcn.00410a00
mov ecx, dword [0x421010]
add esp, 0xc
lea edx, [ebp - 0x18]
call fcn.00409eea
mov edi, dword [ebp + 0xc]
cmp dword [esi + 0x44], ebx
je 0x40a695
cmp dword [ebp - 0x10], ebx
je 0x40a695
mov edx, esi
mov ecx, edi
call fcn.00409f12
cmp dword [esi + 0x3c], ebx
je 0x40a6ca
cmp dword [ebp - 0x10], ebx
je 0x40a6ca
push dword [ebp - 0x14]
lea eax, [ebp - 0x18]
push dword [ebp + 8]
mov edx, edi
push eax
push dword [0x421010]
mov ecx, esi
call fcn.0040a04a
cmp dword [esi + 0xac], 1
jbe 0x40a6ca
mov edx, edi
mov ecx, esi
call fcn.0040a277
mov ecx, esi
call fcn.00407fd5
cmp dword [esi + 0x8c], ebx
je 0x40a6e4
mov edx, dword [ebp - 4]
push edi
mov ecx, esi
call fcn.00408eb1
cmp dword [esi + 0x4c], ebx
jne 0x40a711
push ebx
push 0x259
push edi
mov edi, dword [sym.imp.USER32.dll_DeleteMenu]
call edi
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp eax, ebx
jle 0x40a711
push 0x400
dec eax
push eax
push dword [ebp + 0xc]
call edi
cmp dword [esi + 0x60], ebx
mov edi, dword [sym.imp.USER32.dll_EnableMenuItem]
je 0x40a728
push 1
push 0x259
push dword [ebp + 0xc]
call edi
cmp dword [esi + 0xe6c], ebx
je 0x40a73c
push 1
push 0x25c
push dword [ebp + 0xc]
call edi
cmp dword [ebp + 8], ebx
je 0x40a75a
push dword [0x421010]
mov edx, dword [ebp - 4]
push 1
push dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push eax
mov ecx, esi
call fcn.0040a372
cmp dword [0x420c00], 0x200
jl 0x40a7a4
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push ebx
push edi
mov dword [ebp - 0x18], eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edi, dword [sym.imp.USER32.dll_AttachThreadInput]
push 1
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
call edi
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push ebx
push dword [ebp - 0x14]
push dword [ebp - 0x18]
call edi
jmp 0x40a7ad
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SetForegroundWindow]
cmp dword [esi + 0x18ac], ebx
je 0x40a7bd
mov edi, dword [esi + 0x18b0]
jmp 0x40a7df
push ebx
push dword [ebp - 4]
mov dword [esi + 0x34], 1
push ebx
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push 0x108
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_TrackPopupMenu]
mov edi, eax
push ebx
push ebx
push ebx
push dword [ebp - 4]
mov dword [0x421014], ebx
call dword [sym.imp.USER32.dll_PostMessageA]
cmp edi, ebx
mov dword [esi + 0x34], ebx
je 0x40a80f
push dword [ebp + 0xc]
movzx eax, di
push eax
push 0x111
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x40a812
mov dword [esi + 0x70], ebx
cmp dword [ebp + 8], ebx
je 0x40a81f
mov ecx, dword [ebp - 0x10]
call fcn.00404625
push dword [ebp + 0xc]
mov esi, dword [sym.imp.USER32.dll_DestroyMenu]
call esi
push dword [ebp - 0xc]
call esi
mov ecx, dword [ebp - 4]
push 0xffffffffffffffeb
pop edx
call fcn.0040fcb9
mov esi, eax
cmp esi, ebx
je 0x40a851
mov eax, dword [esi + 0x70]
cmp eax, ebx
je 0x40a851
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov dword [esi + 0x70], ebx
xor eax, eax
inc eax
jmp 0x40a858
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8