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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x118
mov eax, dword [0x465520]
push esi
mov esi, dword [0x464dc0]
cmp esi, 1
jne 0x40b332
cmp byte [0x464dec], 0
jne 0x40b332
movzx ecx, byte [ebp + 0xc]
lea ecx, [ecx + ecx*8]
shl ecx, 5
cmp dword [ecx + eax], 0
mov byte [ebp - 1], 0
je 0x40b336
mov byte [ebp - 1], 1
cmp byte [ebp + 0x14], 0
je 0x40b35b
movzx ecx, byte [ebp + 0xc]
lea ecx, [ecx + ecx*8]
shl ecx, 5
cmp byte [ecx + eax + 4], 0
mov al, 1
jne 0x40bb4b
mov al, byte [ebp - 1]
jmp 0x40bb4b
cmp dword [0x466050], 0
je 0x40b374
cmp byte [ebp + 0x18], 0
jne 0x40b374
cmp byte [ebp - 1], 0
mov byte [ebp + 0x17], 1
jne 0x40b378
mov byte [ebp + 0x17], 0
cmp esi, 1
push ebx
mov bl, byte [0x46439c]
push edi
mov di, word [ebp + 0x10]
jne 0x40b3d3
cmp byte [0x464dea], 0
je 0x40b398
cmp byte [ebp + 0x18], 0
jne 0x40b3d3
movzx eax, byte [ebp + 0xc]
mov ecx, dword [0x464dc4]
mov al, byte [eax + ecx]
test al, al
mov edx, dword [0x464dc8]
mov byte [ebp - 3], 1
jne 0x40b3bd
movzx eax, di
mov al, byte [eax + edx]
test al, al
je 0x40b3d7
mov cl, al
shr cl, 1
shr al, 2
and cl, 1
and al, 1
test cl, cl
je 0x40b40d
test al, al
je 0x40b411
jmp 0x40b423
mov byte [ebp - 3], 0
mov al, byte [ebp + 0xc]
cmp al, 0x21
jb 0x40b48d
cmp al, 0x28
jbe 0x40b470
cmp al, 0x5a
jbe 0x40b48d
cmp al, 0x5c
jbe 0x40b406
cmp al, 0x9f
jbe 0x40b48d
cmp al, 0xa5
ja 0x40b48d
mov al, 1
jmp 0x40bb49
test al, al
je 0x40b423
test cl, cl
je 0x40b41a
test bl, 0x30
jne 0x40b423
test al, al
je 0x40b3d7
test bl, 0x30
jne 0x40b3d7
push 4
movzx eax, di
pop esi
mov dword [0x464dc0], esi
cmp byte [eax + edx], 0
mov word [0x464dce], di
setne al
test cl, cl
mov byte [0x464dd0], al
mov al, byte [ebp + 0xc]
mov byte [0x464dcc], al
je 0x40b45a
test bl, 0x30
mov byte [0x464dd1], 1
jne 0x40b461
mov byte [0x464dd1], 0
cmp byte [ebp + 0x17], 0
jne 0x40b3da
jmp 0x40bb46
cmp byte [ebp + 0x17], 0
je 0x40b48d
cmp dword [0x464110], 0
je 0x40b48d
and dword [0x464110], 0
mov byte [0x464118], 0
test bl, bl
je 0x40b4bb
cmp esi, 1
jne 0x40b49f
cmp byte [0x464deb], 0
jne 0x40b4bb
cmp bl, 0x10
je 0x40b4bb
cmp bl, 0x20
je 0x40b4bb
test bl, 0xc
je 0x40bb46
test bl, 3
je 0x40bb46
cmp al, 8
jne 0x40b522
test bl, bl
jne 0x40b522
cmp byte [ebp - 3], bl
je 0x40b4ed
cmp esi, 1
jne 0x40b4ed
cmp byte [0x464de8], bl
je 0x40b4ed
mov eax, dword [0x464df4]
test eax, eax
je 0x40b4ed
mov ecx, dword [0x464df0]
dec eax
mov dword [0x464df4], eax
mov byte [ecx + eax], bl
cmp byte [ebp + 0x17], 0
je 0x40b509
mov eax, dword [0x464110]
test eax, eax
je 0x40b509
dec eax
mov dword [0x464110], eax
mov byte [eax + 0x464118], 0
cmp byte [0x46552e], 0
je 0x40bb46
mov byte [0x46552e], 0
jmp 0x40bb46
push pe_nt_image_headers32
lea eax, [ebp - 0x118]
push 0x4643a0
push eax
call fcn.00454280
xor eax, eax
mov al, byte [0x46439c]
push eax
lea eax, [ebp - 0x118]
push eax
call fcn.004103f5
add esp, 0x14
push 0x14
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x40b564
or byte [ebp - 0x104], 1
jmp 0x40b56b
and byte [ebp - 0x104], 0xfe
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov esi, eax
xor eax, eax
cmp esi, eax
je 0x40b581
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
mov bl, byte [ebp + 0xc]
xor eax, eax
cmp dword [0x4644e8], eax
setne al
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x118]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 4]
movzx eax, bl
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
test eax, eax
mov dword [ebp - 0x18], eax
je 0x40bb46
cmp byte [0x46552e], 0
je 0x40b5d5
cmp bl, 9
je 0x40b5d5
cmp bl, 0x1b
mov byte [ebp - 2], 1
jne 0x40b5d9
mov byte [ebp - 2], 0
xor eax, eax
cmp dword [ebp - 0x18], eax
jge 0x40b624
cmp byte [ebp - 2], al
jne 0x40b624
cmp byte [ebp - 1], al
je 0x40b61d
mov al, byte [0x46439c]
test al, 0x30
setne cl
test al, 3
mov byte [0x46552e], bl
mov word [0x46552c], di
mov byte [0x465529], cl
je 0x40b616
test al, 0xc
mov byte [0x465528], 1
jne 0x40b61d
mov byte [0x465528], 0
xor al, al
jmp 0x40bb49
cmp byte [ebp - 8], 0xd
jne 0x40b62e
mov byte [ebp - 8], 0xa
cmp byte [ebp - 7], 0xd
jne 0x40b638
mov byte [ebp - 7], 0xa
cmp byte [ebp + 0x17], 0
mov byte [ebp - 4], 0
je 0x40b967
cmp esi, dword [0x46410c]
je 0x40b65d
mov dword [0x46410c], esi
mov byte [0x464118], 0
jmp 0x40b691
mov eax, dword [0x464110]
push 0x46
pop ecx
sub ecx, eax
cmp ecx, 3
jge 0x40b691
mov esi, 0x46413b
push esi
call fcn.00454880
mov dword [0x464110], eax
inc eax
push eax
push esi
push 0x464118
call fcn.00454a70
mov eax, dword [0x464110]
add esp, 0x10
mov cl, byte [ebp - 8]
mov byte [eax + 0x464118], cl
inc eax
cmp dword [ebp - 0x18], 1
mov dword [0x464110], eax
jle 0x40b6b5
mov cl, byte [ebp - 7]
mov byte [eax + 0x464118], cl
inc eax
mov dword [0x464110], eax
test eax, eax
mov byte [eax + 0x464118], 0
je 0x40b967
and dword [ebp - 0x14], 0
cmp dword [0x466054], 0
jbe 0x40b967
mov ecx, dword [0x466050]
mov edx, dword [ebp - 0x14]
mov esi, dword [ecx + edx*4]
cmp byte [esi + 0x22], 0
jne 0x40b7bd
cmp byte [esi + 0x2a], 0
movzx ecx, byte [esi + 0x21]
je 0x40b726
cmp eax, ecx
jle 0x40b7bd
movsx eax, byte [eax + 0x464117]
push eax
push str._____:____.___n__t
call fcn.004549b0
test eax, eax
pop ecx
pop ecx
je 0x40b7b8
mov eax, dword [0x464110]
lea edx, [eax + 0x464116]
jmp 0x40b734
cmp eax, ecx
jl 0x40b7bd
lea edx, [eax + 0x464117]
cmp byte [esi + 0x25], 0
movzx edi, byte [esi + 0x21]
mov ecx, dword [esi + 4]
mov dword [ebp + 0x14], edx
lea edi, [edi + ecx - 1]
jne 0x40b7dc
cmp edi, ecx
jb 0x40b77e
movzx eax, byte [edx]
mov ebx, dword [sym.imp.USER32.dll_CharLowerA]
push eax
call ebx
movzx ecx, byte [edi]
push ecx
mov dword [ebp - 0xc], eax
call ebx
mov ecx, dword [ebp - 0xc]
cmp ecx, eax
mov edx, dword [ebp + 0x14]
jne 0x40b779
dec edx
dec edi
cmp edi, dword [esi + 4]
mov dword [ebp + 0x14], edx
jae 0x40b750
mov eax, dword [0x464110]
cmp edi, dword [esi + 4]
jae 0x40b7bd
cmp byte [esi + 0x2b], 0
jne 0x40b7a0
cmp edx, 0x464118
jb 0x40b7a0
xor eax, eax
mov al, byte [edx]
push eax
call dword [sym.imp.USER32.dll_IsCharAlphaNumericA]
test eax, eax
jne 0x40b7b8
push dword [esi + 0x10]
xor eax, eax
mov al, byte [esi + 0x20]
push dword [esi + 0xc]
push eax
call fcn.0040e1db
add esp, 0xc
test eax, eax
jne 0x40b7e2
mov eax, dword [0x464110]
inc dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [0x466054]
jb 0x40b6d5
jmp 0x40b967
mov bl, byte [edx]
cmp bl, byte [edi]
jne 0x40b77e
dec edx
dec edi
cmp edi, ecx
jae 0x40b7d4
jmp 0x40b77e
cmp byte [esi + 0x26], 0
jne 0x40b7ef
xor ebx, ebx
jmp 0x40b8a6
cmp byte [esi + 0x2a], 0
mov eax, dword [0x464110]
lea eax, [eax + 0x464118]
mov dword [ebp - 0x10], eax
je 0x40b806
dec dword [ebp - 0x10]
movzx eax, byte [esi + 0x21]
mov edi, dword [ebp - 0x10]
and dword [ebp - 0xc], 0
sub edi, eax
xor bl, bl
cmp edi, dword [ebp - 0x10]
mov byte [ebp + 0x17], 0
jae 0x40b7e8
xor eax, eax
mov al, byte [edi]
push eax
call dword [sym.imp.USER32.dll_IsCharLowerA]
test eax, eax
jne 0x40b83a
mov al, byte [edi]
push eax
call dword [sym.imp.USER32.dll_IsCharUpperA]
test eax, eax
je 0x40b858
cmp byte [ebp + 0x17], 0
jne 0x40b855
xor eax, eax
mov al, byte [edi]
mov byte [ebp + 0x17], 1
push eax
call dword [sym.imp.USER32.dll_IsCharUpperA]
test eax, eax
je 0x40b855
mov bl, 1
inc dword [ebp - 0xc]
inc edi
cmp edi, dword [ebp - 0x10]
jb 0x40b81e
cmp dword [ebp - 0xc], 0
je 0x40b7e8
cmp dword [ebp - 0xc], 1
jne 0x40b873
neg bl
sbb ebx, ebx
and ebx, 2
jmp 0x40b8a6
test bl, bl
je 0x40b7e8
movzx eax, byte [esi + 0x21]
mov edi, dword [ebp - 0x10]
push 2
pop ebx
sub edi, eax
jmp 0x40b899
xor eax, eax
mov al, byte [edi]
push eax
call dword [sym.imp.USER32.dll_IsCharLowerA]
test eax, eax
jne 0x40b89e
inc edi
cmp edi, dword [ebp - 0x10]
jb 0x40b889
cmp edi, dword [ebp - 0x10]
jne 0x40b8a6
xor ebx, ebx
inc ebx
cmp byte [esi + 0x27], 0
jne 0x40b8b2
cmp byte [esi + 0x28], 0
je 0x40b8ba
mov byte [ebp - 1], 0
mov byte [ebp - 4], 1
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
cmp byte [esi + 0x2a], 0
je 0x40b8dc
cmp byte [esi + 0x27], 0
je 0x40b8dc
mov eax, dword [0x464110]
movzx eax, byte [eax + 0x464117]
jmp 0x40b8ef
cmp byte [ebp - 2], 0
je 0x40b8ed
cmp byte [ebp - 4], 0
je 0x40b8ed
xor eax, eax
inc eax
jmp 0x40b8ef
xor eax, eax
movzx ecx, bx
movzx eax, ax
shl ecx, 0x10
or ecx, eax
mov eax, dword [ebp + 0x20]
mov dword [eax], ecx
mov eax, dword [esi + 8]
cmp byte [eax], 0
je 0x40b932
cmp byte [esi + 0x2a], 0
je 0x40b929
mov eax, dword [0x464110]
mov al, byte [eax + 0x464117]
mov byte [0x464118], al
mov dword [0x464110], 1
jmp 0x40b94e
and dword [0x464110], 0
jmp 0x40b94e
cmp byte [esi + 0x27], 0
je 0x40b94e
movzx eax, byte [esi + 0x21]
sub dword [0x464110], eax
cmp byte [esi + 0x2a], 0
je 0x40b94e
dec dword [0x464110]
cmp byte [esi + 0x2c], 0
je 0x40b95b
and dword [0x464110], 0
mov eax, dword [0x464110]
mov byte [eax + 0x464118], 0
cmp byte [ebp - 2], 0
je 0x40ba61
cmp byte [ebp - 1], 0
mov al, byte [0x46552e]
mov byte [ebp - 0x14], al
mov byte [0x46552e], 0
je 0x40ba61
mov cl, byte [0x46439c]
mov byte [0x465504], al
xor al, al
test cl, 0x10
je 0x40b9a0
mov al, 0xa0
jmp 0x40b9a7
test cl, 0x20
je 0x40b9ac
mov al, 0xa1
mov byte [ebp - 0xc], al
jmp 0x40b9b0
mov byte [ebp - 0xc], 0xa0
test al, al
mov al, byte [0x465529]
setne byte [ebp + 0x17]
cmp al, byte [ebp + 0x17]
mov esi, 0xffc3d44d
je 0x40b9dc
xor ecx, ecx
push esi
push ecx
push ecx
push ecx
push dword [ebp - 0xc]
test al, al
sete cl
push ecx
call fcn.00411044
add esp, 0x18
cmp byte [0x465528], 0
je 0x40bb4e
test byte [0x46439c], 8
jne 0x40bb4e
push esi
xor edi, edi
push edi
push edi
push edi
push 0xa5
push edi
mov bl, 1
call fcn.00411044
add esp, 0x18
xor eax, eax
mov ax, word [0x46552c]
push 0xffc3d44e
push edi
push edi
push eax
push dword [ebp - 0x14]
push 2
call fcn.00411044
add esp, 0x18
test bl, bl
je 0x40ba40
push esi
push edi
push edi
push edi
push 0xa5
push 1
call fcn.00411044
add esp, 0x18
mov al, byte [0x465529]
cmp al, byte [ebp + 0x17]
je 0x40ba61
push esi
xor ecx, ecx
push edi
test al, al
push edi
setne cl
push edi
push dword [ebp - 0xc]
push ecx
call fcn.00411044
add esp, 0x18
cmp byte [ebp - 3], 0
je 0x40bb46
cmp dword [0x464dc0], 1
jne 0x40bb46
cmp byte [ebp - 4], 0
jne 0x40bb46
mov eax, dword [0x464df4]
cmp eax, dword [0x464df8]
jge 0x40bab0
mov ecx, dword [0x464df0]
mov dl, byte [ebp - 8]
mov byte [ecx + eax], dl
inc dword [0x464df4]
mov eax, dword [0x464df0]
mov ecx, dword [0x464df4]
mov byte [eax + ecx], 0
cmp dword [ebp - 0x18], 1
jle 0x40bae4
mov eax, dword [0x464df4]
cmp eax, dword [0x464df8]
jge 0x40bae4
mov ecx, dword [0x464df0]
mov dl, byte [ebp - 7]
mov byte [ecx + eax], dl
inc dword [0x464df4]
mov eax, dword [0x464df0]
mov ecx, dword [0x464df4]
mov byte [eax + ecx], 0
mov eax, dword [0x464dd8]
test eax, eax
je 0x40bb2f
xor esi, esi
cmp byte [0x464ded], 0
je 0x40bb7f
cmp byte [0x464de9], 0
je 0x40bb57
test eax, eax
jbe 0x40bb2f
mov eax, dword [0x464dd4]
push dword [eax + esi*4]
push dword [0x464df0]
call fcn.00454910
test eax, eax
pop ecx
pop ecx
jne 0x40bbe1
inc esi
cmp esi, dword [0x464dd8]
jb 0x40bb09
mov eax, dword [0x464df8]
cmp dword [0x464df4], eax
jl 0x40bb46
mov dword [0x464dc0], 5
mov al, byte [ebp - 1]
pop edi
pop ebx
pop esi
leave
ret
xor bl, bl
xor edi, edi
jmp 0x40ba0c
test eax, eax
jbe 0x40bb2f
mov eax, dword [0x464dd4]
push dword [eax + esi*4]
push dword [0x464df0]
call fcn.004385d1
test eax, eax
pop ecx
pop ecx
jne 0x40bbe1
inc esi
cmp esi, dword [0x464dd8]
jb 0x40bb5b
jmp 0x40bb2f
cmp byte [0x464de9], 0
je 0x40bbb3
test eax, eax
jbe 0x40bb2f
mov eax, dword [0x464dd4]
push dword [eax + esi*4]
push dword [0x464df0]
call fcn.004545c0
test eax, eax
pop ecx
pop ecx
je 0x40bbe1
inc esi
cmp esi, dword [0x464dd8]
jb 0x40bb8c
jmp 0x40bb2f
test eax, eax
jbe 0x40bb2f
mov eax, dword [0x464dd4]
push dword [eax + esi*4]
push dword [0x464df0]
call dword [sym.imp.KERNEL32.DLL_lstrcmpiA]
test eax, eax
je 0x40bbe1
inc esi
cmp esi, dword [0x464dd8]
jb 0x40bbbb
jmp 0x40bb2f
mov dword [0x464dc0], 3
jmp 0x40bb46