Function at 0x41c490
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x1d4
push esi
mov esi, dword [esp + 0x1dc]
push edi
push 0x194
lea eax, [esp + 0x4c]
push eax
xor edi, edi
push esi
mov dword [esp + 0x14], edi
call dword [sym.imp.WINMM.dll_joyGetDevCapsA]
test eax, eax
jne 0x41c849
lea ecx, [esp + 0x14]
push ecx
push esi
mov dword [esp + 0x1c], 0x34
mov dword [esp + 0x20], 0xff
call dword [sym.imp.WINMM.dll_joyGetPosEx]
test eax, eax
jne 0x41c849
cmp dword [esp + 0xb0], 2
push ebx
push ebp
jb 0x41c560
mov ebx, dword [esp + 0x7c]
mov esi, dword [esp + 0x80]
xor ebp, ebp
mov eax, ebx
add eax, esi
mov edx, ebp
adc edx, edi
mov ecx, 1
call fcn.00497530
mov ecx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov eax, esi
add eax, ecx
mov ecx, dword [esp + 0x18]
mov edx, edi
adc edx, ecx
mov ecx, 1
call fcn.00497530
mov edi, dword [esp + 0x18]
mov esi, eax
mov eax, ebx
add eax, dword [esp + 0x14]
mov edx, ebp
adc edx, edi
mov ecx, 1
call fcn.00497530
mov ecx, dword [esp + 0x28]
cmp ecx, eax
jae 0x41c557
mov dword [esp + 0x10], 1
cmp ecx, esi
jbe 0x41c560
or dword [esp + 0x10], 2
cmp dword [esp + 0xb8], 1
jb 0x41c5d8
mov ebx, dword [esp + 0x74]
mov esi, dword [esp + 0x78]
xor ebp, ebp
xor edi, edi
mov eax, ebx
add eax, esi
mov edx, ebp
adc edx, edi
mov ecx, 1
call fcn.00497530
mov ecx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov eax, esi
add eax, ecx
mov ecx, dword [esp + 0x18]
mov edx, edi
adc edx, ecx
mov ecx, 1
call fcn.00497530
mov edi, dword [esp + 0x18]
mov esi, eax
mov eax, ebx
add eax, dword [esp + 0x14]
mov edx, ebp
adc edx, edi
mov ecx, 1
call fcn.00497530
mov ecx, dword [esp + 0x24]
cmp ecx, eax
jae 0x41c5cf
or dword [esp + 0x10], 4
cmp ecx, esi
jbe 0x41c5d8
or dword [esp + 0x10], 8
cmp dword [esp + 0xb8], 3
jb 0x41c65c
mov ebx, dword [esp + 0x84]
mov esi, dword [esp + 0x88]
xor ebp, ebp
xor edi, edi
mov eax, ebx
add eax, esi
mov edx, ebp
adc edx, edi
mov ecx, 1
call fcn.00497530
mov ecx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov eax, esi
add eax, ecx
mov ecx, dword [esp + 0x18]
mov edx, edi
adc edx, ecx
mov ecx, 1
call fcn.00497530
mov edi, dword [esp + 0x18]
mov esi, eax
mov eax, ebx
add eax, dword [esp + 0x14]
mov edx, ebp
adc edx, edi
mov ecx, 1
call fcn.00497530
mov ecx, dword [esp + 0x2c]
cmp ecx, eax
jae 0x41c650
or dword [esp + 0x10], 0x100000
cmp ecx, esi
jbe 0x41c65c
or dword [esp + 0x10], 0x200000
cmp dword [esp + 0xb8], 4
jb 0x41c6e0
mov ebx, dword [esp + 0x98]
mov esi, dword [esp + 0x9c]
xor ebp, ebp
xor edi, edi
mov eax, ebx
add eax, esi
mov edx, ebp
adc edx, edi
mov ecx, 1
call fcn.00497530
mov ecx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov eax, esi
add eax, ecx
mov ecx, dword [esp + 0x18]
mov edx, edi
adc edx, ecx
mov ecx, 1
call fcn.00497530
mov edi, dword [esp + 0x18]
mov esi, eax
mov eax, ebx
add eax, dword [esp + 0x14]
mov edx, ebp
adc edx, edi
mov ecx, 1
call fcn.00497530
mov ecx, dword [esp + 0x30]
cmp ecx, eax
jae 0x41c6d4
or dword [esp + 0x10], 0x400000
cmp ecx, esi
jbe 0x41c6e0
or dword [esp + 0x10], 0x800000
cmp dword [esp + 0xb8], 5
jb 0x41c764
mov ebx, dword [esp + 0xa0]
mov esi, dword [esp + 0xa4]
xor ebp, ebp
xor edi, edi
mov eax, ebx
add eax, esi
mov edx, ebp
adc edx, edi
mov ecx, 1
call fcn.00497530
mov ecx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov eax, esi
add eax, ecx
mov ecx, dword [esp + 0x18]
mov edx, edi
adc edx, ecx
mov ecx, 1
call fcn.00497530
mov edi, dword [esp + 0x18]
mov esi, eax
mov eax, ebx
add eax, dword [esp + 0x14]
mov edx, ebp
adc edx, edi
mov ecx, 1
call fcn.00497530
mov ecx, dword [esp + 0x34]
cmp ecx, eax
jae 0x41c758
or dword [esp + 0x10], 0x1000000
cmp ecx, esi
jbe 0x41c764
or dword [esp + 0x10], 0x2000000
cmp dword [esp + 0xb8], 6
jb 0x41c7e8
mov ebx, dword [esp + 0xa8]
mov esi, dword [esp + 0xac]
xor ebp, ebp
xor edi, edi
mov eax, ebx
add eax, esi
mov edx, ebp
adc edx, edi
mov ecx, 1
call fcn.00497530
mov ecx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov eax, esi
add eax, ecx
mov ecx, dword [esp + 0x18]
mov edx, edi
adc edx, ecx
mov ecx, 1
call fcn.00497530
mov edi, dword [esp + 0x18]
mov esi, eax
mov eax, ebx
add eax, dword [esp + 0x14]
mov edx, ebp
adc edx, edi
mov ecx, 1
call fcn.00497530
mov ecx, dword [esp + 0x38]
cmp ecx, eax
jae 0x41c7dc
or dword [esp + 0x10], 0x4000000
cmp ecx, esi
jbe 0x41c7e8
or dword [esp + 0x10], 0x8000000
mov edx, dword [esp + 0x44]
cmp edx, 0xffff
pop ebp
pop ebx
je 0x41c812
xor ecx, ecx
mov eax, 0x8ca
cmp edx, eax
jb 0x41c897
add eax, 0x1194
inc ecx
cmp eax, 0xa6fe
jl 0x41c7fd
mov edi, dword [esp + 8]
mov ecx, dword [esp + 0x84]
cmp ecx, 0x10
jbe 0x41c827
mov ecx, 0x10
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x1e0]
mov edx, 1
shl edx, cl
shl eax, 4
add edx, 0xfffffff
shl edx, 4
and edx, eax
or edi, edx
mov al, byte [0x8dd95e]
test al, al
je 0x41c88c
test esi, esi
jne 0x41c88c
mov esi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
push 0x26
call esi
test ah, 0x80
je 0x41c868
or edi, 1
push 0x28
call esi
test ah, 0x80
je 0x41c874
or edi, 2
push 0x25
call esi
test ah, 0x80
je 0x41c880
or edi, 4
push 0x27
call esi
test ah, 0x80
je 0x41c88c
or edi, 8
mov eax, edi
pop edi
pop esi
add esp, 0x1d4
ret
mov edi, dword [esp + 8]
and ecx, 7
or edi, dword [ecx*4 + 0x4abd2c]
jmp 0x41c816