Function at 0x406960
Capabilities:
Get keyboard layout
Log keystrokes via polling

Disassembly:
mov ecx, dword [0x4a3568]
sub esp, 0x120
push ebx
mov bl, byte [esp + 0x12c]
push ebp
mov ebp, dword [0x4a4c48]
push edi
mov di, word [esp + 0x138]
cmp ebp, 1
jne 0x4069a6
cmp byte [0x4a4c74], 0
jne 0x4069a6
movzx eax, bl
lea eax, [eax + eax*8]
shl eax, 5
cmp dword [eax + ecx], 0
mov byte [esp + 0xd], 0
je 0x4069ab
mov byte [esp + 0xd], 1
cmp byte [esp + 0x13c], 0
je 0x4069d9
movzx eax, bl
lea edx, [eax + eax*8]
shl edx, 5
cmp byte [edx + ecx + 4], 0
mov al, 1
jne 0x4072e1
mov al, byte [esp + 0xd]
pop edi
pop ebp
pop ebx
add esp, 0x120
ret
cmp dword [0x4a4530], 0
je 0x4069f1
test dl, dl
jne 0x4069f1
mov byte [esp + 0xe], 1
cmp byte [esp + 0xd], dl
jne 0x4069f6
mov byte [esp + 0xe], 0
mov al, byte [0x4a2c2d]
push esi
cmp ebp, 1
jne 0x406ac8
cmp byte [0x4a4c72], 0
je 0x406a16
test dl, dl
jne 0x406ac8
mov edx, dword [0x4a4c4c]
mov esi, dword [0x4a4c50]
movzx ecx, bl
mov cl, byte [ecx + edx]
mov byte [esp + 0x13], 1
test cl, cl
jne 0x406a3b
movzx ecx, di
mov cl, byte [ecx + esi]
test cl, cl
je 0x406aa7
mov dl, cl
shr cl, 2
shr dl, 1
and cl, 1
and dl, 1
je 0x406acf
test cl, cl
jne 0x406a5e
test al, 0x30
jne 0x406a5e
test cl, cl
je 0x406aa7
test al, 0x30
jne 0x406aa7
movzx ecx, di
mov ebp, 4
mov dword [0x4a4c48], ebp
cmp byte [ecx + esi], 0
mov byte [0x4a4c54], bl
setne cl
mov byte [0x4a4c58], cl
mov word [0x4a4c56], di
test dl, dl
je 0x406a95
mov byte [0x4a4c59], 1
test al, 0x30
jne 0x406a9c
mov byte [0x4a4c59], 0
cmp byte [esp + 0x12], 0
je 0x4072dc
movzx ebx, byte [esp + 0x138]
lea ecx, [ebx - 0x21]
cmp ecx, 0x84
ja case.0x406ac1.41
movzx edx, byte [ecx + 0x4072f8]
jmp dword [edx*4 + 0x4072ec]
mov byte [esp + 0x13], 0
jmp 0x406aa7
test cl, cl
je 0x406a5e
jmp 0x406a5a
pop esi
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 0x120
ret
cmp byte [esp + 0x12], 0
je case.0x406ac1.41
mov ecx, dword [0x4a19dc]
test ecx, ecx
je 0x406b0a
xor ecx, ecx
mov byte [0x4a19e0], 0
mov dword [0x4a19dc], ecx
jmp 0x406b0a
mov ecx, dword [0x4a19dc]
test al, al
je 0x406b34
cmp ebp, 1
jne 0x406b1c
cmp byte [0x4a4c73], 0
jne 0x406b34
cmp al, 0x10
je 0x406b34
cmp al, 0x20
je 0x406b34
test al, 0xc
je 0x4072dc
test al, 3
je 0x4072dc
cmp byte [esp + 0x138], 8
jne 0x406baa
test al, al
jne 0x406baa
cmp byte [esp + 0x13], al
je 0x406b6e
cmp ebp, 1
jne 0x406b6e
cmp byte [0x4a4c70], al
je 0x406b6e
mov eax, dword [0x4a4c7c]
test eax, eax
je 0x406b6e
mov edx, dword [0x4a4c78]
dec eax
mov dword [0x4a4c7c], eax
mov byte [edx + eax], 0
cmp byte [esp + 0x12], 0
je 0x406b87
test ecx, ecx
je 0x406b87
dec ecx
mov dword [0x4a19dc], ecx
mov byte [ecx + 0x4a19e0], 0
cmp byte [0x4a54b8], 0
je 0x4072dc
mov al, byte [esp + 0x11]
pop esi
pop edi
pop ebp
mov byte [0x4a54b8], 0
pop ebx
add esp, 0x120
ret
mov ecx, 0x40
mov esi, 0x4a2c50
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x30]
call fcn.00410ea0
push 0x14
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x406bd6
or byte [esp + 0x44], 1
jmp 0x406bdb
and byte [esp + 0x44], 0xfe
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ebp, eax
test ebp, ebp
je 0x406bf2
push 0
push ebp
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x406bf4
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov edi, dword [sym.imp.USER32.dll_ToAsciiEx]
mov esi, eax
xor eax, eax
cmp dword [0x4a2dbc], eax
push esi
setne al
lea ecx, [esp + 0x18]
lea edx, [esp + 0x34]
mov dword [esp + 0x30], esi
push eax
mov eax, dword [esp + 0x13c]
push ecx
mov ecx, dword [eax + 4]
push edx
push ecx
push ebx
call edi
mov dword [esp + 0x28], eax
test eax, eax
je 0x4072dc
cmp byte [0x4a54b8], 0
mov cl, byte [esp + 0x138]
je 0x406c57
cmp cl, 9
je 0x406c57
mov byte [esp + 0x1c], 1
cmp cl, 0x1b
jne 0x406c5c
mov byte [esp + 0x1c], 0
test eax, eax
jns 0x406cda
cmp byte [esp + 0x11], 0
je 0x4072dc
mov al, byte [0x4a2c2d]
mov dx, word [esp + 0x13c]
test al, 0x30
mov byte [0x4a54b8], cl
setne cl
mov word [0x4a54bc], dx
mov byte [0x4a54be], cl
test al, 3
je 0x406c9f
mov byte [0x4a54bf], 1
test al, 0xc
jne 0x406ca6
mov byte [0x4a54bf], 0
xor edx, edx
cmp dword [0x4a2dbc], edx
push esi
setne dl
lea eax, [esp + 0x18]
lea ecx, [esp + 0x34]
push edx
mov edx, dword [esp + 0x13c]
push eax
mov eax, dword [edx + 4]
push ecx
push eax
push ebx
call edi
mov al, byte [esp + 0x11]
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x120
ret
test byte [0x4a2c2d], 3
jne 0x406cfb
mov cl, 0xd
mov al, 0xa
cmp byte [esp + 0x14], cl
jne 0x406cf1
mov byte [esp + 0x14], al
cmp byte [esp + 0x15], cl
jne 0x406cfb
mov byte [esp + 0x15], al
cmp byte [esp + 0x12], 0
mov byte [esp + 0x1a], 0
je 0x4070a5
cmp ebp, dword [0x4a19d8]
je 0x406d24
mov dword [0x4a19d8], ebp
mov byte [0x4a19e0], 0
xor ecx, ecx
jmp 0x406d68
mov ecx, dword [0x4a19dc]
mov edx, 0x5a
sub edx, ecx
cmp edx, 3
jge 0x406d68
mov eax, 0x4a1a0d
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406d40
sub eax, edx
mov dword [0x4a19dc], eax
inc eax
push eax
push 0x4a1a0d
push 0x4a19e0
call fcn.0047f5f0
mov ecx, dword [0x4a19dc]
add esp, 0xc
mov al, byte [esp + 0x14]
mov byte [ecx + 0x4a19e0], al
inc ecx
cmp dword [esp + 0x28], 1
mov dword [0x4a19dc], ecx
jle 0x406d91
mov dl, byte [esp + 0x15]
mov byte [ecx + 0x4a19e0], dl
inc ecx
mov dword [0x4a19dc], ecx
mov byte [ecx + 0x4a19e0], 0
test ecx, ecx
je 0x4070a5
cmp dword [0x4a4534], 0
mov dword [esp + 0x24], 0
jbe 0x4070a5
jmp 0x406dc0
mov eax, dword [0x4a4530]
mov edx, dword [esp + 0x24]
mov ebp, dword [eax + edx*4]
cmp byte [ebp + 0x27], 0
jne 0x406ece
cmp byte [ebp + 0x2f], 0
je 0x406e13
movzx eax, byte [ebp + 0x26]
cmp ecx, eax
jle 0x406ece
movsx eax, byte [ecx + 0x4a19df]
push eax
push str._____:____.___n__t
call fcn.0047fa01
add esp, 8
test eax, eax
je 0x406ec8
mov ecx, dword [0x4a19dc]
lea edi, [ecx + 0x4a19de]
jmp 0x406e25
movzx edx, byte [ebp + 0x26]
cmp ecx, edx
jl 0x406ece
lea edi, [ecx + 0x4a19df]
cmp byte [ebp + 0x2a], 0
movzx edx, byte [ebp + 0x26]
mov eax, dword [ebp + 4]
lea esi, [edx + eax - 1]
je 0x406e4e
cmp esi, eax
jb 0x406e7d
lea ebx, [ebx]
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x406e7d
dec esi
dec edi
cmp esi, eax
jae 0x406e40
jmp 0x406e7d
cmp esi, eax
jb 0x406e7d
movzx eax, byte [esi]
mov ebx, dword [sym.imp.USER32.dll_CharLowerA]
push eax
call ebx
movzx ecx, byte [edi]
push ecx
mov dword [esp + 0x24], eax
call ebx
mov ecx, dword [esp + 0x20]
cmp al, cl
jne 0x406e77
dec esi
dec edi
cmp esi, dword [ebp + 4]
jae 0x406e52
mov ecx, dword [0x4a19dc]
cmp esi, dword [ebp + 4]
jae 0x406ece
cmp byte [ebp + 0x30], 0
jne 0x406e9e
cmp edi, 0x4a19e0
jb 0x406e9e
movzx edx, byte [edi]
push edx
call dword [sym.imp.USER32.dll_IsCharAlphaNumericA]
test eax, eax
jne 0x406ec8
mov eax, dword [ebp]
test eax, eax
je 0x406ea9
mov eax, dword [eax]
jmp 0x406eae
mov eax, 0x4927e9
mov ecx, dword [ebp + 0xc]
mov bl, byte [ebp + 0x24]
push eax
mov eax, dword [ebp + 0x1c]
push eax
mov eax, dword [ebp + 0x10]
call fcn.004090d0
add esp, 8
test eax, eax
jne 0x406ee8
mov ecx, dword [0x4a19dc]
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [0x4a4534]
jb 0x406dc0
jmp 0x4070a5
movzx edx, byte [ebp + 0x25]
mov ecx, dword [esp + 0x144]
mov eax, dword [esp + 0x134]
mov eax, dword [eax + 0x10]
add ecx, 4
push edx
call fcn.00409ae0
add esp, 4
test al, al
je 0x4070a5
xor edi, edi
cmp byte [ebp + 0x2b], 0
je 0x406fec
cmp byte [ebp + 0x2f], 0
mov ebx, dword [0x4a19dc]
lea ebx, [ebx + 0x4a19e0]
je 0x406f30
dec ebx
movzx ecx, byte [ebp + 0x26]
mov esi, ebx
sub esi, ecx
mov dword [esp + 0x20], edi
mov byte [esp + 0x1b], 0
mov byte [esp + 0x12], 0
cmp esi, ebx
jae 0x406f94
mov edi, dword [sym.imp.USER32.dll_IsCharUpperA]
movzx edx, byte [esi]
push edx
call dword [sym.imp.USER32.dll_IsCharLowerA]
test eax, eax
jne 0x406f68
movzx eax, byte [esi]
push eax
call edi
test eax, eax
je 0x406f87
cmp byte [esp + 0x1b], 0
jne 0x406f83
movzx ecx, byte [esi]
push ecx
mov byte [esp + 0x1f], 1
call edi
test eax, eax
je 0x406f83
mov byte [esp + 0x12], 1
inc dword [esp + 0x20]
inc esi
cmp esi, ebx
jb 0x406f50
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x406f98
xor edi, edi
jmp 0x406fec
cmp eax, 1
jne 0x406fab
movzx edi, byte [esp + 0x12]
neg edi
sbb edi, edi
and edi, 2
jmp 0x406fec
cmp byte [esp + 0x12], 0
jne 0x406fb6
xor edi, edi
jmp 0x406fec
movzx edx, byte [ebp + 0x26]
mov esi, ebx
sub esi, edx
mov edi, 2
cmp esi, ebx
jae 0x406fe5
jmp 0x406fd0
movzx eax, byte [esi]
push eax
call dword [sym.imp.USER32.dll_IsCharLowerA]
test eax, eax
jne 0x406fe3
inc esi
cmp esi, ebx
jb 0x406fd0
cmp esi, ebx
jne 0x406fec
mov edi, 1
mov dl, byte [ebp + 0x2c]
test dl, dl
jne 0x406ff8
cmp byte [ebp + 0x2d], dl
je 0x407002
mov byte [esp + 0x11], 0
mov byte [esp + 0x1a], 1
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x148]
mov dword [ecx], eax
mov al, byte [ebp + 0x2f]
test al, al
je 0x407025
mov ecx, dword [0x4a19dc]
movsx ecx, byte [ecx + 0x4a19df]
jmp 0x407027
xor ecx, ecx
movzx esi, di
movzx ecx, cx
shl esi, 0x10
or esi, ecx
mov ecx, dword [esp + 0x14c]
mov dword [ecx], esi
mov ecx, dword [ebp + 8]
cmp byte [ecx], 0
je 0x407070
test al, al
je 0x407064
mov edx, dword [0x4a19dc]
mov al, byte [edx + 0x4a19df]
mov byte [0x4a19e0], al
mov dword [0x4a19dc], 1
jmp 0x407088
mov dword [0x4a19dc], 0
jmp 0x407088
test dl, dl
je 0x407088
movzx ecx, byte [ebp + 0x26]
sub dword [0x4a19dc], ecx
test al, al
je 0x407088
dec dword [0x4a19dc]
cmp byte [ebp + 0x31], 0
je 0x407098
mov dword [0x4a19dc], 0
mov edx, dword [0x4a19dc]
mov byte [edx + 0x4a19e0], 0
cmp byte [esp + 0x1c], 0
je 0x407116
cmp byte [esp + 0x11], 0
mov bl, byte [0x4a54b8]
mov byte [0x4a54b8], 0
je 0x407116
push 0x100
lea eax, [esp + 0x34]
push 0
push eax
call fcn.00487c20
mov al, byte [0x4a54be]
mov cl, byte [0x4a54bf]
add esp, 0xc
neg al
sbb al, al
and al, 0x20
neg cl
sbb cl, cl
and cl, 9
or al, cl
lea ecx, [esp + 0x30]
call fcn.00410ea0
mov edx, dword [esp + 0x2c]
push edx
movzx edx, word [0x4a54bc]
push 0
lea eax, [esp + 0x24]
push eax
push ecx
movzx eax, bl
push edx
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
cmp byte [esp + 0x13], 0
je 0x4072dc
mov ebx, 1
cmp dword [0x4a4c48], ebx
jne 0x4072dc
cmp byte [esp + 0x1a], 0
jne 0x4072dc
mov eax, dword [0x4a4c7c]
cmp eax, dword [0x4a4c80]
jge 0x40716d
mov ecx, dword [0x4a4c78]
mov dl, byte [esp + 0x14]
mov byte [ecx + eax], dl
mov eax, dword [0x4a4c7c]
mov ecx, dword [0x4a4c78]
add eax, ebx
mov dword [0x4a4c7c], eax
mov byte [ecx + eax], 0
cmp dword [esp + 0x28], ebx
jle 0x4071a3
mov eax, dword [0x4a4c7c]
cmp eax, dword [0x4a4c80]
jge 0x4071a3
mov edx, dword [0x4a4c78]
mov cl, byte [esp + 0x15]
mov byte [edx + eax], cl
mov eax, dword [0x4a4c7c]
mov edx, dword [0x4a4c78]
add eax, ebx
mov dword [0x4a4c7c], eax
mov byte [edx + eax], 0
mov eax, dword [0x4a4c60]
test eax, eax
jne 0x4071bc
mov eax, dword [0x4a4c80]
cmp dword [0x4a4c7c], eax
jmp 0x4072d0
xor esi, esi
cmp byte [0x4a4c75], 0
je 0x407256
cmp byte [0x4a4c71], 0
je 0x407225
test eax, eax
je 0x4072c4
lea esp, [esp]
mov ecx, dword [0x4a4c5c]
mov eax, dword [ecx + esi*4]
mov edx, dword [0x4a4c78]
push eax
push edx
call fcn.0047fb42
add esp, 8
test eax, eax
jne 0x40720c
add esi, ebx
cmp esi, dword [0x4a4c60]
jb 0x4071e0
jmp 0x4072c4
mov al, byte [esp + 0x11]
pop esi
pop edi
pop ebp
mov dword [0x4a4c48], 3
pop ebx
add esp, 0x120
ret
test eax, eax
je 0x4072c4
lea ecx, [ecx]
mov eax, dword [0x4a4c5c]
mov ecx, dword [eax + esi*4]
mov eax, dword [0x4a4c78]
push ecx
call fcn.0046c960
add esp, 4
test eax, eax
jne 0x40720c
add esi, ebx
cmp esi, dword [0x4a4c60]
jb 0x407230
jmp 0x4072c4
cmp byte [0x4a4c71], 0
je 0x40728b
test eax, eax
je 0x4072c4
mov edx, dword [0x4a4c5c]
mov eax, dword [edx + esi*4]
push eax
mov eax, dword [0x4a4c78]
push eax
call fcn.0047eb81
add esp, 8
test eax, eax
je 0x40720c
add esi, ebx
cmp esi, dword [0x4a4c60]
jb 0x407263
jmp 0x4072c4
test eax, eax
je 0x4072c4
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
jmp 0x4072a0
mov ecx, dword [0x4a4c5c]
mov edx, dword [ecx + esi*4]
mov eax, dword [0x4a4c78]
push edx
push eax
call edi
test eax, eax
je 0x40720c
add esi, ebx
cmp esi, dword [0x4a4c60]
jb 0x4072a0
mov ecx, dword [0x4a4c80]
cmp dword [0x4a4c7c], ecx
jl 0x4072dc
mov dword [0x4a4c48], 5
mov al, byte [esp + 0x11]
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x120
ret