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

Disassembly:
mov ecx, dword [0x4c8edc]
sub esp, 0x120
push ebx
mov bl, byte [esp + 0x12c]
push ebp
mov bp, word [esp + 0x134]
push edi
mov edi, dword [0x4ca5f0]
cmp edi, 1
jne 0x406fb6
cmp byte [0x4ca620], 0
jne 0x406fb6
movzx eax, bl
lea eax, [eax + eax*8]
shl eax, 5
cmp dword [eax + ecx], 0
mov byte [esp + 0xe], 0
je 0x406fbb
mov byte [esp + 0xe], 1
cmp byte [esp + 0x13c], 0
je 0x406fe9
movzx eax, bl
lea edx, [eax + eax*8]
shl edx, 5
cmp byte [edx + ecx + 4], 0
mov al, 1
jne 0x4079d0
mov al, byte [esp + 0xe]
pop edi
pop ebp
pop ebx
add esp, 0x120
ret
cmp dword [0x4c9ea4], 0
je 0x407001
test dl, dl
jne 0x407001
mov byte [esp + 0xf], 1
cmp byte [esp + 0xe], dl
jne 0x407006
mov byte [esp + 0xf], 0
mov al, byte [0x4c84a5]
push esi
cmp edi, 1
jne 0x4070e8
cmp byte [0x4ca61e], 0
je 0x407026
test dl, dl
jne 0x4070e8
mov byte [esp + 0x14], 1
cmp bl, 0xe7
je 0x4070c7
mov edx, dword [0x4ca5f4]
mov esi, dword [0x4ca5f8]
movzx ecx, bl
mov cl, byte [ecx + edx]
test cl, cl
jne 0x407054
movzx ecx, bp
mov cl, byte [ecx + esi]
test cl, cl
je 0x4070c7
mov dl, cl
shr cl, 2
shr dl, 1
and cl, 1
and dl, 1
je 0x4070ef
test cl, cl
jne 0x407077
test al, 0x30
jne 0x407077
test cl, cl
je 0x4070c7
test al, 0x30
jne 0x4070c7
movzx ecx, bp
mov edi, 4
mov dword [0x4ca5f0], edi
cmp byte [ecx + esi], 0
mov byte [0x4ca600], bl
setne cl
mov byte [0x4ca606], cl
xor ecx, ecx
mov word [0x4ca602], bp
mov word [0x4ca604], cx
test dl, dl
je 0x4070b7
mov byte [0x4ca607], 1
test al, 0x30
jne 0x4070bd
mov byte [0x4ca607], cl
cmp byte [esp + 0x13], cl
je 0x4079cb
movzx ebx, byte [esp + 0x138]
lea ecx, [ebx - 0x21]
cmp ecx, 0x84
ja case.0x4070e1.41
movzx edx, byte [ecx + 0x4079e8]
jmp dword [edx*4 + 0x4079dc]
mov byte [esp + 0x14], 0
jmp 0x4070c7
test cl, cl
je 0x407077
jmp 0x407073
pop esi
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 0x120
ret
cmp byte [esp + 0x13], 0
je case.0x4070e1.41
mov ecx, dword [0x4c71f4]
test ecx, ecx
je 0x40712d
xor ecx, ecx
mov word [0x4c71f8], cx
mov dword [0x4c71f4], ecx
jmp 0x40712d
mov ecx, dword [0x4c71f4]
test al, al
je 0x407157
cmp edi, 1
jne 0x40713f
cmp byte [0x4ca61f], 0
jne 0x407157
cmp al, 0x10
je 0x407157
cmp al, 0x20
je 0x407157
test al, 0xc
je 0x4079cb
test al, 3
je 0x4079cb
cmp byte [esp + 0x138], 8
jne 0x4071d2
test al, al
jne 0x4071d2
cmp byte [esp + 0x14], al
je 0x407193
cmp edi, 1
jne 0x407193
cmp byte [0x4ca61c], al
je 0x407193
mov eax, dword [0x4ca628]
test eax, eax
je 0x407193
mov esi, dword [0x4ca624]
dec eax
xor edx, edx
mov dword [0x4ca628], eax
mov word [esi + eax*2], dx
cmp byte [esp + 0x13], 0
je 0x4071af
test ecx, ecx
je 0x4071af
dec ecx
xor eax, eax
mov dword [0x4c71f4], ecx
mov word [ecx*2 + 0x4c71f8], ax
cmp byte [0x4cb2e0], 0
je 0x4079cb
mov al, byte [esp + 0x12]
pop esi
pop edi
pop ebp
mov byte [0x4cb2e0], 0
pop ebx
add esp, 0x120
ret
mov ecx, 0x40
mov esi, 0x4c84c8
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x30]
call fcn.00411b50
push 0x14
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x4071fe
or byte [esp + 0x44], 1
jmp 0x407203
and byte [esp + 0x44], 0xfe
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ebp, eax
test ebp, ebp
je 0x40721a
push 0
push ebp
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x40721c
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
cmp byte [esp + 0x138], 0xe7
mov edi, dword [sym.imp.USER32.dll_ToUnicodeEx]
mov esi, eax
mov dword [esp + 0x2c], esi
jne 0x407251
mov cx, word [esp + 0x13c]
mov eax, 1
mov dword [esp + 0x28], eax
mov word [esp + 0x18], cx
jmp 0x407284
xor edx, edx
cmp dword [0x4c8634], edx
push esi
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 ebx
call edi
mov dword [esp + 0x28], eax
test eax, eax
je 0x4079cb
cmp byte [0x4cb2e0], 0
mov cl, byte [esp + 0x138]
je 0x4072a3
cmp cl, 9
je 0x4072a3
mov byte [esp + 0x17], 1
cmp cl, 0x1b
jne 0x4072a8
mov byte [esp + 0x17], 0
test eax, eax
jns 0x407328
cmp byte [esp + 0x12], 0
je 0x4079cb
mov al, byte [0x4c84a5]
test al, 0x30
mov byte [0x4cb2e0], cl
mov cx, word [esp + 0x13c]
setne dl
mov word [0x4cb2e4], cx
mov byte [0x4cb2e6], dl
test al, 3
je 0x4072eb
mov byte [0x4cb2e7], 1
test al, 0xc
jne 0x4072f2
mov byte [0x4cb2e7], 0
xor eax, eax
cmp dword [0x4c8634], eax
push esi
setne al
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x34]
push eax
mov eax, dword [esp + 0x13c]
push 2
push ecx
mov ecx, dword [eax + 4]
push edx
push ecx
push ebx
call edi
mov al, byte [esp + 0x12]
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x120
ret
test byte [0x4c84a5], 3
jne 0x407358
mov eax, 0xd
cmp word [esp + 0x18], ax
jne 0x407347
mov edx, 0xa
mov word [esp + 0x18], dx
cmp word [esp + 0x1a], ax
jne 0x407358
mov eax, 0xa
mov word [esp + 0x1a], ax
cmp byte [esp + 0x13], 0
mov byte [esp + 0x15], 0
je 0x407736
cmp ebp, dword [0x4c71f0]
je 0x407381
xor ecx, ecx
mov dword [0x4c71f0], ebp
mov word [0x4c71f8], cx
jmp 0x4073d1
mov ecx, dword [0x4c71f4]
mov edx, 0x5a
sub edx, ecx
cmp edx, 3
jge 0x4073d1
mov eax, 0x4c7252
lea edx, [eax + 2]
jmp 0x4073a0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4073a0
sub eax, edx
sar eax, 1
mov dword [0x4c71f4], eax
lea eax, [eax + eax + 2]
push eax
push 0x4c7252
push 0x4c71f8
call fcn.0048e080
mov ecx, dword [0x4c71f4]
add esp, 0xc
mov dx, word [esp + 0x18]
mov word [ecx*2 + 0x4c71f8], dx
inc ecx
cmp dword [esp + 0x28], 1
mov dword [0x4c71f4], ecx
jle 0x407400
mov ax, word [esp + 0x1a]
mov word [ecx*2 + 0x4c71f8], ax
inc ecx
mov dword [0x4c71f4], ecx
xor edx, edx
mov word [ecx*2 + 0x4c71f8], dx
test ecx, ecx
je 0x407736
mov dword [esp + 0x24], edx
cmp dword [0x4c9ea8], edx
jbe 0x407736
mov ebx, dword [sym.imp.USER32.dll_CharLowerW]
jmp 0x407430
mov eax, dword [0x4c9ea4]
mov edx, dword [esp + 0x24]
mov ebp, dword [eax + edx*4]
cmp byte [ebp + 0x1e], 0
jne 0x407550
cmp byte [ebp + 0x26], 0
je 0x407485
movzx eax, byte [ebp + 0x1d]
cmp ecx, eax
jle 0x407550
movzx eax, word [ecx*2 + 0x4c71f6]
push eax
push str._____:____.___n__t
call fcn.0048e3e1
add esp, 8
test eax, eax
je 0x40754a
mov ecx, dword [0x4c71f4]
lea edi, [ecx*2 + 0x4c71f4]
jmp 0x407498
movzx edx, byte [ebp + 0x1d]
cmp ecx, edx
jl 0x407550
lea edi, [ecx*2 + 0x4c71f6]
cmp byte [ebp + 0x21], 0
movzx edx, byte [ebp + 0x1d]
mov eax, dword [ebp + 4]
lea esi, [eax + edx*2 - 2]
je 0x4074c4
cmp esi, eax
jb 0x407506
lea ecx, [ecx]
mov dx, word [edi]
cmp dx, word [esi]
jne 0x407506
sub esi, 2
sub edi, 2
cmp esi, eax
jae 0x4074b0
jmp 0x407506
cmp esi, eax
jb 0x407506
jmp 0x4074d6
mov ebx, dword [sym.imp.USER32.dll_CharLowerW]
movzx eax, word [esi]
push eax
call ebx
movzx ecx, word [edi]
push ecx
mov dword [esp + 0x24], eax
call ebx
mov ecx, dword [esp + 0x20]
cmp ax, cx
jne 0x4074fa
sub esi, 2
sub edi, 2
cmp esi, dword [ebp + 4]
jae 0x4074d0
mov ecx, dword [0x4c71f4]
mov ebx, dword [sym.imp.USER32.dll_CharLowerW]
cmp esi, dword [ebp + 4]
jae 0x407550
cmp byte [ebp + 0x27], 0
jne 0x407529
cmp edi, 0x4c71f8
jb 0x407529
movzx edx, word [edi]
push edx
call fcn.00407a70
add esp, 4
test al, al
jne 0x40754a
mov eax, dword [ebp]
test eax, eax
je 0x407535
mov eax, dword [eax + 4]
jmp 0x40753a
mov eax, 0x4a1840
mov esi, dword [ebp + 0xc]
push eax
call fcn.004099f0
add esp, 4
test eax, eax
jne 0x40756a
mov ecx, dword [0x4c71f4]
mov eax, dword [esp + 0x24]
inc eax
mov dword [esp + 0x24], eax
cmp eax, dword [0x4c9ea8]
jb 0x407430
jmp 0x407736
movzx eax, byte [ebp + 0x1c]
mov edx, dword [esp + 0x134]
mov ecx, dword [esp + 0x144]
push eax
mov eax, dword [edx + 0x10]
add ecx, 4
call fcn.0040a590
add esp, 4
test al, al
je 0x407736
cmp byte [ebp + 0x22], 0
jne 0x4075a0
xor edi, edi
jmp 0x40767d
cmp byte [ebp + 0x26], 0
mov ebx, dword [0x4c71f4]
lea ebx, [ebx*2 + 0x4c71f8]
je 0x4075b6
sub ebx, 2
movzx eax, byte [ebp + 0x1d]
add eax, eax
mov esi, ebx
sub esi, eax
mov dword [esp + 0x20], 0
mov byte [esp + 0x16], 0
mov byte [esp + 0x13], 0
cmp esi, ebx
jae 0x407626
mov edi, dword [sym.imp.USER32.dll_IsCharUpperW]
lea esp, [esp]
movzx ecx, word [esi]
push ecx
call dword [sym.imp.USER32.dll_IsCharLowerW]
test eax, eax
jne 0x4075f8
movzx edx, word [esi]
push edx
call edi
test eax, eax
je 0x407617
cmp byte [esp + 0x16], 0
jne 0x407613
movzx eax, word [esi]
push eax
mov byte [esp + 0x1a], 1
call edi
test eax, eax
je 0x407613
mov byte [esp + 0x13], 1
inc dword [esp + 0x20]
add esi, 2
cmp esi, ebx
jb 0x4075e0
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x40762a
xor edi, edi
jmp 0x40767d
cmp eax, 1
jne 0x40763d
movzx edi, byte [esp + 0x13]
neg edi
sbb edi, edi
and edi, 2
jmp 0x40767d
cmp byte [esp + 0x13], 0
jne 0x407648
xor edi, edi
jmp 0x40767d
movzx ecx, byte [ebp + 0x1d]
add ecx, ecx
mov esi, ebx
sub esi, ecx
mov edi, 2
cmp esi, ebx
jae 0x407676
jmp 0x407660
movzx edx, word [esi]
push edx
call dword [sym.imp.USER32.dll_IsCharLowerW]
test eax, eax
jne 0x407674
add esi, edi
cmp esi, ebx
jb 0x407660
cmp esi, ebx
jne 0x40767d
mov edi, 1
mov dl, byte [ebp + 0x23]
test dl, dl
jne 0x407689
cmp byte [ebp + 0x24], dl
je 0x407693
mov byte [esp + 0x12], 0
mov byte [esp + 0x15], 1
mov eax, dword [esp + 0x148]
mov ecx, dword [esp + 0x24]
mov dword [eax], ecx
mov al, byte [ebp + 0x26]
test al, al
je 0x4076b7
mov ecx, dword [0x4c71f4]
movzx ecx, word [ecx*2 + 0x4c71f6]
jmp 0x4076b9
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 esi, dword [ebp + 8]
xor ecx, ecx
cmp word [esi], cx
je 0x407703
test al, al
je 0x4076fb
mov edx, dword [0x4c71f4]
mov ax, word [edx*2 + 0x4c71f6]
mov word [0x4c71f8], ax
mov dword [0x4c71f4], 1
jmp 0x40771b
mov dword [0x4c71f4], ecx
jmp 0x40771b
test dl, dl
je 0x40771b
movzx edx, byte [ebp + 0x1d]
sub dword [0x4c71f4], edx
test al, al
je 0x40771b
dec dword [0x4c71f4]
cmp byte [ebp + 0x28], cl
je 0x407726
mov dword [0x4c71f4], ecx
mov ecx, dword [0x4c71f4]
xor eax, eax
mov word [ecx*2 + 0x4c71f8], ax
cmp byte [esp + 0x17], 0
je 0x4077a9
cmp byte [esp + 0x12], 0
mov bl, byte [0x4cb2e0]
mov byte [0x4cb2e0], 0
je 0x4077a9
push 0x100
lea edx, [esp + 0x34]
push 0
push edx
call fcn.004964e0
mov al, byte [0x4cb2e6]
mov cl, byte [0x4cb2e7]
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.00411b50
mov edx, dword [esp + 0x2c]
push edx
movzx edx, word [0x4cb2e4]
push 0
push 2
lea eax, [esp + 0x38]
push eax
push ecx
movzx eax, bl
push edx
push eax
call dword [sym.imp.USER32.dll_ToUnicodeEx]
cmp byte [esp + 0x14], 0
je 0x4079cb
cmp dword [0x4ca5f0], 1
jne 0x4079cb
cmp byte [esp + 0x15], 0
jne 0x4079cb
mov edi, dword [esp + 0x28]
xor esi, esi
test edi, edi
jle 0x40784a
jmp 0x4077e0
cmp byte [0x4ca61d], 0
mov ecx, dword [0x4ca5fc]
je 0x407800
movzx eax, word [esp + esi*2 + 0x18]
push eax
push ecx
call fcn.0048e3e1
add esp, 8
jmp 0x40780a
mov ax, word [esp + esi*2 + 0x18]
call fcn.004747b0
test eax, eax
jne 0x40789a
mov eax, dword [0x4ca628]
cmp eax, dword [0x4ca62c]
je 0x40784a
mov dx, word [esp + esi*2 + 0x18]
mov ecx, dword [0x4ca624]
mov word [ecx + eax*2], dx
mov eax, dword [0x4ca628]
mov ecx, dword [0x4ca624]
inc eax
xor edx, edx
inc esi
mov dword [0x4ca628], eax
mov word [ecx + eax*2], dx
cmp esi, edi
jl 0x4077e0
xor esi, esi
cmp byte [0x4ca621], 0
je 0x407919
cmp byte [0x4ca61d], 0
je 0x4078d8
cmp dword [0x4ca60c], esi
jbe 0x4079b3
mov edi, edi
mov eax, dword [0x4ca608]
mov eax, dword [eax + esi*4]
mov ecx, dword [0x4ca624]
push eax
push ecx
call fcn.0048e408
add esp, 8
test eax, eax
jne 0x4078bf
inc esi
cmp esi, dword [0x4ca60c]
jb 0x407870
jmp 0x4079b3
mov dx, word [esp + esi*2 + 0x18]
mov al, byte [esp + 0x12]
pop esi
pop edi
pop ebp
mov dword [0x4ca5f0], 4
mov word [0x4ca604], dx
pop ebx
add esp, 0x120
ret
mov al, byte [esp + 0x12]
pop esi
pop edi
pop ebp
mov dword [0x4ca5f0], 3
pop ebx
add esp, 0x120
ret
cmp dword [0x4ca60c], esi
jbe 0x4079b3
jmp 0x4078f0
mov edx, dword [0x4ca624]
mov eax, dword [0x4ca608]
mov eax, dword [eax + esi*4]
push edx
call fcn.00474800
add esp, 4
test eax, eax
jne 0x4078bf
inc esi
cmp esi, dword [0x4ca60c]
jb 0x4078f0
jmp 0x4079b3
cmp byte [0x4ca61d], 0
je 0x40797f
mov ebp, dword [0x4ca60c]
test ebp, ebp
je 0x4079b3
mov edi, dword [0x4ca624]
mov ebx, dword [0x4ca608]
lea esp, [esp]
mov ecx, dword [ebx + esi*4]
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40796b
test dx, dx
je 0x407967
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40796b
add eax, 4
add ecx, 4
test dx, dx
jne 0x407945
xor eax, eax
jmp 0x407970
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4078bf
inc esi
cmp esi, ebp
jb 0x407940
jmp 0x4079b3
cmp dword [0x4ca60c], esi
jbe 0x4079b3
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
lea ecx, [ecx]
mov ecx, dword [0x4ca608]
mov edx, dword [ecx + esi*4]
mov eax, dword [0x4ca624]
push edx
push eax
call edi
test eax, eax
je 0x4078bf
inc esi
cmp esi, dword [0x4ca60c]
jb 0x407990
mov ecx, dword [0x4ca62c]
cmp dword [0x4ca628], ecx
jl 0x4079cb
mov dword [0x4ca5f0], 5
mov al, byte [esp + 0x12]
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x120
ret