Function at 0x406b00
Capabilities:
Get keyboard layout
Log keystrokes via polling
Resolve function by parsing pe exports

Disassembly:
mov dl, byte [esp + 8]
mov ecx, dword [0x4c8f74]
sub esp, 0x18c
push ebx
push ebp
mov ebp, dword [0x4c96d8]
push edi
mov di, word [esp + 0x1a4]
cmp ebp, 1
jne 0x406b43
cmp byte [0x4c9708], 0
jne 0x406b43
movzx eax, dl
lea eax, [eax + eax*4]
cmp dword [ecx + eax*4], 0
jne 0x406b43
xor bl, bl
mov byte [esp + 0xf], bl
jmp 0x406b4c
mov byte [esp + 0xf], 1
mov bl, byte [esp + 0xf]
cmp byte [esp + 0x1a8], 0
je 0x406b75
movzx eax, dl
lea edx, [eax + eax*4]
cmp byte [ecx + edx*4 + 8], 0
mov al, 1
jne 0x407609
pop edi
pop ebp
mov al, bl
pop ebx
add esp, 0x18c
ret
cmp dword [0x4c8fa4], 0
je 0x406b91
cmp byte [esp + 0x1ac], 0
jne 0x406b91
mov byte [esp + 0x10], 1
test bl, bl
jne 0x406b96
mov byte [esp + 0x10], 0
mov bl, byte [0x4c8535]
push esi
cmp ebp, 1
jne 0x406c84
cmp byte [0x4c9706], 0
je 0x406bbd
cmp byte [esp + 0x1b0], 0
jne 0x406c84
mov byte [esp + 0x15], 1
cmp dl, 0xe7
je 0x406c65
mov ecx, dword [0x4c96dc]
mov esi, dword [0x4c96e0]
movzx eax, dl
mov al, byte [eax + ecx]
test al, al
jne 0x406beb
movzx eax, di
mov al, byte [eax + esi]
test al, al
je 0x406c65
mov cl, al
shr al, 2
shr cl, 1
and al, 1
and cl, 1
je 0x406c8b
test al, al
jne 0x406c0f
test bl, 0x30
jne 0x406c0f
test al, al
je 0x406c65
test bl, 0x30
jne 0x406c65
movzx eax, di
mov ebp, 4
mov dword [0x4c96d8], ebp
cmp byte [eax + esi], 0
mov byte [0x4c96e8], dl
setne al
mov byte [0x4c96ee], al
xor eax, eax
mov word [0x4c96ea], di
mov word [0x4c96ec], ax
test cl, cl
je 0x406c4e
mov byte [0x4c96ef], 1
test bl, 0x30
jne 0x406c53
mov byte [0x4c96ef], al
cmp byte [esp + 0x14], al
jne 0x406c65
cmp byte [0x4ca3fc], al
je 0x40761d
movzx eax, dl
mov dword [esp + 0x20], eax
add eax, 0xffffffdf
cmp eax, 0x84
ja case.0x406c7d.41
movzx ecx, byte [eax + 0x407674]
jmp dword [ecx*4 + 0x407668]
mov byte [esp + 0x15], 0
jmp 0x406c65
test al, al
je 0x406c0f
jmp 0x406c0a
pop esi
pop edi
pop ebp
mov al, 1
pop ebx
add esp, 0x18c
ret
cmp byte [esp + 0x14], 0
je case.0x406c7d.41
mov ecx, dword [0x4c7284]
test ecx, ecx
je 0x406cca
xor eax, eax
xor ecx, ecx
mov word [0x4c7288], ax
mov dword [0x4c7284], ecx
jmp 0x406cca
mov ecx, dword [0x4c7284]
test bl, bl
je 0x406cfd
cmp ebp, 1
jne 0x406cdc
cmp byte [0x4c9707], 0
jne 0x406cfd
cmp bl, 0x10
je 0x406cfd
cmp bl, 0x20
je 0x406cfd
cmp bl, 0x30
je 0x406cfd
test bl, 0xc
je 0x40761d
test bl, 3
je 0x40761d
cmp dl, 8
jne 0x406d6f
test bl, bl
jne 0x406d6f
cmp byte [esp + 0x15], bl
je 0x406d34
cmp ebp, 1
jne 0x406d34
cmp byte [0x4c9704], bl
je 0x406d34
mov eax, dword [0x4c9710]
test eax, eax
je 0x406d34
mov esi, dword [0x4c970c]
dec eax
xor edx, edx
mov dword [0x4c9710], eax
mov word [esi + eax*2], dx
cmp byte [esp + 0x14], 0
je 0x406d50
test ecx, ecx
je 0x406d50
dec ecx
xor eax, eax
mov dword [0x4c7284], ecx
mov word [ecx*2 + 0x4c7288], ax
cmp byte [0x4ca3fc], 0
je 0x406d60
mov byte [0x4ca3fc], 0
mov al, byte [esp + 0x13]
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x18c
ret
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, eax
xor esi, esi
mov dword [esp + 0x28], edi
test edi, edi
je 0x406db4
mov ebx, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push esi
push edi
call ebx
lea ecx, [esp + 0x34]
mov esi, eax
push ecx
push esi
mov dword [esp + 0x3c], 0x30
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x406db4
mov eax, dword [esp + 0x40]
test eax, eax
je 0x406db4
push 0
push eax
call ebx
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ebp, eax
mov dword [esp + 0x30], ebp
cmp dword [0x4ca408], edi
je 0x406dfe
push 0x1c
lea edx, [esp + 0x168]
push edx
push edi
mov dword [0x4ca408], edi
call dword [sym.imp.USER32.dll_GetClassNameW]
lea eax, [esp + 0x164]
push str.ApplicationFrameWindow
push eax
call fcn.0048dbf9
add esp, 8
test eax, eax
sete byte [0x4ca404]
mov bl, byte [0x4ca3fc]
mov ecx, 0x40
mov esi, 0x4c8558
lea edi, [esp + 0x64]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.USER32.dll_ToUnicodeEx]
test bl, bl
je 0x406e9b
cmp byte [0x4ca404], 0
je 0x406e9b
cmp byte [esp + 0x1a4], 0xe7
je 0x406e9b
mov al, byte [0x4ca402]
mov cl, byte [0x4ca403]
neg al
sbb al, al
and al, 0x20
neg cl
sbb cl, cl
and cl, 9
or al, cl
lea ecx, [esp + 0x64]
call fcn.004121e0
push ebp
push 0
push 2
lea edx, [esp + 0x24]
push edx
mov eax, ecx
movzx ecx, word [0x4ca400]
push eax
movzx edx, bl
push ecx
push edx
call esi
test eax, eax
jle 0x406e94
movzx edx, word [0x4ca400]
push ebp
push 0
push 2
lea eax, [esp + 0x24]
push eax
movzx eax, byte [0x4ca3fc]
lea ecx, [esp + 0x74]
push ecx
push edx
push eax
call esi
mov byte [0x4ca3fc], 0
mov al, byte [0x4c8535]
lea ecx, [esp + 0x64]
call fcn.004121e0
push 0x14
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x406ebc
or byte [esp + 0x78], 1
jmp 0x406ec1
and byte [esp + 0x78], 0xfe
cmp byte [esp + 0x1a4], 0xe7
jne 0x406ee3
mov cx, word [esp + 0x1a8]
mov eax, 1
mov dword [esp + 0x2c], eax
mov word [esp + 0x18], cx
jmp 0x406f1a
xor edx, edx
cmp dword [0x4c86c8], edx
push ebp
setne dl
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x68]
push edx
mov edx, dword [esp + 0x1a8]
push 2
push eax
mov eax, dword [edx + 4]
push ecx
mov ecx, dword [esp + 0x34]
push eax
push ecx
call esi
mov dword [esp + 0x2c], eax
test eax, eax
je 0x40761d
cmp byte [0x4ca3fc], 0
setne byte [esp + 0x27]
test eax, eax
jns 0x406fb3
mov bl, byte [esp + 0x13]
test bl, bl
je 0x407606
mov ax, word [esp + 0x1a8]
mov dl, byte [esp + 0x1a4]
mov word [0x4ca400], ax
mov al, byte [0x4c8535]
test al, 0x30
setne cl
mov byte [0x4ca3fc], dl
mov byte [0x4ca402], cl
test al, 3
je 0x406f74
mov byte [0x4ca403], 1
test al, 0xc
jne 0x406f7b
mov byte [0x4ca403], 0
xor edx, edx
cmp dword [0x4c86c8], edx
push ebp
setne dl
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x68]
push edx
mov edx, dword [esp + 0x1a8]
push 2
push eax
mov eax, dword [edx + 4]
push ecx
mov ecx, dword [esp + 0x34]
push eax
push ecx
call esi
pop esi
pop edi
pop ebp
mov al, bl
pop ebx
add esp, 0x18c
ret
test byte [0x4c8535], 3
jne 0x406fe3
mov eax, 0xd
cmp word [esp + 0x18], ax
jne 0x406fd2
mov edx, 0xa
mov word [esp + 0x18], dx
cmp word [esp + 0x1a], ax
jne 0x406fe3
mov eax, 0xa
mov word [esp + 0x1a], ax
cmp byte [esp + 0x14], 0
mov byte [esp + 0x17], 0
je 0x4073b3
mov eax, dword [esp + 0x28]
cmp eax, dword [0x4c7280]
je 0x40700f
xor ecx, ecx
mov dword [0x4c7280], eax
mov word [0x4c7288], cx
jmp 0x407061
mov ecx, dword [0x4c7284]
mov edx, 0x5a
sub edx, ecx
cmp edx, 3
jge 0x407061
mov eax, 0x4c72e2
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407030
sub eax, edx
sar eax, 1
mov dword [0x4c7284], eax
lea eax, [eax + eax + 2]
push eax
push 0x4c72e2
push 0x4c7288
call fcn.0048e670
mov ecx, dword [0x4c7284]
add esp, 0xc
mov dx, word [esp + 0x18]
mov word [ecx*2 + 0x4c7288], dx
inc ecx
cmp dword [esp + 0x2c], 1
mov dword [0x4c7284], ecx
jle 0x407090
mov ax, word [esp + 0x1a]
mov word [ecx*2 + 0x4c7288], ax
inc ecx
mov dword [0x4c7284], ecx
xor edx, edx
mov word [ecx*2 + 0x4c7288], dx
test ecx, ecx
je 0x4073b3
mov dword [esp + 0x28], edx
cmp dword [0x4c8fa8], edx
jbe 0x4073b3
mov ebx, dword [sym.imp.USER32.dll_CharLowerW]
jmp 0x4070c0
mov eax, dword [0x4c8fa4]
mov edx, dword [esp + 0x28]
mov ebp, dword [eax + edx*4]
cmp byte [ebp + 0x23], 0
jne 0x4071d2
cmp byte [ebp + 0x2a], 0
je 0x407115
movzx eax, byte [ebp + 0x22]
cmp ecx, eax
jle 0x4071d2
movzx eax, word [ecx*2 + 0x4c7286]
push eax
push str._____:____.___n__t
call fcn.0048ea0b
add esp, 8
test eax, eax
je 0x4071cc
mov ecx, dword [0x4c7284]
lea edi, [ecx*2 + 0x4c7284]
jmp 0x407128
movzx edx, byte [ebp + 0x22]
cmp ecx, edx
jl 0x4071d2
lea edi, [ecx*2 + 0x4c7286]
cmp byte [ebp + 0x26], 0
movzx edx, byte [ebp + 0x22]
mov eax, dword [ebp + 8]
lea esi, [eax + edx*2 - 2]
je 0x407154
cmp esi, eax
jb 0x407196
lea ecx, [ecx]
mov dx, word [edi]
cmp dx, word [esi]
jne 0x407196
sub esi, 2
sub edi, 2
cmp esi, eax
jae 0x407140
jmp 0x407196
cmp esi, eax
jb 0x407196
jmp 0x407166
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 0x40718a
sub esi, 2
sub edi, 2
cmp esi, dword [ebp + 8]
jae 0x407160
mov ecx, dword [0x4c7284]
mov ebx, dword [sym.imp.USER32.dll_CharLowerW]
cmp esi, dword [ebp + 8]
jae 0x4071d2
cmp byte [ebp + 0x2b], 0
jne 0x4071b9
cmp edi, 0x4c7288
jb 0x4071b9
movzx edx, word [edi]
push edx
call fcn.00407700
add esp, 4
test al, al
jne 0x4071cc
mov eax, dword [ebp + 4]
mov esi, dword [ebp + 0x10]
push eax
call fcn.004098b0
add esp, 4
test eax, eax
jne 0x4071ec
mov ecx, dword [0x4c7284]
mov eax, dword [esp + 0x28]
inc eax
mov dword [esp + 0x28], eax
cmp eax, dword [0x4c8fa8]
jb 0x4070c0
jmp 0x4073b3
movzx edx, byte [ebp + 0x21]
mov ecx, dword [esp + 0x1b4]
mov eax, dword [esp + 0x1a0]
mov eax, dword [eax + 0x10]
add ecx, 4
push edx
call fcn.0040a4d0
add esp, 4
test al, al
je 0x4073b3
cmp byte [ebp + 0x27], 0
jne 0x407222
xor edi, edi
jmp 0x4072fd
cmp byte [ebp + 0x2a], 0
mov ebx, dword [0x4c7284]
lea ebx, [ebx*2 + 0x4c7288]
je 0x407238
sub ebx, 2
movzx ecx, byte [ebp + 0x22]
add ecx, ecx
mov esi, ebx
sub esi, ecx
mov dword [esp + 0x20], 0
mov byte [esp + 0x16], 0
mov byte [esp + 0x14], 0
cmp esi, ebx
jae 0x4072a6
mov edi, dword [sym.imp.USER32.dll_IsCharUpperW]
mov edi, edi
movzx edx, word [esi]
push edx
call dword [sym.imp.USER32.dll_IsCharLowerW]
test eax, eax
jne 0x407278
movzx eax, word [esi]
push eax
call edi
test eax, eax
je 0x407297
cmp byte [esp + 0x16], 0
jne 0x407293
movzx ecx, word [esi]
push ecx
mov byte [esp + 0x1a], 1
call edi
test eax, eax
je 0x407293
mov byte [esp + 0x14], 1
inc dword [esp + 0x20]
add esi, 2
cmp esi, ebx
jb 0x407260
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4072aa
xor edi, edi
jmp 0x4072fd
cmp eax, 1
jne 0x4072bd
movzx edi, byte [esp + 0x14]
neg edi
sbb edi, edi
and edi, 2
jmp 0x4072fd
cmp byte [esp + 0x14], 0
jne 0x4072c8
xor edi, edi
jmp 0x4072fd
movzx edx, byte [ebp + 0x22]
add edx, edx
mov esi, ebx
sub esi, edx
mov edi, 2
cmp esi, ebx
jae 0x4072f6
jmp 0x4072e0
movzx eax, word [esi]
push eax
call dword [sym.imp.USER32.dll_IsCharLowerW]
test eax, eax
jne 0x4072f4
add esi, edi
cmp esi, ebx
jb 0x4072e0
cmp esi, ebx
jne 0x4072fd
mov edi, 1
mov dl, byte [ebp + 0x28]
test dl, dl
jne 0x407309
cmp byte [ebp + 0x29], dl
je 0x407313
mov byte [esp + 0x13], 0
mov byte [esp + 0x17], 1
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1b8]
mov dword [ecx], eax
mov al, byte [ebp + 0x2a]
test al, al
je 0x407337
mov ecx, dword [0x4c7284]
movzx ecx, word [ecx*2 + 0x4c7286]
jmp 0x407339
xor ecx, ecx
movzx esi, di
movzx ecx, cx
shl esi, 0x10
or esi, ecx
mov ecx, dword [esp + 0x1bc]
mov dword [ecx], esi
xor ecx, ecx
cmp dword [ebp + 0xc], ecx
je 0x407380
test al, al
je 0x407378
mov edx, dword [0x4c7284]
mov ax, word [edx*2 + 0x4c7286]
mov word [0x4c7288], ax
mov dword [0x4c7284], 1
jmp 0x407398
mov dword [0x4c7284], ecx
jmp 0x407398
test dl, dl
je 0x407398
movzx edx, byte [ebp + 0x22]
sub dword [0x4c7284], edx
test al, al
je 0x407398
dec dword [0x4c7284]
cmp byte [ebp + 0x2c], cl
je 0x4073a3
mov dword [0x4c7284], ecx
mov ecx, dword [0x4c7284]
xor eax, eax
mov word [ecx*2 + 0x4c7288], ax
cmp byte [esp + 0x27], 0
mov bl, byte [esp + 0x13]
je 0x407425
test bl, bl
je 0x407425
push 0x100
lea edx, [esp + 0x68]
push 0
push edx
call fcn.00496ad0
mov al, byte [0x4ca402]
mov cl, byte [0x4ca403]
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 + 0x64]
call fcn.004121e0
mov edx, dword [esp + 0x30]
push edx
movzx edx, word [0x4ca400]
push 0
push 2
lea eax, [esp + 0x3c]
push eax
movzx eax, byte [0x4ca3fc]
push ecx
push edx
push eax
call dword [sym.imp.USER32.dll_ToUnicodeEx]
mov byte [0x4ca3fc], 0
cmp byte [esp + 0x15], 0
je 0x407606
cmp dword [0x4c96d8], 1
jne 0x407606
cmp byte [esp + 0x17], 0
jne 0x407606
mov edi, dword [esp + 0x2c]
xor esi, esi
test edi, edi
jle 0x4074ca
jmp 0x407460
cmp byte [0x4c9705], 0
mov ecx, dword [0x4c96e4]
je 0x407480
movzx eax, word [esp + esi*2 + 0x18]
push eax
push ecx
call fcn.0048ea0b
add esp, 8
jmp 0x40748a
mov ax, word [esp + esi*2 + 0x18]
call fcn.00474c90
test eax, eax
jne 0x40751a
mov eax, dword [0x4c9710]
cmp eax, dword [0x4c9714]
je 0x4074ca
mov dx, word [esp + esi*2 + 0x18]
mov ecx, dword [0x4c970c]
mov word [ecx + eax*2], dx
mov eax, dword [0x4c9710]
mov ecx, dword [0x4c970c]
inc eax
xor edx, edx
inc esi
mov dword [0x4c9710], eax
mov word [ecx + eax*2], dx
cmp esi, edi
jl 0x407460
xor esi, esi
cmp byte [0x4c9709], 0
je 0x407586
cmp byte [0x4c9705], 0
je 0x407554
cmp dword [0x4c96f4], esi
jbe 0x4075ee
mov edi, edi
mov eax, dword [0x4c96f0]
mov eax, dword [eax + esi*4]
mov ecx, dword [0x4c970c]
push eax
push ecx
call fcn.0048ea32
add esp, 8
test eax, eax
jne 0x40753d
inc esi
cmp esi, dword [0x4c96f4]
jb 0x4074f0
jmp 0x4075ee
mov dx, word [esp + esi*2 + 0x18]
pop esi
pop edi
pop ebp
mov al, bl
mov dword [0x4c96d8], 4
mov word [0x4c96ec], dx
pop ebx
add esp, 0x18c
ret
pop esi
pop edi
pop ebp
mov al, bl
mov dword [0x4c96d8], 3
pop ebx
add esp, 0x18c
ret
cmp dword [0x4c96f4], esi
jbe 0x4075ee
mov edx, dword [0x4c970c]
mov eax, dword [0x4c96f0]
mov eax, dword [eax + esi*4]
push edx
call fcn.00474ce0
add esp, 4
test eax, eax
jne 0x40753d
inc esi
cmp esi, dword [0x4c96f4]
jb 0x407560
jmp 0x4075ee
cmp byte [0x4c9705], 0
je 0x40762c
mov ebx, dword [0x4c96f4]
test ebx, ebx
je 0x4075ea
mov edi, dword [0x4c970c]
mov ebp, dword [0x4c96f0]
lea esp, [esp]
mov ecx, dword [ebp + esi*4]
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4075dc
test dx, dx
je 0x4075d8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4075dc
add eax, 4
add ecx, 4
test dx, dx
jne 0x4075b6
xor eax, eax
jmp 0x4075e1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x407613
inc esi
cmp esi, ebx
jb 0x4075b0
mov bl, byte [esp + 0x13]
mov ecx, dword [0x4c9714]
cmp dword [0x4c9710], ecx
jl 0x407606
mov dword [0x4c96d8], 5
mov al, bl
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x18c
ret
mov dword [0x4c96d8], 3
mov al, byte [esp + 0x13]
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x18c
ret
cmp dword [0x4c96f4], esi
jbe 0x4075ee
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
lea ebx, [ebx]
mov ecx, dword [0x4c96f0]
mov edx, dword [ecx + esi*4]
mov eax, dword [0x4c970c]
push edx
push eax
call edi
test eax, eax
je 0x40753d
inc esi
cmp esi, dword [0x4c96f4]
jb 0x407640
jmp 0x4075ee