Function at 0x40f600
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x11c
push ebx
mov bl, byte [esp + 0x128]
push ebp
push esi
mov esi, dword [esp + 0x12c]
movzx eax, bl
push edi
mov edi, dword [esp + 0x138]
or ax, di
je 0x40fc90
cmp dword [esp + 0x144], 0
jne 0x40f640
mov dword [esp + 0x144], 0xffc3d44d
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, dword [0x4aa188]
mov ecx, dword [0x4abc1c]
sete al
mov byte [esp + 0x11], al
test ecx, ecx
je 0x40f666
mov byte [esp + 0x12], 1
test al, al
je 0x40f66b
mov byte [esp + 0x12], 0
cmp ecx, 1
je 0x40f674
test al, al
je 0x40f67c
mov byte [esp + 0x140], 0
test bl, bl
jne 0x40f690
mov ebx, edi
call fcn.00412cd0
mov byte [esp + 0x134], al
jmp 0x40f6b1
test di, di
jne 0x40f6b1
mov ecx, dword [esp + 0x134]
push ecx
xor bl, bl
call fcn.004129c0
movzx edi, ax
add esp, 4
mov dword [esp + 0x138], edi
mov edx, edi
xor eax, eax
shr edx, 8
test dl, dl
setne al
cmp dword [0x4abc1c], 2
mov dword [esp + 0x18], eax
jne case.default.0x40f6dc
movzx eax, byte [esp + 0x134]
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x40f6dc
jmp dword [eax*4 + 0x40fc9c]
mov byte [esp + 0x134], 0x11
jmp case.default.0x40f6dc
mov byte [esp + 0x134], 0x10
jmp case.default.0x40f6dc
mov byte [esp + 0x134], 0x12
mov ebx, dword [esp + 0x13c]
mov al, byte [esp + 0x134]
test ebx, ebx
je 0x40f848
xor ecx, ecx
mov edx, edi
call fcn.00411d60
test al, al
je 0x40f7dc
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.USER32.dll_GetKeyboardState]
mov cl, 0x80
mov dl, 0x7f
test esi, esi
jne 0x40f74b
movzx eax, byte [esp + 0x134]
or byte [esp + eax + 0x28], cl
lea eax, [esp + eax + 0x28]
jmp 0x40f760
cmp esi, 1
jne 0x40f760
movzx eax, byte [esp + 0x134]
and byte [esp + eax + 0x28], dl
lea eax, [esp + eax + 0x28]
movzx eax, byte [esp + 0x134]
add eax, 0xffffff60
cmp eax, 5
ja case.default.0x40f772
jmp dword [eax*4 + 0x40fcb4]
test byte [esp + 0xca], cl
jne 0x40f791
test byte [esp + 0xcb], cl
jne 0x40f791
and byte [esp + 0x39], dl
jmp case.default.0x40f772
or byte [esp + 0x39], cl
jmp case.default.0x40f772
test byte [esp + 0xc8], cl
jne 0x40f7af
test byte [esp + 0xc9], cl
jne 0x40f7af
and byte [esp + 0x38], dl
jmp case.default.0x40f772
or byte [esp + 0x38], cl
jmp case.default.0x40f772
test byte [esp + 0xcc], cl
jne 0x40f7cd
test byte [esp + 0xcd], cl
jne 0x40f7cd
and byte [esp + 0x3a], dl
jmp case.default.0x40f772
or byte [esp + 0x3a], cl
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.USER32.dll_SetKeyboardState]
mov ebp, dword [sym.imp.USER32.dll_PostMessageA]
movzx edi, di
shl edi, 0x10
cmp esi, 1
je 0x40f804
movzx ecx, byte [esp + 0x134]
mov eax, edi
or eax, 1
push eax
push ecx
push 0x100
push ebx
call ebp
cmp byte [esp + 0x140], 0
je 0x40f823
cmp esi, 2
jne 0x40f823
mov edx, dword [0x4a7978]
mov esi, dword [edx + 0x64]
call fcn.00411160
jmp 0x40f82b
test esi, esi
je 0x40fc56
movzx eax, byte [esp + 0x134]
or edi, 0xc0000001
push edi
push eax
push 0x101
push ebx
call ebp
jmp 0x40fc56
cmp byte [0x4abbac], 0
mov dword [0x4aa1e0], esi
mov byte [0x4abbf2], al
je 0x40f8ac
cmp al, 0x12
je 0x40f868
cmp al, 0xa4
je 0x40f868
cmp al, 0xa5
jne 0x40f8ac
cmp byte [esp + 0x11], 0
jne 0x40f8ac
test byte [0x4ad41c], 1
mov byte [esp + 0x16], 1
jne 0x40f8dd
or dword [0x4ad41c], 1
push str.BlockInput
push str.user32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, eax
mov al, byte [esp + 0x134]
mov dword [0x4ad418], ecx
jmp 0x40f8e3
cmp byte [esp + 0x11], 0
mov byte [esp + 0x16], 0
lea esi, [esp + 0x24]
jne 0x40f8c1
mov esi, 0x4aa1d8
mov dword [esp + 0x20], esi
cmp al, 0xa5
jne 0x40f8fb
cmp byte [esp + 0x12], 0
jne 0x40f8fb
cmp dword [0x4ab3d0], 0
je 0x40f8fb
mov al, 1
jmp 0x40f8fd
mov ecx, dword [0x4ad418]
test ecx, ecx
je 0x40f8f2
push 0
call ecx
mov al, byte [esp + 0x134]
mov byte [0x4abbac], 0
jmp 0x40f8bc
xor al, al
mov byte [esp + 0x14], al
mov byte [esp + 0x13], al
test al, al
je 0x40f966
cmp byte [esp + 0x11], 0
jne 0x40f918
mov ebp, dword [0x4aa1dc]
jmp 0x40f932
call dword [sym.imp.USER32.dll_GetForegroundWindow]
call fcn.00412080
mov ebp, eax
push ebp
xor eax, eax
call fcn.004120d0
add esp, 4
mov dword [esi], eax
cmp dword [esi], 0
je 0x40f93e
mov byte [esp + 0x13], 0
jmp 0x40f96a
push 0xa2
mov byte [esp + 0x19], 0xa2
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ecx, dword [esp + 0x144]
mov dword [0x4ab3c4], ecx
shr eax, 0xf
and al, 1
mov byte [esp + 0x17], al
jmp 0x40f96a
mov ebp, dword [esp + 0x24]
cmp byte [esp + 0x12], 0
je 0x40f98c
mov edx, dword [esp + 0x138]
mov al, byte [esp + 0x134]
xor ecx, ecx
call fcn.00411d60
mov byte [esp + 0x1c], al
jmp 0x40f991
mov byte [esp + 0x1c], 0
cmp byte [esp + 0x11], 0
jne 0x40f9b7
mov eax, dword [0x4abc1c]
cmp eax, 2
je 0x40f9b7
cmp dword [0x4ab3d0], 0
je 0x40f9b0
cmp eax, 1
jne 0x40f9b7
mov byte [esp + 0x11], 1
jmp 0x40f9bc
mov byte [esp + 0x11], 0
cmp dword [esp + 0x130], 1
mov edi, dword [sym.imp.USER32.dll_keybd_event]
mov ebx, dword [esp + 0x1c]
je 0x40fabe
cmp byte [esp + 0x12], 0
je 0x40fa06
mov edx, dword [esp + 0x144]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x138]
push edx
mov edx, dword [esp + 0x138]
push eax
push ecx
push edx
push ebx
call fcn.00410c40
add esp, 0x14
jmp 0x40fa9d
cmp byte [esp + 0x14], 0
je 0x40fa1e
cmp dword [esi], 3
jne 0x40fa1e
mov eax, dword [esp + 0x144]
mov dword [0x4ab3c8], eax
mov ecx, dword [esp + 0x144]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x138]
push ecx
mov ecx, dword [esp + 0x138]
push edx
push eax
push ecx
call edi
cmp byte [esp + 0x13], 0
mov dword [0x4ab3c8], 0
je 0x40fa9d
cmp dword [0x4ab3c4], 0
mov byte [esp + 0x13], 0
je 0x40fa6d
mov dword [0x4ab3c4], 0
mov eax, 4
jmp 0x40fa92
cmp byte [esp + 0x17], 0
jne 0x40fa9d
movzx edx, byte [esp + 0x15]
push edx
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ecx, 0x8000
and ax, cx
movzx eax, ax
neg eax
sbb eax, eax
add eax, 4
push ebp
call fcn.004120d0
mov dword [esi], eax
add esp, 4
cmp byte [esp + 0x11], 0
je 0x40fabe
mov edx, dword [esp + 0x138]
mov eax, dword [esp + 0x134]
push edx
push eax
xor dl, dl
call fcn.00411320
add esp, 8
cmp byte [esp + 0x140], 0
je 0x40fb06
mov eax, 2
cmp dword [esp + 0x130], eax
jne 0x40fb06
cmp dword [0x4abc1c], eax
jne 0x40faf2
mov ecx, dword [0x4a7978]
mov esi, dword [ecx + 0x68]
call fcn.00411160
mov esi, dword [esp + 0x20]
jmp 0x40fb14
mov edx, dword [0x4a7978]
mov esi, dword [edx + 0x64]
call fcn.00411160
mov esi, dword [esp + 0x20]
jmp 0x40fb14
cmp dword [esp + 0x130], 0
je 0x40fc0b
or dword [esp + 0x18], 2
cmp byte [esp + 0x12], 0
je 0x40fb52
mov eax, dword [esp + 0x144]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x138]
push eax
mov eax, dword [esp + 0x138]
push ecx
push edx
push eax
push ebx
call fcn.00410c40
mov ebx, dword [esp + 0x14c]
add esp, 0x14
jmp 0x40fbdb
cmp byte [esp + 0x14], 0
je 0x40fb6b
cmp dword [esi], 3
jne 0x40fb6b
mov ecx, dword [esp + 0x144]
mov dword [0x4ab3cc], ecx
mov edx, dword [esp + 0x144]
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x138]
mov ecx, dword [esp + 0x134]
push edx
push eax
push ebx
push ecx
call edi
xor eax, eax
mov dword [0x4ab3cc], eax
cmp byte [esp + 0x13], al
je 0x40fbdb
cmp dword [0x4ab3c4], eax
je 0x40fbab
mov dword [0x4ab3c4], eax
mov eax, 4
jmp 0x40fbd0
cmp byte [esp + 0x17], al
je 0x40fbdb
movzx edx, byte [esp + 0x15]
push edx
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
mov ecx, 0x8000
test cx, ax
mov eax, 0
setne al
add eax, 3
push ebp
call fcn.004120d0
mov dword [esi], eax
add esp, 4
cmp dword [esi], 0
je 0x40fbf1
mov edx, 0x138
cmp bx, dx
jne 0x40fbf1
and byte [0x4aa1c4], 0xfe
cmp byte [esp + 0x11], 0
je 0x40fc0b
mov eax, dword [esp + 0x134]
push ebx
push eax
mov dl, 1
call fcn.00411320
add esp, 8
cmp byte [esp + 0x16], 0
je 0x40fc56
test byte [0x4ad41c], 1
jne 0x40fc3e
or dword [0x4ad41c], 1
push str.BlockInput
push str.user32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4ad418], eax
cmp dword [0x4ad418], 0
je 0x40fc4f
push 1
call dword [0x4ad418]
mov byte [0x4abbac], 1
cmp byte [esp + 0x140], 0
je 0x40fc90
cmp dword [0x4abc1c], 2
jne 0x40fc82
mov ecx, dword [0x4a7978]
mov esi, dword [ecx + 0x60]
call fcn.00411160
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov edx, dword [0x4a7978]
mov esi, dword [edx + 0x5c]
call fcn.00411160
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret