Function at 0x405340
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x30
mov edx, dword [ecx + 4]
mov eax, dword [esp + 0x3c]
push ebx
push ebp
push esi
cmp eax, edx
push edi
mov dword [esp + 0x1c], ecx
jb 0x4053d1
mov esi, dword [ecx + 8]
cmp eax, esi
jae 0x4053d1
mov edi, dword [ecx + 0x14]
mov ebx, eax
sub ebx, edx
mov edx, dword [esp + 0x54]
cmp edx, edi
jae 0x4053d1
add eax, 2
cmp eax, esi
jae 0x4053d1
mov edi, dword [esp + 0x48]
mov esi, dword [sym.imp.user32.dll_GetAsyncKeyState]
push 0x11
call esi
test ax, ax
jge 0x40538f
push 0x7b
call esi
test ax, ax
jl 0x4053d1
mov eax, dword [esp + 0x1c]
mov esi, ebx
push 0
lea ecx, [esp + 0x18]
mov edx, dword [eax + 4]
push 1
add esi, edx
push ecx
push edi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x24], ebx
call fcn.004025e0
mov ebp, eax
add esp, 0x10
test ebp, ebp
mov dword [esp + 0x24], ebp
jne 0x4053db
inc ebx
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x4c]
mov eax, dword [esi + 8]
add ecx, 2
cmp ecx, eax
jb 0x405377
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret 0x14
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
mov ecx, dword [ebp + 8]
test ch, 0x40
jne 0x4053d1
mov ecx, dword [ebp + 0xc]
add ecx, 0xfffffffe
cmp ecx, 0x45
ja case.0x405403.7
xor edx, edx
mov dl, byte [ecx + 0x405940]
jmp dword [edx*4 + 0x405928]
xor ecx, ecx
inc esi
mov cl, byte [eax + edi]
mov dword [esp + 0x10], ecx
jmp 0x405578
xor ecx, ecx
inc esi
mov cx, word [eax + edi]
mov dword [esp + 0x10], ecx
jmp 0x405578
mov ecx, dword [eax + edi]
inc esi
mov dword [esp + 0x10], ecx
jmp 0x405578
mov esi, dword [eax + edi + 1]
mov edx, dword [esp + 0x44]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
push 4
push ecx
push esi
push edx
mov dword [esp + 0x24], 0
call fcn.00429130
add esp, 0x14
test eax, eax
je 0x4054a0
cmp dword [esp + 0x18], 4
jne 0x4054a0
jmp 0x405570
mov esi, dword [eax + edi]
mov edx, dword [esp + 0x44]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
push 4
push ecx
push esi
push edx
mov dword [esp + 0x24], 0
call fcn.00429130
add esp, 0x14
test eax, eax
je 0x4054a0
cmp dword [esp + 0x18], 4
je 0x405570
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 0x10]
add ecx, 0xfffffffe
cmp ecx, 0x45
ja case.0x4054bb.7
xor edx, edx
mov dl, byte [ecx + 0x4059a0]
jmp dword [edx*4 + 0x405988]
mov edx, dword [esp + 0x4c]
xor ecx, ecx
mov cl, byte [eax + edi]
mov dword [esp + 0x10], ecx
lea esi, [edx + 1]
jmp 0x405578
mov edx, dword [esp + 0x4c]
xor ecx, ecx
mov cx, word [eax + edi]
mov dword [esp + 0x10], ecx
lea esi, [edx + 1]
jmp 0x405578
mov edx, dword [esp + 0x4c]
mov ecx, dword [eax + edi]
mov dword [esp + 0x10], ecx
lea esi, [edx + 1]
jmp 0x405578
mov esi, dword [eax + edi + 1]
mov edx, dword [esp + 0x44]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
push 4
push ecx
push esi
push edx
mov dword [esp + 0x24], 0
call fcn.00429130
add esp, 0x14
test eax, eax
je 0x40586d
cmp dword [esp + 0x18], 4
jne 0x40586d
jmp 0x405570
mov esi, dword [eax + edi]
mov edx, dword [esp + 0x44]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x10]
push eax
push 4
push ecx
push esi
push edx
mov dword [esp + 0x24], 0
call fcn.00429130
add esp, 0x14
test eax, eax
je 0x40586d
cmp dword [esp + 0x18], 4
jne 0x40586d
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x50]
mov dword [esp + 0x20], 0
mov edx, dword [edx + 4]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], edx
test edx, edx
je 0x4055e5
mov ebx, dword [esp + 0x50]
mov ebx, dword [ebx + 8]
sub ebx, edx
mov edx, dword [esp + 0x20]
sar ebx, 4
cmp edx, ebx
jae 0x4055c5
mov edx, dword [esp + 0x28]
cmp dword [edx], esi
je 0x4055c5
mov ebx, dword [esp + 0x20]
inc ebx
add edx, 0x10
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x20], ebx
jmp 0x40558f
mov edx, dword [esp + 0x2c]
test edx, edx
je 0x4055e5
mov ebx, dword [esp + 0x50]
mov ebx, dword [ebx + 8]
sub ebx, edx
mov edx, dword [esp + 0x20]
sar ebx, 4
cmp edx, ebx
jb case.0x4054bb.7
mov edx, dword [esp + 0x1c]
xor ebx, ebx
cmp dword [edx + 0x1c], ebx
jle case.0x4054bb.7
xor edi, edi
mov ebp, edx
jmp 0x4055fe
mov ecx, dword [esp + 0x10]
mov edx, dword [ebp + 0x18]
push ecx
mov ecx, edi
add ecx, edx
call fcn.004096a0
test eax, eax
jne 0x40562e
mov eax, dword [ebp + 0x1c]
inc ebx
add edi, 0x43c
cmp ebx, eax
jl 0x4055fa
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x48]
mov ebp, dword [esp + 0x24]
jmp case.0x4054bb.7
mov ebx, dword [esp + 0x50]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], eax
mov esi, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
sub ecx, esi
mov edi, esi
sar ecx, 4
cmp ecx, 1
jae 0x40574c
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x405667
mov eax, esi
sub eax, ecx
sar eax, 4
cmp eax, 1
ja 0x40566c
mov eax, 1
test ecx, ecx
jne 0x405674
xor esi, esi
jmp 0x405679
sub esi, ecx
sar esi, 4
add eax, esi
test eax, eax
mov dword [esp + 0x28], eax
jge 0x405685
xor eax, eax
shl eax, 4
push eax
call fcn.00442732
mov ebp, eax
mov eax, dword [ebx + 4]
add esp, 4
cmp eax, edi
mov dword [esp + 0x2c], ebp
mov esi, ebp
je 0x4056cc
test esi, esi
je 0x4056c2
mov edx, eax
mov ecx, esi
mov ebp, dword [edx]
mov dword [ecx], ebp
mov ebp, dword [edx + 4]
mov dword [ecx + 4], ebp
mov ebp, dword [edx + 8]
mov dword [ecx + 8], ebp
mov ebp, dword [esp + 0x2c]
mov edx, dword [edx + 0xc]
mov dword [ecx + 0xc], edx
add eax, 0x10
add esi, 0x10
cmp eax, edi
jne 0x4056a0
lea eax, [esp + 0x30]
push eax
push esi
call fcn.004062e0
mov eax, dword [ebx + 8]
add esp, 8
cmp edi, eax
mov dword [esp + 0x2c], eax
je 0x405700
add esi, 0x10
push edi
push esi
call fcn.004062e0
mov eax, dword [esp + 0x34]
add edi, 0x10
add esp, 8
add esi, 0x10
cmp edi, eax
jne 0x4056e8
mov eax, dword [ebx + 4]
push eax
mov dword [esp + 0x30], eax
call fcn.0044275b
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebx + 4]
shl eax, 4
add esp, 4
add eax, ebp
test ecx, ecx
mov dword [ebx + 0xc], eax
jne 0x405727
xor eax, eax
jmp 0x40572f
mov eax, dword [ebx + 8]
sub eax, ecx
sar eax, 4
mov edi, dword [esp + 0x48]
inc eax
shl eax, 4
add eax, ebp
mov dword [ebx + 4], ebp
mov ebp, dword [esp + 0x24]
mov dword [ebx + 8], eax
mov eax, dword [esp + 0x14]
jmp case.0x4054bb.7
mov eax, esi
sub eax, edi
sar eax, 4
cmp eax, 1
jae 0x4057d2
cmp edi, esi
mov eax, edi
je 0x405771
lea ebp, [eax + 0x10]
push eax
push ebp
call fcn.004062e0
mov eax, ebp
add esp, 8
cmp eax, esi
jne 0x40575e
mov ecx, dword [ebx + 8]
mov eax, 1
mov edx, ecx
mov esi, ecx
sub edx, edi
sar edx, 4
sub eax, edx
je 0x40579c
mov ebp, eax
lea eax, [esp + 0x30]
push eax
push esi
call fcn.004062e0
add esp, 8
add esi, 0x10
dec ebp
jne 0x405788
mov ebx, dword [ebx + 8]
mov eax, edi
cmp edi, ebx
je 0x405852
mov edx, dword [esp + 0x30]
mov ecx, eax
add eax, 0x10
mov dword [ecx], edx
mov edx, dword [esp + 0x34]
cmp eax, ebx
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x38]
mov dword [ecx + 8], edx
mov edx, dword [esp + 0x3c]
mov dword [ecx + 0xc], edx
jne 0x4057a9
jmp 0x405852
lea ebx, [esi - 0x10]
mov ebp, esi
cmp ebx, esi
mov dword [esp + 0x2c], ebx
je 0x4057f3
push ebx
push ebp
call fcn.004062e0
add ebx, 0x10
add esp, 8
add ebp, 0x10
cmp ebx, esi
jne 0x4057df
mov eax, dword [esp + 0x50]
mov ecx, dword [eax + 8]
lea eax, [ecx - 0x10]
cmp edi, eax
je 0x405825
sub eax, 0x10
sub ecx, 0x10
mov edx, eax
mov esi, ecx
cmp eax, edi
mov ebx, dword [edx]
mov dword [esi], ebx
mov ebx, dword [edx + 4]
mov dword [esi + 4], ebx
mov ebx, dword [edx + 8]
mov dword [esi + 8], ebx
mov edx, dword [edx + 0xc]
mov dword [esi + 0xc], edx
jne 0x405801
lea ecx, [edi + 0x10]
mov eax, edi
cmp edi, ecx
je 0x405852
mov esi, dword [esp + 0x30]
mov edx, eax
add eax, 0x10
mov dword [edx], esi
mov esi, dword [esp + 0x34]
cmp eax, ecx
mov dword [edx + 4], esi
mov esi, dword [esp + 0x38]
mov dword [edx + 8], esi
mov esi, dword [esp + 0x3c]
mov dword [edx + 0xc], esi
jne 0x40582e
mov eax, dword [esp + 0x50]
mov edi, dword [esp + 0x48]
mov ebp, dword [esp + 0x24]
mov ecx, dword [eax + 8]
add ecx, 0x10
mov dword [eax + 8], ecx
mov eax, dword [esp + 0x14]
jmp case.0x4054bb.7
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 8]
mov dl, byte [edi + eax + 1]
mov al, byte [eax + edi]
push 1
push ecx
mov ecx, dword [ebp + 0x14]
push edx
push eax
push ecx
call fcn.004024c0
mov edx, dword [ebp + 8]
mov bl, al
mov eax, dword [esp + 0x28]
push 1
push edx
and ebx, 0xff
mov cl, byte [edi + eax + 1]
mov dl, byte [eax + edi]
mov eax, dword [ebp + 0x10]
push ecx
push edx
push eax
call fcn.004024c0
mov ecx, dword [ebp + 8]
and eax, 0xff
add ebx, eax
mov eax, dword [esp + 0x3c]
push 1
push ecx
mov dl, byte [edi + eax + 1]
mov al, byte [eax + edi]
mov ecx, dword [ebp + 0xc]
push edx
push eax
push ecx
call fcn.004024c0
mov edx, dword [esp + 0x50]
and eax, 0xff
add edx, ebx
add esp, 0x3c
add eax, edx
mov ebx, eax
mov eax, dword [ebp + 8]
test ah, 0x16
je 0x4053bf
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
cmp eax, dword [esi + 4]
jb 0x4053c3
cmp eax, dword [esi + 8]
ja 0x4053c3
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x50]
inc ecx
push ecx
push edx
push eax
mov eax, dword [esp + 0x50]
push edi
push eax
mov ecx, esi
call fcn.00405340
jmp 0x4053c3