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

Disassembly:
mov dl, byte [esp + 8]
mov ecx, dword [0x4abba8]
sub esp, 0x174
push ebx
push ebp
mov ebp, dword [0x4ad2b8]
push esi
push edi
mov di, word [esp + 0x190]
cmp ebp, 1
jne 0x406db7
cmp byte [0x4ad2e8], 0
jne 0x406db7
movzx eax, dl
lea eax, [eax + eax*8]
shl eax, 5
cmp dword [eax + ecx], 0
jne 0x406db7
xor bl, bl
mov byte [esp + 0x16], bl
jmp 0x406dc0
mov byte [esp + 0x16], 1
mov bl, byte [esp + 0x16]
cmp byte [esp + 0x194], 0
je 0x406ded
movzx eax, dl
lea edx, [eax + eax*8]
shl edx, 5
cmp byte [edx + ecx + 4], 0
mov al, 1
jne 0x40784c
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret
cmp dword [0x4acb70], 0
je 0x406e09
cmp byte [esp + 0x198], 0
jne 0x406e09
mov byte [esp + 0x17], 1
test bl, bl
jne 0x406e0e
mov byte [esp + 0x17], 0
mov bl, byte [0x4ab26d]
cmp ebp, 1
jne 0x406efe
cmp byte [0x4ad2e6], 0
je 0x406e34
cmp byte [esp + 0x198], 0
jne 0x406efe
mov byte [esp + 0x1d], 1
cmp dl, 0xe7
je 0x406edf
mov ecx, dword [0x4ad2bc]
mov esi, dword [0x4ad2c0]
movzx eax, dl
mov al, byte [eax + ecx]
test al, al
jne 0x406e62
movzx eax, di
mov al, byte [eax + esi]
test al, al
je 0x406edf
mov cl, al
shr al, 2
shr cl, 1
and al, 1
and cl, 1
je 0x406f05
test al, al
jne 0x406e86
test bl, 0x30
jne 0x406e86
test al, al
je 0x406edf
test bl, 0x30
jne 0x406edf
movzx eax, di
mov ebp, 4
mov dword [0x4ad2b8], ebp
cmp byte [eax + esi], 0
mov byte [0x4ad2c8], dl
setne al
mov byte [0x4ad2cd], al
mov word [0x4ad2ca], di
mov byte [0x4ad2cc], 0
test cl, cl
je 0x406ec4
mov byte [0x4ad2ce], 1
test bl, 0x30
jne 0x406ecb
mov byte [0x4ad2ce], 0
cmp byte [esp + 0x17], 0
jne 0x406edf
cmp byte [0x4adadc], 0
je 0x406fcf
movzx eax, dl
mov dword [esp + 0x20], eax
add eax, 0xffffffdf
cmp eax, 0x84
ja case.0x406ef7.41
movzx ecx, byte [eax + 0x407864]
jmp dword [ecx*4 + 0x407858]
mov byte [esp + 0x1d], 0
jmp 0x406edf
test al, al
je 0x406e86
jmp 0x406e81
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret
cmp byte [esp + 0x17], 0
je case.0x406ef7.41
mov ecx, dword [0x4aa014]
test ecx, ecx
je 0x406f47
xor ecx, ecx
mov byte [0x4aa018], 0
mov dword [0x4aa014], ecx
jmp 0x406f47
mov ecx, dword [0x4aa014]
test bl, bl
je 0x406f72
cmp ebp, 1
jne 0x406f59
cmp byte [0x4ad2e7], 0
jne 0x406f72
cmp bl, 0x10
je 0x406f72
cmp bl, 0x20
je 0x406f72
cmp bl, 0x30
je 0x406f72
test bl, 0xc
je 0x406fcf
test bl, 3
je 0x406fcf
cmp dl, 8
jne 0x406fde
test bl, bl
jne 0x406fde
cmp byte [esp + 0x1d], bl
je 0x406fa6
cmp ebp, 1
jne 0x406fa6
cmp byte [0x4ad2e4], bl
je 0x406fa6
mov eax, dword [0x4ad2f0]
test eax, eax
je 0x406fa6
mov edx, dword [0x4ad2ec]
dec eax
mov dword [0x4ad2f0], eax
mov byte [edx + eax], bl
cmp byte [esp + 0x17], 0
je 0x406fbf
test ecx, ecx
je 0x406fbf
dec ecx
mov dword [0x4aa014], ecx
mov byte [ecx + 0x4aa018], 0
cmp byte [0x4adadc], 0
je 0x406fcf
mov byte [0x4adadc], 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 0x407023
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 0x407023
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x407023
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 [0x4adae8], ebx
je 0x407067
push 0x1c
lea ecx, [esp + 0x38]
push ecx
push ebx
mov dword [0x4adae8], ebx
call dword [sym.imp.USER32.dll_GetClassNameA]
lea edx, [esp + 0x34]
push str.ApplicationFrameWindow
push edx
call fcn.00485de1
add esp, 8
test eax, eax
sete byte [0x4adae4]
mov bl, byte [0x4adadc]
mov ecx, 0x40
mov esi, 0x4ab290
lea edi, [esp + 0x80]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.USER32.dll_ToAsciiEx]
test bl, bl
je 0x407109
cmp byte [0x4adae4], 0
je 0x407109
cmp byte [esp + 0x18c], 0xe7
je 0x407109
mov al, byte [0x4adae2]
mov cl, byte [0x4adae3]
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.00411da0
push ebp
push 0
lea edx, [esp + 0x20]
push edx
mov eax, ecx
movzx ecx, word [0x4adae0]
push eax
movzx edx, bl
push ecx
push edx
call esi
test eax, eax
jle 0x407102
movzx edx, word [0x4adae0]
push ebp
push 0
lea eax, [esp + 0x20]
push eax
movzx eax, byte [0x4adadc]
lea ecx, [esp + 0x8c]
push ecx
push edx
push eax
call esi
mov byte [0x4adadc], 0
mov al, byte [0x4ab26d]
lea ecx, [esp + 0x80]
call fcn.00411da0
push 0x14
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x407130
or byte [esp + 0x94], 1
jmp 0x407138
and byte [esp + 0x94], 0xfe
cmp byte [esp + 0x18c], 0xe7
lea ecx, [esp + 0x18]
jne 0x407166
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 0x40718e
xor eax, eax
cmp dword [0x4ab400], 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 0x406fcf
cmp byte [0x4adadc], 0
setne byte [esp + 0x28]
test eax, eax
jns 0x407234
mov bl, byte [esp + 0x16]
test bl, bl
je 0x40784a
mov al, byte [esp + 0x18c]
mov cx, word [esp + 0x190]
mov byte [0x4adadc], al
mov al, byte [0x4ab26d]
test al, 0x30
setne dl
mov word [0x4adae0], cx
mov byte [0x4adae2], dl
test al, 3
je 0x4071f4
mov byte [0x4adae3], 1
test al, 0xc
jne 0x4071fb
mov byte [0x4adae3], 0
xor eax, eax
cmp dword [0x4ab400], 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 [0x4ab26d], 3
jne 0x407255
mov cl, 0xd
mov al, 0xa
cmp byte [esp + 0x18], cl
jne 0x40724b
mov byte [esp + 0x18], al
cmp byte [esp + 0x19], cl
jne 0x407255
mov byte [esp + 0x19], al
cmp byte [esp + 0x17], 0
mov byte [esp + 0x1e], 0
je 0x4075e9
mov eax, dword [esp + 0x24]
cmp eax, dword [0x4aa010]
je 0x407281
mov dword [0x4aa010], eax
mov byte [0x4aa018], 0
xor ecx, ecx
jmp 0x4072c8
mov ecx, dword [0x4aa014]
mov eax, 0x5a
sub eax, ecx
cmp eax, 3
jge 0x4072c8
mov eax, 0x4aa045
lea edx, [eax + 1]
jmp 0x4072a0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4072a0
sub eax, edx
mov dword [0x4aa014], eax
inc eax
push eax
push 0x4aa045
push 0x4aa018
call fcn.004869c0
mov ecx, dword [0x4aa014]
add esp, 0xc
mov dl, byte [esp + 0x18]
mov byte [ecx + 0x4aa018], dl
inc ecx
cmp dword [esp + 0x2c], 1
mov dword [0x4aa014], ecx
jle 0x4072f1
mov al, byte [esp + 0x19]
mov byte [ecx + 0x4aa018], al
inc ecx
mov dword [0x4aa014], ecx
mov byte [ecx + 0x4aa018], 0
test ecx, ecx
je 0x4075e9
cmp dword [0x4acb74], 0
mov dword [esp + 0x24], 0
jbe 0x4075e9
jmp 0x407320
mov edx, dword [0x4acb70]
mov eax, dword [esp + 0x24]
mov ebp, dword [edx + eax*4]
cmp byte [ebp + 0x23], 0
jne 0x407419
cmp byte [ebp + 0x2a], 0
je 0x407374
movzx edx, byte [ebp + 0x22]
cmp ecx, edx
jle 0x407419
movsx eax, byte [ecx + 0x4aa017]
push eax
push str._____:____.___n__t
call fcn.00486dd1
add esp, 8
test eax, eax
je 0x407413
mov ecx, dword [0x4aa014]
lea edi, [ecx + 0x4aa016]
jmp 0x407386
movzx eax, byte [ebp + 0x22]
cmp ecx, eax
jl 0x407419
lea edi, [ecx + 0x4aa017]
cmp byte [ebp + 0x26], 0
movzx edx, byte [ebp + 0x22]
mov eax, dword [ebp + 8]
lea esi, [edx + eax - 1]
je 0x4073ae
cmp esi, eax
jb 0x4073dd
jmp 0x4073a0
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x4073dd
dec esi
dec edi
cmp esi, eax
jae 0x4073a0
jmp 0x4073dd
cmp esi, eax
jb 0x4073dd
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 0x4073d7
dec esi
dec edi
cmp esi, dword [ebp + 8]
jae 0x4073b2
mov ecx, dword [0x4aa014]
cmp esi, dword [ebp + 8]
jae 0x407419
cmp byte [ebp + 0x2b], 0
jne 0x407400
cmp edi, 0x4aa018
jb 0x407400
movzx edx, byte [edi]
push edx
call fcn.004078f0
add esp, 4
test al, al
jne 0x407413
mov eax, dword [ebp + 4]
mov esi, dword [ebp + 0x10]
push eax
call fcn.00409890
add esp, 4
test eax, eax
jne 0x407433
mov ecx, dword [0x4aa014]
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [0x4acb74]
jb 0x407320
jmp 0x4075e9
movzx edx, byte [ebp + 0x21]
mov ecx, dword [esp + 0x19c]
mov eax, dword [esp + 0x188]
mov eax, dword [eax + 0x10]
add ecx, 4
push edx
call fcn.0040a430
add esp, 4
test al, al
je 0x4075e9
cmp byte [ebp + 0x27], 0
jne 0x407469
xor edi, edi
jmp 0x40753c
cmp byte [ebp + 0x2a], 0
mov ebx, dword [0x4aa014]
lea ebx, [ebx + 0x4aa018]
je 0x40747c
dec ebx
movzx ecx, byte [ebp + 0x22]
mov esi, ebx
sub esi, ecx
mov dword [esp + 0x20], 0
mov byte [esp + 0x1f], 0
mov byte [esp + 0x17], 0
cmp esi, ebx
jae 0x4074e4
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 0x4074b8
movzx eax, byte [esi]
push eax
call edi
test eax, eax
je 0x4074d7
cmp byte [esp + 0x1f], 0
jne 0x4074d3
movzx ecx, byte [esi]
push ecx
mov byte [esp + 0x23], 1
call edi
test eax, eax
je 0x4074d3
mov byte [esp + 0x17], 1
inc dword [esp + 0x20]
inc esi
cmp esi, ebx
jb 0x4074a0
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4074e8
xor edi, edi
jmp 0x40753c
cmp eax, 1
jne 0x4074fb
movzx edi, byte [esp + 0x17]
neg edi
sbb edi, edi
and edi, 2
jmp 0x40753c
cmp byte [esp + 0x17], 0
jne 0x407506
xor edi, edi
jmp 0x40753c
movzx edx, byte [ebp + 0x22]
mov esi, ebx
sub esi, edx
mov edi, 2
cmp esi, ebx
jae 0x407535
jmp 0x407520
movzx eax, byte [esi]
push eax
call dword [sym.imp.USER32.dll_IsCharLowerA]
test eax, eax
jne 0x407533
inc esi
cmp esi, ebx
jb 0x407520
cmp esi, ebx
jne 0x40753c
mov edi, 1
mov dl, byte [ebp + 0x28]
test dl, dl
jne 0x407548
cmp byte [ebp + 0x29], dl
je 0x407552
mov byte [esp + 0x16], 0
mov byte [esp + 0x1e], 1
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1a0]
mov dword [ecx], eax
mov al, byte [ebp + 0x2a]
test al, al
je 0x407575
mov ecx, dword [0x4aa014]
movsx ecx, byte [ecx + 0x4aa017]
jmp 0x407577
xor ecx, ecx
movzx esi, di
movzx ecx, cx
shl esi, 0x10
or esi, ecx
mov ecx, dword [esp + 0x1a4]
mov dword [ecx], esi
xor ecx, ecx
cmp dword [ebp + 0xc], ecx
je 0x4075bb
test al, al
je 0x4075b3
mov edx, dword [0x4aa014]
mov al, byte [edx + 0x4aa017]
mov byte [0x4aa018], al
mov dword [0x4aa014], 1
jmp 0x4075d3
mov dword [0x4aa014], ecx
jmp 0x4075d3
test dl, dl
je 0x4075d3
movzx edx, byte [ebp + 0x22]
sub dword [0x4aa014], edx
test al, al
je 0x4075d3
dec dword [0x4aa014]
cmp byte [ebp + 0x2c], cl
je 0x4075de
mov dword [0x4aa014], ecx
mov eax, dword [0x4aa014]
mov byte [eax + 0x4aa018], cl
cmp byte [esp + 0x28], 0
mov bl, byte [esp + 0x16]
je 0x407666
test bl, bl
je 0x407666
push 0x100
lea ecx, [esp + 0x84]
push 0
push ecx
call fcn.0048f2b0
mov al, byte [0x4adae2]
mov dl, byte [0x4adae3]
add esp, 0xc
neg al
sbb al, al
and al, 0x20
neg dl
sbb dl, dl
and dl, 9
or al, dl
lea ecx, [esp + 0x80]
call fcn.00411da0
mov eax, dword [esp + 0x30]
push eax
movzx eax, word [0x4adae0]
push 0
lea ecx, [esp + 0x30]
push ecx
movzx ecx, byte [0x4adadc]
lea edx, [esp + 0x8c]
push edx
push eax
push ecx
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov byte [0x4adadc], 0
cmp byte [esp + 0x1d], 0
je 0x40784a
cmp dword [0x4ad2b8], 1
jne 0x40784a
cmp byte [esp + 0x1e], 0
jne 0x40784a
mov edi, dword [esp + 0x2c]
xor esi, esi
test edi, edi
jle 0x4076fe
cmp byte [0x4ad2e5], 0
je 0x4076b3
movzx eax, byte [esp + esi + 0x18]
mov edx, dword [0x4ad2c4]
push eax
push edx
call fcn.00486dd1
add esp, 8
jmp 0x4076c2
mov al, byte [esp + esi + 0x18]
mov ecx, dword [0x4ad2c4]
call fcn.004734e0
test eax, eax
jne 0x40774c
mov eax, dword [0x4ad2f0]
cmp eax, dword [0x4ad2f4]
je 0x4076fe
mov cl, byte [esp + esi + 0x18]
mov edx, dword [0x4ad2ec]
mov byte [edx + eax], cl
mov eax, dword [0x4ad2f0]
mov ecx, dword [0x4ad2ec]
inc eax
inc esi
mov dword [0x4ad2f0], eax
mov byte [ecx + eax], 0
cmp esi, edi
jl 0x407693
xor esi, esi
cmp byte [0x4ad2e9], 0
je 0x4077b9
cmp byte [0x4ad2e5], 0
je 0x407784
cmp dword [0x4ad2d4], esi
jbe 0x407833
mov eax, dword [0x4ad2d0]
mov eax, dword [eax + esi*4]
mov ecx, dword [0x4ad2ec]
push eax
push ecx
call fcn.00486f12
add esp, 8
test eax, eax
jne 0x40776d
inc esi
cmp esi, dword [0x4ad2d4]
jb 0x407722
jmp 0x407833
mov dl, byte [esp + esi + 0x18]
mov dword [0x4ad2b8], 4
mov byte [0x4ad2cc], dl
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret
mov dword [0x4ad2b8], 3
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret
cmp dword [0x4ad2d4], esi
jbe 0x407833
mov edx, dword [0x4ad2d0]
mov eax, dword [edx + esi*4]
push eax
mov eax, dword [0x4ad2ec]
call fcn.00473530
add esp, 4
test eax, eax
jne 0x40776d
inc esi
cmp esi, dword [0x4ad2d4]
jb 0x407790
jmp 0x407833
cmp byte [0x4ad2e5], 0
je 0x4077fc
cmp dword [0x4ad2d4], esi
jbe 0x407833
lea ebx, [ebx]
mov ecx, dword [0x4ad2d0]
mov eax, dword [ecx + esi*4]
mov edx, dword [0x4ad2ec]
push eax
push edx
call fcn.00485f31
add esp, 8
test eax, eax
je 0x40776d
inc esi
cmp esi, dword [0x4ad2d4]
jb 0x4077d0
jmp 0x407833
cmp dword [0x4ad2d4], esi
jbe 0x407833
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea ebx, [ebx]
mov eax, dword [0x4ad2d0]
mov ecx, dword [eax + esi*4]
mov edx, dword [0x4ad2ec]
push ecx
push edx
call edi
test eax, eax
je 0x40776d
inc esi
cmp esi, dword [0x4ad2d4]
jb 0x407810
mov eax, dword [0x4ad2f4]
cmp dword [0x4ad2f0], eax
jl 0x40784a
mov dword [0x4ad2b8], 5
mov al, bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x174
ret