Function at 0x403960
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x28]
mov edx, dword [ecx + 0x14]
push ebx
push ebp
xor ebx, ebx
push esi
cmp eax, edx
push edi
mov dword [esp + 0x18], ecx
jae 0x403c62
mov edi, dword [esp + 0x2c]
push edi
call fcn.00442732
mov edx, dword [esp + 0x2c]
mov esi, eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x20]
push ecx
push edi
mov ecx, dword [eax]
push esi
push edx
push ecx
call fcn.00429130
add esp, 0x18
test eax, eax
je 0x403c59
cmp dword [esp + 0x1c], edi
jne 0x403c59
cmp edi, 2
jbe 0x403c59
mov ebp, dword [esp + 0x30]
mov edi, dword [sym.imp.user32.dll_GetAsyncKeyState]
push 0x11
call edi
test ax, ax
jge 0x4039de
push 0x7b
call edi
test ax, ax
jl 0x403c59
push 0
lea edx, [esp + 0x14]
push 1
push edx
push esi
mov dword [esp + 0x20], ebx
call fcn.004025e0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x403a00
inc ebx
jmp 0x403c4a
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
mov ecx, dword [edi + 8]
test ch, 0x40
jne 0x403c59
test ch, 0x16
je 0x403bd9
mov dl, byte [eax + esi]
push 1
push ecx
mov cl, byte [esi + eax + 1]
mov eax, dword [edi + 0xc]
push ecx
push edx
push eax
call fcn.004024c0
add esp, 0x14
test al, al
jbe 0x403bd5
mov eax, dword [edi + 0xc]
xor edx, edx
lea ecx, [eax - 2]
mov eax, dword [esp + 0x10]
cmp ecx, 0x45
ja case.0x403a57.8
xor ebx, ebx
mov bl, byte [ecx + 0x403ca4]
jmp dword [ebx*4 + 0x403c88]
mov ebx, dword [esp + 0x28]
xor ecx, ecx
mov cl, byte [eax + esi]
add ecx, eax
lea ecx, [ecx + ebx + 1]
mov dword [ebp], ecx
jmp 0x403ab6
xor ecx, ecx
mov cl, byte [eax + esi]
mov dword [ebp], ecx
jmp 0x403ab6
xor ecx, ecx
mov cx, word [eax + esi]
mov dword [ebp], ecx
jmp 0x403ab6
mov ecx, dword [eax + esi]
mov ebx, dword [esp + 0x28]
add ecx, eax
lea ecx, [ecx + ebx + 4]
mov dword [ebp], ecx
jmp 0x403ab6
mov ecx, dword [eax + esi]
mov dword [ebp], ecx
jmp 0x403ab6
mov edx, dword [esi + eax + 1]
mov dword [ebp], edx
mov edx, 1
jmp 0x403ab6
mov dword [ebp], 0
mov ebx, dword [ebp]
test ebx, ebx
je 0x403b19
test edx, edx
je 0x403b19
mov ecx, dword [esp + 0x18]
cmp ebx, dword [ecx + 4]
jb 0x403b19
cmp ebx, dword [ecx + 8]
ja 0x403b19
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x14], 0
mov edx, dword [ecx + 4]
mov ecx, edx
test edx, edx
je 0x403b19
mov ebp, dword [esp + 0x34]
mov ebp, dword [ebp + 8]
sub ebp, edx
sar ebp, 3
cmp dword [esp + 0x14], ebp
jae 0x403b15
cmp ebx, dword [ecx]
jb 0x403b03
cmp ebx, dword [ecx + 4]
jb 0x403c6e
mov ebp, dword [esp + 0x14]
inc ebp
add ecx, 8
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x30]
jmp 0x403ae0
mov ebp, dword [esp + 0x30]
mov edx, dword [edi + 8]
mov cl, byte [esi + eax + 1]
push 1
push edx
mov dl, byte [eax + esi]
mov eax, dword [edi + 0x14]
push ecx
push edx
push eax
call fcn.004024c0
mov ecx, dword [edi + 8]
mov bl, al
mov eax, dword [esp + 0x24]
push 1
push ecx
mov ecx, dword [edi + 0x10]
mov dl, byte [esi + eax + 1]
mov al, byte [eax + esi]
push edx
push eax
push ecx
and ebx, 0xff
call fcn.004024c0
mov edx, dword [edi + 8]
and eax, 0xff
add ebx, eax
mov eax, dword [esp + 0x38]
push 1
push edx
mov cl, byte [esi + eax + 1]
mov dl, byte [eax + esi]
mov eax, dword [edi + 0xc]
push ecx
push edx
push eax
call fcn.004024c0
mov ecx, dword [esp + 0x4c]
and eax, 0xff
add ecx, ebx
add esp, 0x3c
add eax, ecx
mov ebx, eax
mov eax, dword [edi + 8]
test ah, 0x16
je 0x403c4a
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp]
cmp eax, dword [ecx + 4]
jb 0x403c4a
cmp eax, dword [ecx + 8]
ja 0x403c4a
mov edx, dword [esp + 0x38]
inc edx
push edx
mov edx, dword [esp + 0x38]
push edx
mov edx, dword [esp + 0x34]
push ebp
push edx
push eax
mov eax, dword [esp + 0x38]
push eax
call fcn.00403960
test eax, eax
jne 0x403c6e
jmp 0x403c4a
mov eax, dword [esp + 0x10]
mov ecx, dword [edi + 8]
mov dl, byte [esi + eax + 1]
mov al, byte [eax + esi]
push 1
push ecx
mov ecx, dword [edi + 0x14]
push edx
push eax
push ecx
call fcn.004024c0
mov edx, dword [edi + 8]
mov bl, al
mov eax, dword [esp + 0x24]
push 1
push edx
and ebx, 0xff
mov cl, byte [esi + eax + 1]
mov dl, byte [eax + esi]
mov eax, dword [edi + 0x10]
push ecx
push edx
push eax
call fcn.004024c0
mov ecx, dword [edi + 8]
and eax, 0xff
add ebx, eax
mov eax, dword [esp + 0x38]
push 1
push ecx
mov dl, byte [esi + eax + 1]
mov al, byte [eax + esi]
mov ecx, dword [edi + 0xc]
push edx
push eax
push ecx
call fcn.004024c0
mov edx, dword [esp + 0x4c]
and eax, 0xff
add edx, ebx
add esp, 0x3c
add eax, edx
mov ebx, eax
mov ecx, dword [esp + 0x2c]
lea eax, [ebx + 2]
cmp eax, ecx
jb 0x4039c2
push esi
call fcn.0044275b
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 0x18
push esi
call fcn.0044275b
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x18