Function at 0x403a90
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x40
push ebx
push esi
push edi
xor esi, esi
push ebp
mov dword [0x417414], esi
lea eax, [esp + 0x24]
push 1
push 0
push 0
push 0
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
mov ecx, dword [0x4173e4]
mov edx, dword [0x417418]
test eax, eax
je 0x403b76
mov eax, dword [esp + 0x28]
cmp eax, 0x12
je 0x403ae9
cmp eax, 0x112
je 0x403af0
lea eax, [esp + 0x24]
push eax
push edx
push ecx
call dword [sym.imp.USER32.dll_TranslateAcceleratorA]
test eax, eax
jne 0x403b5a
jmp 0x403b44
mov esi, 1
jmp 0x403b5a
cmp dword [esp + 0x2c], 0xf140
jne 0x403b33
call fcn.004073c0
test al, al
jne 0x403b5a
call fcn.004060e1
mov eax, dword [0x4173e4]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
lea eax, [esp + 0x24]
mov ecx, dword [0x417418]
push eax
mov edx, dword [0x4173e4]
push ecx
push edx
call dword [sym.imp.USER32.dll_TranslateAcceleratorA]
test eax, eax
jne 0x403b5a
jmp 0x403b44
lea eax, [esp + 0x24]
push eax
push edx
push ecx
call dword [sym.imp.USER32.dll_TranslateAcceleratorA]
test eax, eax
jne 0x403b5a
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
cmp dword [0x411688], 0
jne 0x403d43
call dword [sym.imp.USER32.dll_GetActiveWindow]
test eax, eax
jne 0x403b76
call fcn.004060e1
cmp dword [0x411688], 0
jne 0x403d43
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
lea eax, [esp + 0x14]
mov ecx, dword [0x4173e4]
push eax
push ecx
call dword [sym.imp.USER32.dll_ScreenToClient]
lea ecx, [esp + 0x40]
mov edx, dword [0x4173e4]
push ecx
push edx
call dword [sym.imp.USER32.dll_GetClientRect]
mov eax, dword [esp + 0x14]
imul eax, dword [0x417408]
cdq
idiv dword [esp + 0x48]
mov ecx, eax
mov eax, dword [esp + 0x18]
imul eax, dword [0x41740c]
cdq
idiv dword [esp + 0x4c]
mov ebx, eax
mov edi, dword [0x417414]
cmp dword [0x417408], ecx
jbe 0x403c17
cmp dword [0x41740c], ebx
jbe 0x403c17
lea eax, [ecx + ecx*4]
mov ecx, 0x104
shl eax, 6
cdq
idiv ecx
mov ecx, 0xb4
lea ebp, [eax - 0x1e]
lea eax, [ebx + ebx*2]
lea eax, [eax + eax*4]
shl eax, 4
cdq
idiv ecx
sub eax, 0x1e
mov dword [esp + 0x10], eax
jmp 0x403c20
mov ebp, 0x7f00
mov dword [esp + 0x10], ebp
test edi, edi
jne 0x403c36
mov ebx, 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x417414], eax
jmp 0x403c74
mov ebx, 0x32
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
mov ecx, eax
sub edi, dword [0x417414]
sub edx, edx
lea eax, [edi + edi*2]
div ebx
mov ebx, eax
sub edx, edx
mov dword [esp + 0x1c], 3
lea eax, [ebx + ebx*4]
lea eax, [eax + eax*4]
add eax, eax
div dword [esp + 0x1c]
sub edi, eax
sub ecx, edi
mov dword [0x417414], ecx
test ebx, ebx
je 0x403d49
push 1
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
movsx eax, ax
mov edi, eax
push 2
and edi, 0x8000
and eax, 1
shr edi, 0xd
or edi, eax
call dword [sym.imp.USER32.dll_GetAsyncKeyState]
movsx eax, ax
mov ecx, eax
and eax, 1
and ecx, 0x8000
add eax, eax
shr ecx, 0xc
or ecx, eax
or edi, ecx
test esi, esi
jne 0x403d49
test ebx, ebx
je 0x403ce0
mov eax, dword [esp + 0x10]
push edi
push eax
push ebp
call fcn.00402310
add esp, 0xc
cmp eax, 1
sbb esi, esi
and edi, 0xfffffffc
neg esi
dec ebx
test esi, esi
je 0x403cbe
test esi, esi
jne 0x403d51
lea eax, [esp + 0x20]
mov ecx, dword [0x417448]
push eax
push ecx
call fcn.00402720
add esp, 8
mov ecx, dword [0x417448]
cmp eax, 1
mov eax, dword [0x4173d8]
sbb esi, esi
neg esi
test esi, esi
jne 0x403d49
push eax
mov edx, dword [0x417408]
mov eax, dword [0x41740c]
mov ebx, dword [0x417404]
push eax
push edx
mov eax, dword [esp + 0x2c]
push ebx
push eax
push ecx
call fcn.00409329
add esp, 0x18
cmp eax, 1
sbb esi, esi
neg esi
test esi, esi
jne 0x403d51
call fcn.004076a8
jmp 0x403d49
call dword [sym.imp.USER32.dll_WaitMessage]
test esi, esi
je 0x403a9f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x40
ret