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

Disassembly:
sub esp, 0x15c
push ebx
push ebp
push esi
push edi
mov edi, dword [0x4fb958]
mov bh, dl
xor al, al
mov edx, ecx
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
test edi, edi
je 0x410c97
mov ebp, dword [esp + 0x170]
nop dword [eax]
cmp dword [edi], 1
jne 0x410c8c
mov bl, byte [edi + 0x3c]
test bl, bl
je 0x410bfc
mov eax, dword [edx + 0x10]
dec bl
mov esi, 0xffc3d44d
mov ecx, 0x65
sub esi, eax
lea edx, [eax + 0x3c2c17]
movzx eax, bl
cmp edx, 0x66
cmovbe ecx, esi
cmp ecx, eax
mov eax, dword [esp + 0x14]
jle 0x410c88
cmp byte [esp + 0x174], 0
je 0x410c75
mov eax, dword [edi + 8]
test eax, eax
je 0x410c50
cmp dword [eax + 0x368], 0
je 0x410c50
movzx ecx, bp
movzx esi, bh
mov al, byte [ecx + edi + 0x154]
mov dl, byte [esi + edi + 0x54]
or al, dl
test al, 0x20
jne 0x410c38
cmp byte [edi + 0x43], 0
je 0x410c50
test dl, 0x40
jne 0x410c50
shl ecx, 0x10
or ecx, esi
push ecx
push edi
push 0x41e
push dword [0x4fb968]
call dword [sym.imp.USER32.dll_PostMessageA]
movzx ecx, bp
mov al, byte [ecx + edi + 0x154]
test al, al
js 0x410d63
movzx ecx, bh
mov al, byte [ecx + edi + 0x54]
test al, al
js 0x410d50
mov eax, dword [esp + 0x14]
cmp byte [edi + 0x40], 0
mov ecx, 1
movzx eax, al
cmovne eax, ecx
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x18]
mov edi, dword [edi + 4]
test edi, edi
jne 0x410bc0
cmp byte [esp + 0x174], 0
jne 0x4110a9
mov dl, byte [0x4fc2d6]
mov bl, 1
test dl, 0xcf
je 0x410cca
test al, al
jne 0x410cca
test dl, 0xc
setne cl
test dl, 3
setne al
and cl, al
neg cl
sbb cl, cl
and bl, cl
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov ebp, eax
xor esi, esi
test ebp, ebp
je 0x410d0b
mov edi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push esi
push ebp
call edi
mov esi, eax
mov dword [esp + 0x38], 0x30
lea eax, [esp + 0x38]
push eax
push esi
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x410d0b
mov eax, dword [esp + 0x44]
test eax, eax
je 0x410d0b
push 0
push eax
call edi
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov dword [esp + 0x14], eax
cmp dword [0x4ff508], ebp
je 0x410d79
push 0x1c
lea eax, [esp + 0x20]
mov dword [0x4ff508], ebp
push eax
push ebp
call dword [sym.imp.USER32.dll_GetClassNameA]
lea eax, [esp + 0x1c]
push str.ApplicationFrameWindow
push eax
call fcn.004c408e
add esp, 8
test eax, eax
sete al
mov byte [0x4ff505], al
jmp 0x410d7e
and al, 0x7f
mov byte [ecx + edi + 0x54], al
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x15c
ret
and al, 0x7f
mov byte [ecx + edi + 0x154], al
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x15c
ret
mov al, byte [0x4ff505]
xor ecx, ecx
lea edi, [esp + 0x68]
cmp byte [0x4ff504], 0
mov esi, 0x4fc2d8
mov word [esp + 0x10], cx
mov byte [esp + 0x12], cl
mov ecx, 0x40
rep movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.USER32.dll_ToAsciiEx]
je 0x410e23
test al, al
je 0x410e23
cmp bh, 0xe7
je 0x410e23
mov dl, byte [0x4ff502]
lea ecx, [esp + 0x68]
mov al, byte [0x4ff503]
neg dl
sbb dl, dl
and dl, 0x20
neg al
sbb al, al
and al, 9
or dl, al
call fcn.0041d1e0
mov edi, dword [esp + 0x14]
lea eax, [esp + 0x10]
push edi
push 0
push eax
lea eax, [esp + 0x74]
push eax
movzx eax, word [0x4ff500]
push eax
movzx eax, byte [0x4ff504]
push eax
call esi
test eax, eax
jle 0x410e1a
push edi
push 0
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x74]
push eax
movzx eax, word [0x4ff500]
push eax
movzx eax, byte [0x4ff504]
push eax
call esi
mov byte [0x4ff504], 0
jmp 0x410e27
mov edi, dword [esp + 0x14]
mov dl, byte [0x4fc2d6]
lea ecx, [esp + 0x68]
call fcn.0041d1e0
push 0x14
call dword [sym.imp.USER32.dll_GetKeyState]
test al, 1
je 0x410e49
or byte [esp + 0x7c], 1
jmp 0x410e4e
and byte [esp + 0x7c], 0xfe
cmp bh, 0xe7
jne 0x410e79
push 0
push 0
push 3
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x28]
push 1
add eax, 4
push eax
push 0x400
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov esi, eax
jmp 0x410eef
test bl, bl
je 0x410ecf
xor eax, eax
cmp dword [0x4fb938], eax
push edi
setne al
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x74]
push eax
mov eax, dword [esp + 0x28]
push dword [eax + 4]
movzx eax, bh
push eax
call esi
test byte [0x4fc2d6], 3
mov esi, eax
jne 0x410ed1
cmp byte [esp + 0x10], 0xd
mov edx, 0xa
movzx ecx, byte [esp + 0x10]
cmove ecx, edx
cmp byte [esp + 0x11], 0xd
mov byte [esp + 0x10], cl
jne 0x410ed1
mov byte [esp + 0x11], dl
jmp 0x410ed1
xor esi, esi
cmp bh, 8
jne 0x410eef
test esi, esi
je 0x410eef
cmp byte [0x4ff505], 0
je 0x410eee
xor esi, esi
mov byte [0x4ff504], 0
jmp 0x410eef
dec esi
push ecx
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x14]
push esi
push eax
push dword [esp + 0x17c]
mov dl, bh
call fcn.004114b0
add esp, 0x10
test al, al
je 0x410d6c
mov bl, byte [0x4ff504]
test bl, bl
je 0x410f5e
test esi, esi
jle 0x410f5e
mov byte [esp + 0x14], 1
cmp dword [0x4fc44c], 0
je 0x411044
cmp byte [esp + 0x178], 0
jne 0x411044
movzx eax, bh
add eax, 0xfffffff8
cmp eax, 0x20
ja case.0x410f57.9
movzx eax, byte [eax + 0x4110c4]
jmp dword [eax*4 + 0x4110b8]
mov byte [esp + 0x14], 0
test esi, esi
jns 0x410f26
mov eax, dword [esp + 0x170]
mov word [0x4ff500], ax
mov al, byte [0x4fc2d6]
test al, 0x30
mov byte [0x4ff504], bh
push edi
setne byte [0x4ff502]
test al, 0xc
setne cl
test al, 3
setne al
and cl, al
xor eax, eax
cmp dword [0x4fb938], eax
mov byte [0x4ff503], cl
setne al
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x74]
push eax
mov eax, dword [esp + 0x28]
push dword [eax + 4]
movzx eax, bh
push eax
mov eax, dword [sym.imp.USER32.dll_ToAsciiEx]
call eax
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x15c
ret
cmp dword [0x4fbb08], 0
je case.0x410f57.9
mov byte [0x4fbb10], 0
mov dword [0x4fbb08], 0
jmp case.0x410f57.9
cmp byte [0x4fc2d6], 0
jne case.0x410f57.9
mov eax, dword [0x4fbb08]
test eax, eax
je case.0x410f57.9
dec eax
mov dword [0x4fbb08], eax
mov byte [eax + 0x4fbb10], 0
test esi, esi
jle 0x411044
push dword [esp + 0x184]
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x14]
push dword [esp + 0x184]
push dword [esp + 0x184]
push ebp
push esi
call fcn.004110f0
add esp, 0x14
test al, al
je 0x410d6c
mov bl, byte [0x4ff504]
cmp byte [esp + 0x14], 0
je 0x4110a9
push 0x100
lea eax, [esp + 0x6c]
push 0
push eax
call fcn.004c22a0
mov dl, byte [0x4ff502]
lea ecx, [esp + 0x74]
mov al, byte [0x4ff503]
add esp, 0xc
neg dl
sbb dl, dl
and dl, 0x20
neg al
sbb al, al
and al, 9
or dl, al
call fcn.0041d1e0
push edi
push 0
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x74]
push eax
movzx eax, word [0x4ff500]
push eax
movzx eax, bl
push eax
mov eax, dword [sym.imp.USER32.dll_ToAsciiEx]
call eax
mov byte [0x4ff504], 0
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x15c
ret