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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
xor edi, edi
cmp dword [0x41d00c], edi
mov dword [ebp - 4], edx
mov esi, ecx
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], edi
mov ebx, 0x205
jne 0x408246
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [0x41d00c], eax
cmp dword [0x41cdc0], 0x200
jl 0x408255
push 0x7b
pop ebx
cmp dword [ebp + 8], 0x66
jne 0x40849b
cmp dword [ebp + 0xc], ebx
je 0x408271
cmp dword [ebp + 0xc], 0x202
jne 0x40849b
mov ebx, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x11
call ebx
and ax, 0x8000
push 0x10
mov dword [ebp + 0xc], eax
call ebx
test ax, 0x8000
je 0x408295
mov dword [ebp - 0xc], 1
jmp 0x4082a2
cmp word [ebp + 0xc], di
je 0x4082a2
mov dword [ebp - 0xc], 2
push 0x82
push dword [esi + 4]
call dword [sym.imp.USER32.dll_LoadMenuA]
cmp eax, edi
mov dword [ebp - 0x1c], eax
je 0x40849b
push edi
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
mov ebx, eax
mov ecx, esi
mov edx, ebx
mov dword [ebp + 0xc], ebx
call fcn.00408150
mov eax, dword [esi + 0x38]
cmp eax, edi
mov dword [ebp + 8], eax
je 0x408302
mov ebx, 0x2c0
push ebx
call fcn.0040d14e
push ebx
push edi
push eax
mov dword [ebp - 8], eax
call fcn.0040cd50
mov ecx, dword [ebp - 8]
add esp, 0x10
lea edx, [ebp - 0x10]
call fcn.00407c34
mov ebx, dword [ebp + 0xc]
cmp dword [esi + 0x3c], edi
je 0x408310
mov edx, esi
mov ecx, ebx
call fcn.00407c60
cmp dword [esi + 0x30], edi
je 0x40833a
push dword [ebp - 0xc]
lea eax, [ebp - 0x10]
mov edx, ebx
mov ecx, esi
push dword [ebp + 8]
push eax
push dword [ebp - 8]
call fcn.00407da6
cmp dword [esi + 0x74], 1
jbe 0x40833a
mov edx, ebx
mov ecx, esi
call fcn.00407fbc
mov ecx, esi
call fcn.004024c0
cmp dword [esi + 0x34], edi
je 0x408350
push ebx
push dword [ebp - 4]
push esi
call fcn.00406ccb
push edi
push 0x326
push ebx
mov ebx, dword [sym.imp.USER32.dll_DeleteMenu]
call ebx
cmp dword [esi + 0x40], edi
jne 0x408388
push edi
push 0x321
push dword [ebp + 0xc]
call ebx
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_GetMenuItemCount]
cmp eax, edi
jle 0x408388
dec eax
push 0x400
push eax
push dword [ebp + 0xc]
call ebx
cmp dword [esi + 0x48], edi
mov ebx, dword [sym.imp.USER32.dll_EnableMenuItem]
je 0x40839f
push 1
push 0x321
push dword [ebp + 0xc]
call ebx
cmp dword [esi + 0xe3c], edi
je 0x4083b3
push 1
push 0x324
push dword [ebp + 0xc]
call ebx
cmp dword [ebp + 8], edi
je 0x4083ce
push dword [ebp - 8]
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x18]
mov ecx, esi
push 1
push dword [ebp + 0xc]
push eax
call fcn.0040808f
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0xc], eax
push edi
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov esi, dword [sym.imp.USER32.dll_AttachThreadInput]
mov dword [ebp - 0x14], eax
push 1
push eax
push dword [ebp - 0xc]
call esi
mov ebx, dword [sym.imp.USER32.dll_SetForegroundWindow]
push dword [ebp - 4]
call ebx
push edi
push dword [ebp - 0x14]
push dword [ebp - 0xc]
call esi
push edi
push dword [ebp - 4]
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push 0x108
push dword [ebp + 0xc]
call dword [sym.imp.USER32.dll_TrackPopupMenu]
mov esi, eax
push edi
push edi
push edi
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_PostMessageA]
cmp esi, edi
je 0x408458
push dword [ebp + 0xc]
movzx eax, si
push eax
push 0x111
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x40845e
mov dword [0x41d00c], edi
cmp dword [ebp + 8], edi
je 0x408474
mov ecx, dword [ebp - 0x18]
call fcn.004037d4
push dword [ebp - 8]
call fcn.0040d0e5
pop ecx
push dword [ebp + 0xc]
mov esi, dword [sym.imp.USER32.dll_DestroyMenu]
call esi
push dword [ebp - 0x1c]
call esi
mov eax, dword [0x41d00c]
cmp eax, edi
je 0x408496
push eax
call ebx
mov dword [0x41d00c], edi
push 1
pop eax
jmp 0x40849d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8