Function at 0x401927
Capabilities:
Log keystrokes via polling

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x268
call sym.___main
lea eax, [ebp - 0x30]
mov ecx, eax
call fcn.0040498c
lea edx, [ebp - 0x130]
mov eax, 0
mov ecx, 0x40
mov edi, edx
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x228]
mov dword [esp + 4], 1
mov dword [esp], str.keypress_log.txt
mov ecx, eax
call sym.std::basic_ofstream_char__std::char_traits_char___::basic_ofstream_char_const__std::_Ios_Openmode_
sub esp, 8
lea eax, [ebp - 0x228]
mov ecx, eax
call sym.std::basic_ofstream_char__std::char_traits_char___::is_open__
xor eax, 1
test al, al
je 0x4019c3
mov dword [esp + 4], str.Error_opening_log_file_
mov dword [esp], sym.imp.libstdc_6.dll_std::cerr
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], sym.std::basic_ostream_char__std::char_traits_char____std::endl_char__std::char_traits_char____std::basic_ostream_char__std::char_traits_char____
mov ecx, eax
call sym.std::ostream::operator___std::ostream____std::ostream__
sub esp, 4
mov ebx, 1
jmp 0x401c69
mov dword [esp + 4], str.Press_any_key_to_log_it_along_with_the_timestamp__Press_ESC_to_exit_._n
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
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 [ebp - 0x1c], 0
cmp dword [ebp - 0x1c], 0xff
jg 0x401b49
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._GetAsyncKeyState_4
sub esp, 4
shr ax, 0xf
test al, al
je 0x401b32
lea edx, [ebp - 0x130]
mov eax, dword [ebp - 0x1c]
add eax, edx
movzx eax, byte [eax]
xor eax, 1
test al, al
je 0x401b22
lea eax, [ebp - 0x240]
mov dword [esp], eax
call sym.get_current_time_formatted_abi:cxx11___
lea eax, [ebp - 0x258]
mov edx, dword [ebp - 0x1c]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym.key_to_string_abi:cxx11__int_
mov dword [esp + 4], str.Key:
lea eax, [ebp - 0x228]
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 edx, eax
lea eax, [ebp - 0x258]
mov dword [esp + 4], eax
mov dword [esp], edx
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_
mov dword [esp + 4], str._pressed_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_
mov edx, eax
lea eax, [ebp - 0x240]
mov dword [esp + 4], eax
mov dword [esp], edx
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_
mov dword [esp + 4], 0x4061a6
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 eax, [ebp - 0x228]
mov ecx, eax
call sym.std::ostream::flush__
mov dword [esp + 4], str.Key:
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
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 edx, eax
lea eax, [ebp - 0x258]
mov dword [esp + 4], eax
mov dword [esp], edx
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_
mov dword [esp + 4], str._pressed_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_
mov edx, eax
lea eax, [ebp - 0x240]
mov dword [esp + 4], eax
mov dword [esp], edx
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_
mov dword [esp + 4], 0x4061a6
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 eax, [ebp - 0x258]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
lea eax, [ebp - 0x240]
mov ecx, eax
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::basic_string__
lea edx, [ebp - 0x130]
mov eax, dword [ebp - 0x1c]
add eax, edx
mov byte [eax], 1
jmp 0x401b40
lea edx, [ebp - 0x130]
mov eax, dword [ebp - 0x1c]
add eax, edx
mov byte [eax], 0
add dword [ebp - 0x1c], 1
jmp 0x4019de
mov dword [esp], 0x1b
call sym._GetAsyncKeyState_4
sub esp, 4
shr ax, 0xf
test al, al
je 0x401b76
mov dword [esp + 4], str.ESC_key_pressed._Exiting..._n
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
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_
jmp 0x401b8a
mov dword [esp], 0xa
call sym._Sleep_4
sub esp, 4
jmp 0x4019d7
lea eax, [ebp - 0x228]
mov ecx, eax
call sym.std::basic_ofstream_char__std::char_traits_char___::close__
mov dword [esp + 4], str._nSummary_of_key_presses:_n
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
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 eax, [ebp - 0x30]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov ecx, eax
call sym.std::vector_std::pair_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_______std::allocator_std::pair_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_________::begin__
mov dword [ebp - 0x25c], eax
mov eax, dword [ebp - 0x20]
mov ecx, eax
call method.std::vector_std::pair_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_______std::allocator_std::pair_std::__cxx11::basic_string_char__std:
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x260]
mov dword [esp + 4], eax
lea eax, [ebp - 0x25c]
mov dword [esp], eax
call sym.__ZN9__gnu_cxxneIPSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_ESt6vectorIS8_SaIS8_EEEEbRKNS_17__normal_iter
test al, al
je 0x401c64
lea eax, [ebp - 0x25c]
mov ecx, eax
call method.__gnu_cxx::__normal_iterator_std::pair_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_______std::vector_std::pair_std::__cxx11::basic_st
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
lea esi, [eax + 0x18]
mov ebx, dword [ebp - 0x24]
mov dword [esp + 4], str.Key:
mov dword [esp], sym.imp.libstdc_6.dll_std::cout
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], ebx
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_
mov dword [esp + 4], str._pressed_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_
mov dword [esp + 4], esi
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_
mov dword [esp + 4], 0x4061a6
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 eax, [ebp - 0x25c]
mov ecx, eax
call sym.__gnu_cxx::__normal_iterator_std::pair_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_______std::vector_std::pair_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_______std::allocator_std::pair_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___________::operator__
jmp 0x401bd1
mov ebx, 0
lea eax, [ebp - 0x228]
mov ecx, eax
call sym.std::basic_ofstream_char__std::char_traits_char___::basic_ofstream__
lea eax, [ebp - 0x30]
mov ecx, eax
call sym.std::vector_std::pair_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_______std::allocator_std::pair_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_____std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char_________::vector__
mov eax, ebx
jmp 0x401ccd
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret