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

Disassembly:
mov dl, byte [esp + 8]
mov ecx, dword [0x4abb60]
sub esp, 0x174
push ebx
push ebp
mov ebp, dword [0x4ad250]
push esi
push edi
mov di, word [esp + 0x190]
cmp ebp, 1
jne 0x406d07
cmp byte [0x4ad280], 0
jne 0x406d07
movzx eax, dl
lea eax, [eax + eax*8]
shl eax, 5
cmp dword [eax + ecx], 0
jne 0x406d07
xor bl, bl
mov byte [esp + 0x16], bl
jmp 0x406d10
mov byte [esp + 0x16], 1
mov bl, byte [esp + 0x16]
cmp byte [esp + 0x194], 0
je 0x406d3d
movzx eax, dl
lea edx, [eax + eax*8]
shl edx, 5
cmp byte [edx + ecx + 4], 0
mov al, 1
jne 0x4077ad
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret
cmp dword [0x4acb28], 0
je 0x406d59
cmp byte [esp + 0x198], 0
jne 0x406d59
mov byte [esp + 0x17], 1
test bl, bl
jne 0x406d5e
mov byte [esp + 0x17], 0
mov bl, byte [0x4ab229]
cmp ebp, 1
jne 0x406e4e
cmp byte [0x4ad27e], 0
je 0x406d84
cmp byte [esp + 0x198], 0
jne 0x406e4e
mov byte [esp + 0x1d], 1
cmp dl, 0xe7
je 0x406e2f
mov ecx, dword [0x4ad254]
mov esi, dword [0x4ad258]
movzx eax, dl
mov al, byte [eax + ecx]
test al, al
jne 0x406db2
movzx eax, di
mov al, byte [eax + esi]
test al, al
je 0x406e2f
mov cl, al
shr al, 2
shr cl, 1
and al, 1
and cl, 1
je 0x406e55
test al, al
jne 0x406dd6
test bl, 0x30
jne 0x406dd6
test al, al
je 0x406e2f
test bl, 0x30
jne 0x406e2f
movzx eax, di
mov ebp, 4
mov dword [0x4ad250], ebp
cmp byte [eax + esi], 0
mov byte [0x4ad260], dl
setne al
mov byte [0x4ad265], al
mov word [0x4ad262], di
mov byte [0x4ad264], 0
test cl, cl
je 0x406e14
mov byte [0x4ad266], 1
test bl, 0x30
jne 0x406e1b
mov byte [0x4ad266], 0
cmp byte [esp + 0x17], 0
jne 0x406e2f
cmp byte [0x4ada88], 0
je 0x406f1f
movzx eax, dl
mov dword [esp + 0x20], eax
add eax, 0xffffffdf
cmp eax, 0x84
ja case.0x406e47.41
movzx ecx, byte [eax + 0x4077c4]
jmp dword [ecx*4 + 0x4077b8]
mov byte [esp + 0x1d], 0
jmp 0x406e2f
test al, al
je 0x406dd6
jmp 0x406dd1
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret
cmp byte [esp + 0x17], 0
je case.0x406e47.41
mov ecx, dword [0x4a9fd4]
test ecx, ecx
je 0x406e97
xor ecx, ecx
mov byte [0x4a9fd8], 0
mov dword [0x4a9fd4], ecx
jmp 0x406e97
mov ecx, dword [0x4a9fd4]
test bl, bl
je 0x406ec2
cmp ebp, 1
jne 0x406ea9
cmp byte [0x4ad27f], 0
jne 0x406ec2
cmp bl, 0x10
je 0x406ec2
cmp bl, 0x20
je 0x406ec2
cmp bl, 0x30
je 0x406ec2
test bl, 0xc
je 0x406f1f
test bl, 3
je 0x406f1f
cmp dl, 8
jne 0x406f2e
test bl, bl
jne 0x406f2e
cmp byte [esp + 0x1d], bl
je 0x406ef6
cmp ebp, 1
jne 0x406ef6
cmp byte [0x4ad27c], bl
je 0x406ef6
mov eax, dword [0x4ad288]
test eax, eax
je 0x406ef6
mov edx, dword [0x4ad284]
dec eax
mov dword [0x4ad288], eax
mov byte [edx + eax], bl
cmp byte [esp + 0x17], 0
je 0x406f0f
test ecx, ecx
je 0x406f0f
dec ecx
mov dword [0x4a9fd4], ecx
mov byte [ecx + 0x4a9fd8], 0
cmp byte [0x4ada88], 0
je 0x406f1f
mov byte [0x4ada88], 0
mov al, byte [esp + 0x16]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ebx, eax
xor esi, esi
mov dword [esp + 0x24], ebx
test ebx, ebx
je 0x406f73
mov edi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push esi
push ebx
call edi
mov esi, eax
lea eax, [esp + 0x50]
push eax
push esi
mov dword [esp + 0x58], 0x30
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x406f73
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x406f73
push 0
push eax
call edi
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ebp, eax
mov dword [esp + 0x30], ebp
cmp dword [0x4ada94], ebx
je 0x406fb7
push 0x1c
lea ecx, [esp + 0x38]
push ecx
push ebx
mov dword [0x4ada94], ebx
call dword [sym.imp.USER32.dll_GetClassNameA]
lea edx, [esp + 0x34]
push str.ApplicationFrameWindow
push edx
call fcn.00485381
add esp, 8
test eax, eax
sete byte [0x4ada90]
mov bl, byte [0x4ada88]
mov ecx, 0x40
mov esi, 0x4ab250
lea edi, [esp + 0x80]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.USER32.dll_ToAsciiEx]
test bl, bl
je 0x407059
cmp byte [0x4ada90], 0
je 0x407059
cmp byte [esp + 0x18c], 0xe7
je 0x407059
mov al, byte [0x4ada8e]
mov cl, byte [0x4ada8f]
neg al
sbb al, al
and al, 0x20
neg cl
sbb cl, cl
and cl, 9
or al, cl
lea ecx, [esp + 0x80]
call fcn.00411580
push ebp
push 0
lea edx, [esp + 0x20]
push edx
mov eax, ecx
movzx ecx, word [0x4ada8c]
push eax
movzx edx, bl
push ecx
push edx
call esi
test eax, eax
jle 0x407052
movzx edx, word [0x4ada8c]
push ebp
push 0
lea eax, [esp + 0x20]
push eax
movzx eax, byte [0x4ada88]
lea ecx, [esp + 0x8c]
push ecx
push edx
push eax
call esi
mov byte [0x4ada88], 0
mov al, byte [0x4ab229]
lea ecx, [esp + 0x80]
call fcn.00411580
push 0x14
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x407080
or byte [esp + 0x94], 1
jmp 0x407088
and byte [esp + 0x94], 0xfe
cmp byte [esp + 0x18c], 0xe7
lea ecx, [esp + 0x18]
jne 0x4070b6
push 0
push 0
push 3
push ecx
push 1
lea edx, [esp + 0x1a4]
push edx
push 0x400
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
jmp 0x4070de
xor eax, eax
cmp dword [0x4ab3bc], eax
push ebp
setne al
lea edx, [esp + 0x84]
push eax
mov eax, dword [esp + 0x190]
push ecx
mov ecx, dword [eax + 4]
push edx
mov edx, dword [esp + 0x30]
push ecx
push edx
call esi
mov dword [esp + 0x2c], eax
test eax, eax
je 0x406f1f
cmp byte [0x4ada88], 0
setne byte [esp + 0x28]
test eax, eax
jns 0x407184
mov bl, byte [esp + 0x16]
test bl, bl
je 0x4077ab
mov al, byte [esp + 0x18c]
mov cx, word [esp + 0x190]
mov byte [0x4ada88], al
mov al, byte [0x4ab229]
test al, 0x30
setne dl
mov word [0x4ada8c], cx
mov byte [0x4ada8e], dl
test al, 3
je 0x407144
mov byte [0x4ada8f], 1
test al, 0xc
jne 0x40714b
mov byte [0x4ada8f], 0
xor eax, eax
cmp dword [0x4ab3bc], eax
push ebp
setne al
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x84]
push eax
mov eax, dword [esp + 0x190]
push ecx
mov ecx, dword [eax + 4]
push edx
mov edx, dword [esp + 0x30]
push ecx
push edx
call esi
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret
test byte [0x4ab229], 3
jne 0x4071a5
mov cl, 0xd
mov al, 0xa
cmp byte [esp + 0x18], cl
jne 0x40719b
mov byte [esp + 0x18], al
cmp byte [esp + 0x19], cl
jne 0x4071a5
mov byte [esp + 0x19], al
cmp byte [esp + 0x17], 0
mov byte [esp + 0x1e], 0
je 0x407555
mov eax, dword [esp + 0x24]
cmp eax, dword [0x4a9fd0]
je 0x4071d1
mov dword [0x4a9fd0], eax
mov byte [0x4a9fd8], 0
xor ecx, ecx
jmp 0x407218
mov ecx, dword [0x4a9fd4]
mov eax, 0x5a
sub eax, ecx
cmp eax, 3
jge 0x407218
mov eax, 0x4aa005
lea edx, [eax + 1]
jmp 0x4071f0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4071f0
sub eax, edx
mov dword [0x4a9fd4], eax
inc eax
push eax
push 0x4aa005
push 0x4a9fd8
call fcn.00485f60
mov ecx, dword [0x4a9fd4]
add esp, 0xc
mov dl, byte [esp + 0x18]
mov byte [ecx + 0x4a9fd8], dl
inc ecx
cmp dword [esp + 0x2c], 1
mov dword [0x4a9fd4], ecx
jle 0x407241
mov al, byte [esp + 0x19]
mov byte [ecx + 0x4a9fd8], al
inc ecx
mov dword [0x4a9fd4], ecx
mov byte [ecx + 0x4a9fd8], 0
test ecx, ecx
je 0x407555
cmp dword [0x4acb2c], 0
mov dword [esp + 0x24], 0
jbe 0x407555
jmp 0x407270
mov edx, dword [0x4acb28]
mov eax, dword [esp + 0x24]
mov ebp, dword [edx + eax*4]
cmp byte [ebp + 0x1f], 0
jne 0x407377
cmp byte [ebp + 0x26], 0
je 0x4072c4
movzx edx, byte [ebp + 0x1e]
cmp ecx, edx
jle 0x407377
movsx eax, byte [ecx + 0x4a9fd7]
push eax
push str._____:____.___n__t
call fcn.00486371
add esp, 8
test eax, eax
je 0x407371
mov ecx, dword [0x4a9fd4]
lea edi, [ecx + 0x4a9fd6]
jmp 0x4072d6
movzx eax, byte [ebp + 0x1e]
cmp ecx, eax
jl 0x407377
lea edi, [ecx + 0x4a9fd7]
cmp byte [ebp + 0x22], 0
movzx edx, byte [ebp + 0x1e]
mov eax, dword [ebp + 4]
lea esi, [edx + eax - 1]
je 0x4072fe
cmp esi, eax
jb 0x40732d
jmp 0x4072f0
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x40732d
dec esi
dec edi
cmp esi, eax
jae 0x4072f0
jmp 0x40732d
cmp esi, eax
jb 0x40732d
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 0x407327
dec esi
dec edi
cmp esi, dword [ebp + 4]
jae 0x407302
mov ecx, dword [0x4a9fd4]
cmp esi, dword [ebp + 4]
jae 0x407377
cmp byte [ebp + 0x27], 0
jne 0x407350
cmp edi, 0x4a9fd8
jb 0x407350
movzx edx, byte [edi]
push edx
call fcn.00407850
add esp, 4
test al, al
jne 0x407371
mov eax, dword [ebp]
test eax, eax
je 0x40735c
mov eax, dword [eax + 4]
jmp 0x407361
mov eax, 0x499869
mov esi, dword [ebp + 0xc]
push eax
call fcn.004097b0
add esp, 4
test eax, eax
jne 0x407391
mov ecx, dword [0x4a9fd4]
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [0x4acb2c]
jb 0x407270
jmp 0x407555
movzx eax, byte [ebp + 0x1d]
mov edx, dword [esp + 0x188]
mov ecx, dword [esp + 0x19c]
push eax
mov eax, dword [edx + 0x10]
add ecx, 4
call fcn.0040a350
add esp, 4
test al, al
je 0x407555
cmp byte [ebp + 0x23], 0
jne 0x4073c7
xor edi, edi
jmp 0x40749c
cmp byte [ebp + 0x26], 0
mov ebx, dword [0x4a9fd4]
lea ebx, [ebx + 0x4a9fd8]
je 0x4073da
dec ebx
movzx eax, byte [ebp + 0x1e]
mov esi, ebx
sub esi, eax
mov dword [esp + 0x20], 0
mov byte [esp + 0x1f], 0
mov byte [esp + 0x17], 0
cmp esi, ebx
jae 0x407444
mov edi, dword [sym.imp.USER32.dll_IsCharUpperA]
mov edi, edi
movzx ecx, byte [esi]
push ecx
call dword [sym.imp.USER32.dll_IsCharLowerA]
test eax, eax
jne 0x407418
movzx edx, byte [esi]
push edx
call edi
test eax, eax
je 0x407437
cmp byte [esp + 0x1f], 0
jne 0x407433
movzx eax, byte [esi]
push eax
mov byte [esp + 0x23], 1
call edi
test eax, eax
je 0x407433
mov byte [esp + 0x17], 1
inc dword [esp + 0x20]
inc esi
cmp esi, ebx
jb 0x407400
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x407448
xor edi, edi
jmp 0x40749c
cmp eax, 1
jne 0x40745b
movzx edi, byte [esp + 0x17]
neg edi
sbb edi, edi
and edi, 2
jmp 0x40749c
cmp byte [esp + 0x17], 0
jne 0x407466
xor edi, edi
jmp 0x40749c
movzx ecx, byte [ebp + 0x1e]
mov esi, ebx
sub esi, ecx
mov edi, 2
cmp esi, ebx
jae 0x407495
jmp 0x407480
movzx edx, byte [esi]
push edx
call dword [sym.imp.USER32.dll_IsCharLowerA]
test eax, eax
jne 0x407493
inc esi
cmp esi, ebx
jb 0x407480
cmp esi, ebx
jne 0x40749c
mov edi, 1
mov dl, byte [ebp + 0x24]
test dl, dl
jne 0x4074a8
cmp byte [ebp + 0x25], dl
je 0x4074b2
mov byte [esp + 0x16], 0
mov byte [esp + 0x1e], 1
mov eax, dword [esp + 0x1a0]
mov ecx, dword [esp + 0x24]
mov dword [eax], ecx
mov al, byte [ebp + 0x26]
test al, al
je 0x4074d5
mov ecx, dword [0x4a9fd4]
movsx ecx, byte [ecx + 0x4a9fd7]
jmp 0x4074d7
xor ecx, ecx
movzx esi, di
movzx ecx, cx
shl esi, 0x10
or esi, ecx
mov ecx, dword [esp + 0x1a4]
mov dword [ecx], esi
mov ecx, dword [ebp + 8]
cmp byte [ecx], 0
je 0x407520
test al, al
je 0x407514
mov edx, dword [0x4a9fd4]
mov al, byte [edx + 0x4a9fd7]
mov byte [0x4a9fd8], al
mov dword [0x4a9fd4], 1
jmp 0x407538
mov dword [0x4a9fd4], 0
jmp 0x407538
test dl, dl
je 0x407538
movzx ecx, byte [ebp + 0x1e]
sub dword [0x4a9fd4], ecx
test al, al
je 0x407538
dec dword [0x4a9fd4]
cmp byte [ebp + 0x28], 0
je 0x407548
mov dword [0x4a9fd4], 0
mov edx, dword [0x4a9fd4]
mov byte [edx + 0x4a9fd8], 0
cmp byte [esp + 0x28], 0
mov bl, byte [esp + 0x16]
je 0x4075cb
test bl, bl
je 0x4075cb
push 0x100
lea eax, [esp + 0x84]
push 0
push eax
call fcn.0048e850
mov al, byte [0x4ada8e]
mov cl, byte [0x4ada8f]
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 + 0x80]
call fcn.00411580
mov edx, dword [esp + 0x30]
push edx
movzx edx, word [0x4ada8c]
push 0
lea eax, [esp + 0x30]
push eax
movzx eax, byte [0x4ada88]
push ecx
push edx
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov byte [0x4ada88], 0
cmp byte [esp + 0x1d], 0
je 0x4077ab
cmp dword [0x4ad250], 1
jne 0x4077ab
cmp byte [esp + 0x1e], 0
jne 0x4077ab
mov edi, dword [esp + 0x2c]
xor esi, esi
test edi, edi
jle 0x407665
jmp 0x407600
cmp byte [0x4ad27d], 0
mov ecx, dword [0x4ad25c]
je 0x407620
movzx eax, byte [esp + esi + 0x18]
push eax
push ecx
call fcn.00486371
add esp, 8
jmp 0x407629
mov al, byte [esp + esi + 0x18]
call fcn.00472a90
test eax, eax
jne 0x4076bb
mov eax, dword [0x4ad288]
cmp eax, dword [0x4ad28c]
je 0x407665
mov dl, byte [esp + esi + 0x18]
mov ecx, dword [0x4ad284]
mov byte [ecx + eax], dl
mov eax, dword [0x4ad288]
mov edx, dword [0x4ad284]
inc eax
inc esi
mov dword [0x4ad288], eax
mov byte [edx + eax], 0
cmp esi, edi
jl 0x407600
xor esi, esi
cmp byte [0x4ad281], 0
je 0x407725
cmp byte [0x4ad27d], 0
je 0x4076f2
cmp dword [0x4ad26c], esi
jbe 0x407793
lea esp, [esp]
mov ecx, dword [0x4ad268]
mov eax, dword [ecx + esi*4]
mov edx, dword [0x4ad284]
push eax
push edx
call fcn.004864b2
add esp, 8
test eax, eax
jne 0x4076db
inc esi
cmp esi, dword [0x4ad26c]
jb 0x407690
jmp 0x407793
mov al, byte [esp + esi + 0x18]
mov byte [0x4ad264], al
mov dword [0x4ad250], 4
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret
mov dword [0x4ad250], 3
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret
cmp dword [0x4ad26c], esi
jbe 0x407793
mov edi, edi
mov eax, dword [0x4ad268]
mov ecx, dword [eax + esi*4]
mov eax, dword [0x4ad284]
push ecx
call fcn.00472ae0
add esp, 4
test eax, eax
jne 0x4076db
inc esi
cmp esi, dword [0x4ad26c]
jb 0x407700
jmp 0x407793
cmp byte [0x4ad27d], 0
je 0x40775d
cmp dword [0x4ad26c], esi
jbe 0x407793
mov edx, dword [0x4ad268]
mov eax, dword [edx + esi*4]
push eax
mov eax, dword [0x4ad284]
push eax
call fcn.004854d1
add esp, 8
test eax, eax
je 0x4076db
inc esi
cmp esi, dword [0x4ad26c]
jb 0x407736
jmp 0x407793
cmp dword [0x4ad26c], esi
jbe 0x407793
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
jmp 0x407770
mov ecx, dword [0x4ad268]
mov edx, dword [ecx + esi*4]
mov eax, dword [0x4ad284]
push edx
push eax
call edi
test eax, eax
je 0x4076db
inc esi
cmp esi, dword [0x4ad26c]
jb 0x407770
mov ecx, dword [0x4ad28c]
cmp dword [0x4ad288], ecx
jl 0x4077ab
mov dword [0x4ad250], 5
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret