Function at 0x401de0
Capabilities:
Log keystrokes via polling

Disassembly:
mov eax, dword [0x412270]
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov edi, 1
xor ebx, ebx
cmp eax, edi
jne 0x401e01
mov dword [esp + 0x48], edi
mov dword [0x412270], ebx
cmp dword [0x4121a4], edi
jne 0x401e3f
cmp dword [0x412258], edi
jne 0x401e3f
mov eax, dword [0x4121ac]
cmp eax, 0x6e
jne 0x401e27
mov dword [0x4121a4], 2
jmp 0x401e3f
add eax, dword [esp + 0x48]
cmp eax, 0x6e
mov dword [0x4121ac], eax
jle 0x401e3f
mov dword [0x4121ac], 0x6e
mov ebp, dword [0x41f6cc]
cmp ebp, ebx
jne 0x402247
mov eax, dword [0x4121c0]
mov dword [0x412178], 0xffff
cmp eax, edi
mov dword [0x411b94], ebx
jne 0x401ed6
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x34
push eax
push ebx
mov dword [esp + 0x1c], 0x83
call dword [sym.imp.WINMM.dll_joyGetPosEx]
test eax, eax
jne 0x401ed6
mov eax, dword [esp + 0x18]
cmp eax, 0xac03
jbe 0x401e97
mov dword [0x412178], ebx
cmp eax, 0x53fc
jae 0x401ea8
mov dword [0x412178], 2
mov eax, dword [esp + 0x1c]
cmp eax, 0xac03
jbe 0x401eb9
mov dword [0x412178], edi
cmp eax, 0x53fc
jae 0x401eca
mov dword [0x412178], 3
cmp dword [esp + 0x30], edi
jne 0x401ed6
mov dword [0x411b94], edi
mov eax, dword [0x412258]
mov ecx, dword [0x411b7c]
mov edx, dword [0x411b80]
cmp eax, edi
mov dword [0x411b38], ecx
mov dword [0x411b34], edx
jne 0x401f2d
cmp dword [0x4121a4], 2
jne 0x401f2d
cmp dword [0x411bb0], edi
jne 0x401f1c
mov eax, dword [0x411ba0]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
push edi
call fcn.00406df0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
cmp dword [0x41f6c0], ebx
jne 0x401fa2
cmp dword [0x412284], ebx
jne 0x401fa2
cmp dword [0x41219c], ebx
jne 0x401fa2
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
push 0x20
call esi
test ax, ax
jl 0x401f65
push 0xd
call esi
test ax, ax
jl 0x401f65
cmp dword [0x411b94], edi
jne 0x401fa2
cmp dword [0x412258], edi
jne 0x401f8d
cmp dword [0x4121a4], ebx
jne 0x4024b5
mov dword [0x4121a4], edi
mov dword [0x4121ac], ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
mov dword [0x411bbc], edi
call fcn.00407090
call fcn.004070c0
call fcn.004088d0
cmp dword [0x41f6c0], edi
jne 0x40201e
cmp dword [0x41219c], ebx
jne 0x40201e
cmp dword [0x411bc4], ebx
jne 0x40201e
mov eax, dword [0x411ba8]
inc eax
cmp eax, 8
mov dword [0x411ba8], eax
jne 0x402007
mov ecx, dword [0x411be0]
mov eax, dword [0x412170]
dec ecx
cmp eax, edi
mov dword [0x411be0], ecx
mov dword [0x411ba8], ebx
jne 0x402007
cmp dword [0x411bc0], ebx
jne 0x402007
cmp dword [0x411bf8], ebx
jne 0x402001
call fcn.004070c0
mov dword [0x411bc0], edi
dec dword [0x411bf8]
cmp dword [0x412200], ebx
jne 0x40201e
cmp dword [0x411be0], 0xa
jg 0x40201e
mov dword [0x412200], edi
cmp dword [0x412258], ebx
jne 0x40202b
call fcn.00404350
cmp dword [0x41f6c0], ebx
jne 0x402038
call fcn.004088d0
push 0x412198
push 0x411b84
call fcn.004024c0
add esp, 8
push 0x411b88
push 0x411b9c
call fcn.004024c0
add esp, 8
push 0x412200
push 0x4121d8
call fcn.004024c0
add esp, 8
push 0x41218c
push 0x411cbc
call fcn.004024c0
mov ecx, dword [0x411bfc]
mov eax, dword [0x411be4]
add esp, 8
cmp ecx, eax
jne 0x4020be
cmp dword [0x411c00], edi
je 0x4020be
cmp dword [0x412284], ebx
jne 0x4020be
mov edx, dword [0x411bec]
push 0x412308
mov dword [0x411be8], edx
mov dword [0x411c00], edi
call fcn.00406620
add esp, 4
cmp dword [0x412284], 2
jne 0x40215e
mov eax, dword [0x412180]
mov ecx, dword [0x4123a0]
cmp eax, ecx
je 0x402183
mov esi, dword [0x411b7c]
mov ecx, dword [0x4121d4]
mov eax, esi
cdq
and edx, 0x1f
lea ebx, [ecx - 9]
add eax, edx
sar eax, 5
cmp eax, ebx
jge 0x402105
add esi, 0x20
mov dword [0x411b7c], esi
mov edx, dword [0x4121f8]
mov ecx, dword [0x411b80]
mov eax, ecx
lea edi, [edx - 6]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
cmp eax, edi
jge 0x40212c
add ecx, 0x20
mov dword [0x411b80], ecx
mov eax, esi
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
cmp eax, ebx
jle 0x402144
sub esi, 0x20
mov dword [0x411b7c], esi
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
cmp eax, edi
jle 0x40218f
sub ecx, 0x20
mov dword [0x411b80], ecx
jmp 0x40218f
mov eax, dword [0x4121d4]
mov ecx, dword [0x4121f8]
add ecx, 0xfffffffa
lea esi, [eax - 9]
shl esi, 5
shl ecx, 5
mov dword [0x411b7c], esi
mov dword [0x411b80], ecx
jmp 0x40218f
mov esi, dword [0x411b7c]
mov ecx, dword [0x411b80]
xor ebx, ebx
cmp esi, ebx
jge 0x40219d
xor esi, esi
mov dword [0x411b7c], esi
cmp ecx, ebx
jge 0x4021a9
xor ecx, ecx
mov dword [0x411b80], ecx
cmp esi, 0x3c0
jle 0x4021bb
mov dword [0x411b7c], 0x3c0
cmp ecx, 0x220
jle 0x4021cd
mov dword [0x411b80], 0x220
mov edx, dword [0x411b34]
mov eax, dword [0x411b38]
push ebx
push edx
push eax
call fcn.00402af0
mov eax, dword [0x41f6a4]
add esp, 0xc
add eax, 0x20
cmp eax, 0x100
mov dword [0x41f6a4], eax
jne 0x4021fd
mov dword [0x41f6a4], ebx
mov eax, dword [0x411bb4]
cmp eax, ebx
mov eax, dword [0x4121a8]
jne 0x40222e
add eax, 0x20
cmp eax, 0xe0
mov dword [0x4121a8], eax
jne 0x402307
mov ebp, 1
mov dword [0x411bb4], ebp
jmp 0x40230c
sub eax, 0x20
mov dword [0x4121a8], eax
jne 0x402307
mov dword [0x411bb4], ebx
jmp 0x402307
mov eax, dword [0x411b7c]
mov edi, dword [0x411b38]
mov esi, dword [0x41f6c8]
cmp eax, edi
jle 0x40226d
lea ecx, [esi + 1]
imul ecx, dword [esp + 0x48]
lea edi, [edi + ecx*4]
mov dword [0x411b38], edi
cmp eax, edi
jge 0x40228c
lea edx, [esi*4]
mov eax, 4
sub eax, edx
imul eax, dword [esp + 0x48]
sub edi, eax
mov dword [0x411b38], edi
mov ebx, dword [0x411b80]
mov ecx, dword [0x411b34]
cmp ebx, ecx
jle 0x4022c5
lea edx, [esi*4]
mov eax, 0x51eb851f
imul edx
sar edx, 4
mov eax, edx
shr eax, 0x1f
lea edx, [edx + eax + 4]
imul edx, dword [esp + 0x48]
add ecx, edx
mov dword [0x411b34], ecx
cmp ebx, ecx
jge 0x4022f3
lea edx, [esi*4]
mov eax, 0x51eb851f
imul edx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add edx, eax
mov eax, 4
sub eax, edx
imul eax, dword [esp + 0x48]
sub ecx, eax
mov dword [0x411b34], ecx
lea edx, [ebp*4]
push edx
push ecx
push edi
call fcn.00402af0
add esp, 0xc
xor ebx, ebx
mov ebp, 1
mov eax, dword [0x41f6cc]
mov edi, dword [esp + 0x48]
add eax, edi
cmp eax, 8
mov dword [0x41f6cc], eax
jl 0x402327
mov dword [0x41f6cc], ebx
cmp dword [0x412284], 2
jne 0x402390
mov eax, dword [0x412180]
mov ecx, dword [0x4123a0]
cmp eax, ecx
je 0x402390
lea eax, [edi + edi*2]
shl eax, 1
je 0x402390
mov esi, eax
call fcn.00408c90
cdq
mov ecx, 0x5dc
idiv ecx
xor eax, eax
lea ecx, [edx + edx*8]
cmp dword [ecx*4 + 0x4123c8], ebx
je 0x402376
inc edx
cmp edx, 0x5dc
jne 0x40236e
xor edx, edx
inc eax
cmp eax, 0x5dc
jne 0x402357
cmp eax, 0x5dc
jne 0x402383
mov dword [0x412284], ebp
lea edx, [edx + edx*8]
dec esi
mov dword [edx*4 + 0x4123c8], ebp
jne 0x402348
cmp dword [0x41219c], ebp
jne 0x4023c3
mov eax, dword [0x411be0]
cmp eax, ebx
je 0x4023b5
mov edx, eax
push ebp
dec edx
mov dword [0x411be0], edx
call fcn.00407660
add esp, 4
jmp 0x4023c3
cmp dword [0x411bbc], ebx
jne 0x4023cf
mov dword [0x411bbc], ebp
cmp dword [0x411bbc], ebx
je 0x4024b5
cmp dword [0x412258], ebx
jne 0x4024b5
xor esi, esi
shl edi, 4
je 0x4024b5
call fcn.00408c90
cdq
mov ecx, 0x5dc
idiv ecx
xor eax, eax
lea ecx, [edx + edx*8]
cmp dword [ecx*4 + 0x4123c8], ebp
je 0x402414
inc edx
cmp edx, 0x5dc
jne 0x40240c
xor edx, edx
inc eax
cmp eax, 0x5dc
jne 0x4023f5
cmp eax, 0x5dc
je 0x402432
lea edx, [edx + edx*8]
inc esi
cmp esi, edi
mov dword [edx*4 + 0x4123c8], ebx
jne 0x4023e6
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
cmp dword [0x411bbc], ebp
jne 0x40244c
mov dword [0x411bbc], 2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
cmp dword [0x41219c], ebp
jne 0x402463
mov eax, dword [0x412180]
push ebp
inc eax
mov dword [0x412180], eax
push eax
jmp 0x402491
mov eax, dword [0x41f6b8]
dec eax
mov dword [0x41f6b8], eax
jne 0x40248a
mov dword [0x412258], ebp
mov dword [0x4121a4], ebx
mov dword [0x411bbc], ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret
mov eax, dword [0x412180]
push ebx
push eax
call fcn.00403ed0
mov ecx, dword [0x411c10]
mov edx, dword [0x411c0c]
mov eax, dword [0x411c08]
add esp, 8
push ecx
push edx
push eax
call fcn.00408110
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret