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

Disassembly:
mov ecx, dword [0x4c28e0]
sub esp, 0x120
cmp dword [0x4c3fc4], 1
push ebx
mov bl, byte [esp + 0x12c]
push edi
mov di, word [esp + 0x134]
jne 0x4069f3
cmp byte [0x4c3ff0], 0
jne 0x4069f3
movzx eax, bl
lea eax, [eax + eax*8]
shl eax, 5
cmp dword [eax + ecx], 0
mov byte [esp + 0xa], 0
je 0x4069f8
mov byte [esp + 0xa], 1
cmp byte [esp + 0x138], 0
je 0x406a25
movzx eax, bl
lea edx, [eax + eax*8]
shl edx, 5
cmp byte [edx + ecx + 4], 0
mov al, 1
jne 0x407383
mov al, byte [esp + 0xa]
pop edi
pop ebx
add esp, 0x120
ret
cmp dword [0x4c38ac], 0
je 0x406a3d
test dl, dl
jne 0x406a3d
mov byte [esp + 0xb], 1
cmp byte [esp + 0xa], dl
jne 0x406a42
mov byte [esp + 0xb], 0
cmp dword [0x4c3fc4], 1
mov al, byte [0x4c1ea5]
push esi
jne 0x406b00
cmp byte [0x4c3fee], 0
je 0x406a66
test dl, dl
jne 0x406b00
mov edx, dword [0x4c3fc8]
mov esi, dword [0x4c3fcc]
movzx ecx, bl
mov cl, byte [ecx + edx]
mov byte [esp + 0x10], 1
test cl, cl
jne 0x406a8b
movzx ecx, di
mov cl, byte [ecx + esi]
test cl, cl
je 0x406b05
mov dl, cl
shr cl, 2
shr dl, 1
and cl, 1
and dl, 1
je 0x406b22
test cl, cl
jne 0x406aae
test al, 0x30
jne 0x406aae
test cl, cl
je 0x406b05
test al, 0x30
jne 0x406b05
movzx ecx, di
mov dword [0x4c3fc4], 4
cmp byte [ecx + esi], 0
mov byte [0x4c3fd0], bl
setne cl
mov byte [0x4c3fd4], cl
mov word [0x4c3fd2], di
test dl, dl
je 0x406ae4
mov byte [0x4c3fd5], 1
test al, 0x30
jne 0x406aeb
mov byte [0x4c3fd5], 0
cmp byte [esp + 0xf], 0
jne 0x406b05
mov al, byte [esp + 0xe]
pop esi
pop edi
pop ebx
add esp, 0x120
ret
mov byte [esp + 0x10], 0
push ebp
movzx ebp, bl
lea ecx, [ebp - 0x21]
cmp ecx, 0x84
ja case.0x406b1b.41
movzx edx, byte [ecx + 0x407398]
jmp dword [edx*4 + 0x40738c]
test cl, cl
je 0x406aae
jmp 0x406aaa
pop ebp
pop esi
pop edi
mov al, 1
pop ebx
add esp, 0x120
ret
cmp byte [esp + 0x13], 0
je case.0x406b1b.41
mov ecx, dword [0x4c0bfc]
test ecx, ecx
je 0x406b5d
xor ecx, ecx
mov word [0x4c0c00], cx
mov dword [0x4c0bfc], ecx
jmp 0x406b5d
mov ecx, dword [0x4c0bfc]
test al, al
je 0x406b8b
cmp dword [0x4c3fc4], 1
jne 0x406b73
cmp byte [0x4c3fef], 0
jne 0x406b8b
cmp al, 0x10
je 0x406b8b
cmp al, 0x20
je 0x406b8b
test al, 0xc
je 0x40737d
test al, 3
je 0x40737d
cmp bl, 8
jne 0x406c05
test al, al
jne 0x406c05
cmp byte [esp + 0x14], al
je 0x406bc6
cmp dword [0x4c3fc4], 1
jne 0x406bc6
cmp byte [0x4c3fec], al
je 0x406bc6
mov eax, dword [0x4c3ff8]
test eax, eax
je 0x406bc6
mov esi, dword [0x4c3ff4]
dec eax
xor edx, edx
mov dword [0x4c3ff8], eax
mov word [esi + eax*2], dx
cmp byte [esp + 0x13], 0
je 0x406be2
test ecx, ecx
je 0x406be2
dec ecx
xor eax, eax
mov dword [0x4c0bfc], ecx
mov word [ecx*2 + 0x4c0c00], ax
cmp byte [0x4c4e68], 0
je 0x40737d
mov al, byte [esp + 0x12]
pop ebp
pop esi
pop edi
mov byte [0x4c4e68], 0
pop ebx
add esp, 0x120
ret
mov ecx, 0x40
mov esi, 0x4c1ec8
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x30]
call fcn.00411270
push 0x14
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x406c31
or byte [esp + 0x44], 1
jmp 0x406c36
and byte [esp + 0x44], 0xfe
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
test esi, esi
je 0x406c4d
push 0
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x406c4f
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ebx, dword [sym.imp.USER32.dll_ToUnicodeEx]
xor ecx, ecx
cmp dword [0x4c2034], ecx
mov edi, eax
setne cl
push edi
lea edx, [esp + 0x1c]
lea eax, [esp + 0x34]
mov dword [esp + 0x2c], edi
push ecx
mov ecx, dword [esp + 0x13c]
push 2
push edx
mov edx, dword [ecx + 4]
push eax
push edx
push ebp
call ebx
mov dword [esp + 0x2c], eax
test eax, eax
je 0x40737d
cmp byte [0x4c4e68], 0
mov al, byte [esp + 0x138]
je 0x406cb2
cmp al, 9
je 0x406cb2
mov byte [esp + 0x17], 1
cmp al, 0x1b
jne 0x406cb7
mov byte [esp + 0x17], 0
cmp dword [esp + 0x2c], 0
jge 0x406d38
cmp byte [esp + 0x12], 0
je 0x40737d
mov byte [0x4c4e68], al
mov ax, word [esp + 0x13c]
mov word [0x4c4e6c], ax
mov al, byte [0x4c1ea5]
test al, 0x30
setne cl
mov byte [0x4c4e6e], cl
test al, 3
je 0x406cfb
mov byte [0x4c4e6f], 1
test al, 0xc
jne 0x406d02
mov byte [0x4c4e6f], 0
xor edx, edx
cmp dword [0x4c2034], edx
push edi
setne dl
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x34]
push edx
mov edx, dword [esp + 0x13c]
push 2
push eax
mov eax, dword [edx + 4]
push ecx
push eax
push ebp
call ebx
mov al, byte [esp + 0x12]
pop ebp
pop esi
pop edi
pop ebx
add esp, 0x120
ret
test byte [0x4c1ea5], 3
jne 0x406d68
mov eax, 0xd
cmp word [esp + 0x18], ax
jne 0x406d57
mov ecx, 0xa
mov word [esp + 0x18], cx
cmp word [esp + 0x1a], ax
jne 0x406d68
mov edx, 0xa
mov word [esp + 0x1a], dx
cmp byte [esp + 0x13], 0
mov byte [esp + 0x15], 0
je 0x40710a
cmp esi, dword [0x4c0bf8]
je 0x406d92
xor eax, eax
mov dword [0x4c0bf8], esi
mov word [0x4c0c00], ax
xor ecx, ecx
jmp 0x406de1
mov ecx, dword [0x4c0bfc]
mov edx, 0x5a
sub edx, ecx
cmp edx, 3
jge 0x406de1
mov eax, 0x4c0c5a
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406db0
sub eax, edx
sar eax, 1
mov dword [0x4c0bfc], eax
lea eax, [eax + eax + 2]
push eax
push 0x4c0c5a
push 0x4c0c00
call fcn.00488d70
mov ecx, dword [0x4c0bfc]
add esp, 0xc
mov dx, word [esp + 0x18]
mov word [ecx*2 + 0x4c0c00], dx
inc ecx
cmp dword [esp + 0x2c], 1
mov dword [0x4c0bfc], ecx
jle 0x406e10
mov ax, word [esp + 0x1a]
mov word [ecx*2 + 0x4c0c00], ax
inc ecx
mov dword [0x4c0bfc], ecx
xor edx, edx
mov word [ecx*2 + 0x4c0c00], dx
test ecx, ecx
je 0x40710a
mov dword [esp + 0x24], edx
cmp dword [0x4c38b0], edx
jbe 0x40710a
mov eax, dword [0x4c38ac]
mov edx, dword [esp + 0x24]
mov ebp, dword [eax + edx*4]
cmp byte [ebp + 0x26], 0
jne 0x406f51
cmp byte [ebp + 0x2e], 0
je 0x406e87
movzx eax, byte [ebp + 0x25]
cmp ecx, eax
jle 0x406f51
movzx eax, word [ecx*2 + 0x4c0bfe]
push eax
push 0x4be400
call fcn.004890d1
add esp, 8
test eax, eax
je 0x406f4b
mov ecx, dword [0x4c0bfc]
lea edi, [ecx*2 + 0x4c0bfc]
jmp 0x406e9a
movzx edx, byte [ebp + 0x25]
cmp ecx, edx
jl 0x406f51
lea edi, [ecx*2 + 0x4c0bfe]
cmp byte [ebp + 0x29], 0
movzx edx, byte [ebp + 0x25]
mov eax, dword [ebp + 4]
lea esi, [eax + edx*2 - 2]
je 0x406ec4
cmp esi, eax
jb 0x406f00
nop
mov dx, word [edi]
cmp dx, word [esi]
jne 0x406f00
sub esi, 2
sub edi, 2
cmp esi, eax
jae 0x406eb0
jmp 0x406f00
cmp esi, eax
jb 0x406f00
jmp 0x406ed0
movzx eax, word [edi]
mov ebx, dword [sym.imp.USER32.dll_CharLowerW]
push eax
call ebx
movzx ecx, word [esi]
push ecx
mov dword [esp + 0x24], eax
call ebx
mov ecx, dword [esp + 0x20]
cmp cx, ax
jne 0x406efa
sub esi, 2
sub edi, 2
cmp esi, dword [ebp + 4]
jae 0x406ed0
mov ecx, dword [0x4c0bfc]
cmp esi, dword [ebp + 4]
jae 0x406f51
cmp byte [ebp + 0x2f], 0
jne 0x406f21
cmp edi, 0x4c0c00
jb 0x406f21
movzx edx, word [edi]
push edx
call dword [sym.imp.USER32.dll_IsCharAlphaNumericW]
test eax, eax
jne 0x406f4b
mov eax, dword [ebp]
test eax, eax
je 0x406f2c
mov eax, dword [eax]
jmp 0x406f31
mov eax, 0x4a59a4
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.004091b0
add esp, 8
test eax, eax
jne 0x406f6b
mov ecx, dword [0x4c0bfc]
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [0x4c38b0]
jb 0x406e32
jmp 0x407106
xor edi, edi
cmp byte [ebp + 0x2a], 0
je 0x40704d
cmp byte [ebp + 0x2e], 0
mov ebx, dword [0x4c0bfc]
lea ebx, [ebx*2 + 0x4c0c00]
je 0x406f8d
sub ebx, 2
movzx ecx, byte [ebp + 0x25]
add ecx, ecx
mov esi, ebx
sub esi, ecx
mov dword [esp + 0x20], edi
mov byte [esp + 0x16], 0
mov byte [esp + 0x13], 0
cmp esi, ebx
jae 0x406ff6
mov edi, dword [sym.imp.USER32.dll_IsCharUpperW]
nop
movzx edx, word [esi]
push edx
call dword [sym.imp.USER32.dll_IsCharLowerW]
test eax, eax
jne 0x406fc8
movzx eax, word [esi]
push eax
call edi
test eax, eax
je 0x406fe7
cmp byte [esp + 0x16], 0
jne 0x406fe3
movzx ecx, word [esi]
push ecx
mov byte [esp + 0x1a], 1
call edi
test eax, eax
je 0x406fe3
mov byte [esp + 0x13], 1
inc dword [esp + 0x20]
add esi, 2
cmp esi, ebx
jb 0x406fb0
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x406ffa
xor edi, edi
jmp 0x40704d
cmp eax, 1
jne 0x40700d
movzx edi, byte [esp + 0x13]
neg edi
sbb edi, edi
and edi, 2
jmp 0x40704d
cmp byte [esp + 0x13], 0
jne 0x407018
xor edi, edi
jmp 0x40704d
movzx edx, byte [ebp + 0x25]
add edx, edx
mov esi, ebx
sub esi, edx
mov edi, 2
cmp esi, ebx
jae 0x407046
jmp 0x407030
movzx eax, word [esi]
push eax
call dword [sym.imp.USER32.dll_IsCharLowerW]
test eax, eax
jne 0x407044
add esi, edi
cmp esi, ebx
jb 0x407030
cmp esi, ebx
jne 0x40704d
mov edi, 1
mov dl, byte [ebp + 0x2b]
test dl, dl
jne 0x407059
cmp byte [ebp + 0x2c], dl
je 0x407063
mov byte [esp + 0x12], 0
mov byte [esp + 0x15], 1
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x144]
mov dword [ecx], eax
mov al, byte [ebp + 0x2e]
test al, al
je 0x407087
mov ecx, dword [0x4c0bfc]
movzx ecx, word [ecx*2 + 0x4c0bfe]
jmp 0x407089
xor ecx, ecx
movzx esi, di
movzx ecx, cx
shl esi, 0x10
or esi, ecx
mov ecx, dword [esp + 0x148]
mov dword [ecx], esi
mov esi, dword [ebp + 8]
xor ecx, ecx
cmp word [esi], cx
je 0x4070d3
test al, al
je 0x4070cb
mov edx, dword [0x4c0bfc]
mov ax, word [edx*2 + 0x4c0bfe]
mov word [0x4c0c00], ax
mov dword [0x4c0bfc], 1
jmp 0x4070eb
mov dword [0x4c0bfc], ecx
jmp 0x4070eb
test dl, dl
je 0x4070eb
movzx edx, byte [ebp + 0x25]
sub dword [0x4c0bfc], edx
test al, al
je 0x4070eb
dec dword [0x4c0bfc]
cmp byte [ebp + 0x30], cl
je 0x4070f6
mov dword [0x4c0bfc], ecx
mov ecx, dword [0x4c0bfc]
xor eax, eax
mov word [ecx*2 + 0x4c0c00], ax
mov edi, dword [esp + 0x28]
cmp byte [esp + 0x17], 0
je 0x40717b
cmp byte [esp + 0x12], 0
mov bl, byte [0x4c4e68]
mov byte [0x4c4e68], 0
je 0x40717b
push 0x100
lea edx, [esp + 0x34]
push 0
push edx
call fcn.00490ef0
mov al, byte [0x4c4e6e]
mov cl, byte [0x4c4e6f]
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.00411270
push edi
push 0
push 2
lea edx, [esp + 0x34]
push edx
mov eax, ecx
movzx ecx, word [0x4c4e6c]
push eax
movzx edx, bl
push ecx
push edx
call dword [sym.imp.USER32.dll_ToUnicodeEx]
cmp byte [esp + 0x14], 0
je 0x40737d
mov ebx, 1
cmp dword [0x4c3fc4], ebx
jne 0x40737d
cmp byte [esp + 0x15], 0
jne 0x40737d
mov eax, dword [0x4c3ff8]
cmp eax, dword [0x4c3ffc]
jge 0x4071d6
mov ecx, dword [0x4c3ff4]
mov dx, word [esp + 0x18]
mov word [ecx + eax*2], dx
mov eax, dword [0x4c3ff8]
mov edx, dword [0x4c3ff4]
add eax, ebx
xor ecx, ecx
mov dword [0x4c3ff8], eax
mov word [edx + eax*2], cx
cmp dword [esp + 0x2c], ebx
jle 0x407210
mov eax, dword [0x4c3ff8]
cmp eax, dword [0x4c3ffc]
jge 0x407210
mov ecx, dword [0x4c3ff4]
mov dx, word [esp + 0x1a]
mov word [ecx + eax*2], dx
mov eax, dword [0x4c3ff8]
mov edx, dword [0x4c3ff4]
add eax, ebx
xor ecx, ecx
mov dword [0x4c3ff8], eax
mov word [edx + eax*2], cx
mov edi, dword [0x4c3fdc]
test edi, edi
jne 0x40722a
mov eax, dword [0x4c3ffc]
cmp dword [0x4c3ff8], eax
jmp 0x407371
xor esi, esi
cmp byte [0x4c3ff1], 0
je 0x4072ca
cmp byte [0x4c3fed], 0
je 0x407295
test edi, edi
je 0x407365
lea ebx, [ebx]
mov ecx, dword [0x4c3fd8]
mov eax, dword [ecx + esi*4]
mov edx, dword [0x4c3ff4]
push eax
push edx
call fcn.004890f8
add esp, 8
test eax, eax
jne 0x40727c
add esi, ebx
cmp esi, dword [0x4c3fdc]
jb 0x407250
jmp 0x407365
mov al, byte [esp + 0x12]
pop ebp
pop esi
pop edi
mov dword [0x4c3fc4], 3
pop ebx
add esp, 0x120
ret
test edi, edi
je 0x407365
lea ecx, [ecx]
mov eax, dword [0x4c3ff4]
mov ecx, dword [0x4c3fd8]
push eax
mov eax, dword [ecx + esi*4]
call fcn.0046f880
add esp, 4
test eax, eax
jne 0x40727c
add esi, ebx
cmp esi, dword [0x4c3fdc]
jb 0x4072a0
jmp 0x407365
cmp byte [0x4c3fed], 0
je 0x40732a
test edi, edi
je 0x407365
mov ebx, dword [0x4c3ff4]
mov ebp, dword [0x4c3fd8]
mov ecx, dword [ebp + esi*4]
mov eax, ebx
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407316
test dx, dx
je 0x407312
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407316
add eax, 4
add ecx, 4
test dx, dx
jne 0x4072f0
xor eax, eax
jmp 0x40731b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40727c
inc esi
cmp esi, edi
jb 0x4072e7
jmp 0x407365
test edi, edi
je 0x407365
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
jmp 0x407340
mov edx, dword [0x4c3fd8]
mov eax, dword [edx + esi*4]
mov ecx, dword [0x4c3ff4]
push eax
push ecx
call edi
test eax, eax
je 0x40727c
add esi, ebx
cmp esi, dword [0x4c3fdc]
jb 0x407340
mov edx, dword [0x4c3ffc]
cmp dword [0x4c3ff8], edx
jl 0x40737d
mov dword [0x4c3fc4], 5
mov al, byte [esp + 0x12]
pop ebp
pop esi
pop edi
pop ebx
add esp, 0x120
ret