Function at 0x435180
Capabilities:
Log keystrokes
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x4352d5
mov edi, dword [0x5a4160]
test edi, edi
je 0x4352d5
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x435700
lea esi, [ebp - 0x2c]
mov ebx, dword [0x5a4168]
mov edx, dword [ebx + 4]
mov eax, dword [ebx]
cmp edx, eax
jne 0x435707
mov ebx, dword [sym.imp.KERNEL32.dll_ReadConsoleInputA]
lea esi, [esi]
lea eax, [ebp - 0x48]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [ebp - 0x48], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], esi
mov dword [esp], edi
call ebx
sub esp, 0x10
test eax, eax
je 0x435360
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x435caf
cmp eax, 1
jne 0x435cbb
movzx eax, word [ebp - 0x2c]
cmp ax, 4
je 0x435384
cmp ax, 1
jne 0x4351d0
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x4351d0
movzx eax, word [ebp - 0x24]
test ax, ax
je 0x435d05
movzx edx, byte [ebp - 0x1e]
movzx ebx, word [ebp - 0x22]
mov byte [ebp - 0x54], dl
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x4c], edx
and edx, 0xc
je 0x4352b0
test byte [ebp - 0x4c], 3
je 0x4352b0
cmp byte [ebp - 0x54], 0
je 0x4352b0
test byte [ebp - 0x4c], 1
jne 0x435392
mov edx, dword [ebp - 0x4c]
test dl, 2
je 0x4352b0
and edx, 8
jne 0x435470
mov ecx, dword [ebp - 0x4c]
mov edx, ecx
and ecx, 0xfffffff9
and edx, 0xfffffffd
test byte [ebp - 0x4c], 4
cmovne edx, ecx
mov dword [ebp - 0x4c], edx
lea esi, [esi]
mov edx, dword [ebp - 0x4c]
and edx, 0x100
mov dword [ebp - 0x50], edx
je 0x435345
lea edx, [ebx - 0xd]
cmp dx, 0x62
ja case.0x435352.2
movzx edx, dx
jmp dword [edx*4 + 0x56f850]
cmp dword [ebp + 0x10], 0x1000
ja 0x435479
mov eax, dword [ebp + 0x10]
mov dword [esp], ebx
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
call sym._read
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], 2
mov dword [esp], 0x6e
call dword [sym.imp.USER32.dll_MapVirtualKeyA]
sub esp, 8
test byte [ebp - 0x4c], 0x10
je case.0x4352ce.33
test al, al
jne 0x435334
cmp byte [ebp - 0x54], 0
je 0x435628
movzx eax, byte [ebp - 0x54]
mov byte [ebp - 0x3c], al
movzx eax, word [ebp - 0x24]
mov edx, 1
jmp 0x43551e
lea edx, [ebx - 8]
cmp dx, 0xda
ja case.0x435352.2
movzx edx, dx
jmp dword [edx*4 + 0x56f9dc]
test byte [0x5a4058], 0x80
jne 0x43539b
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
mov dword [eax], 5
lea esp, [ebp - 0xc]
mov eax, 0xffffffff
pop ebx
pop esi
pop edi
pop ebp
ret
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 4
jmp 0x435377
and dword [ebp - 0x4c], 0xfffffff6
jmp 0x4352b0
call dbg.android::base::GetMinimumLogSeverity()
mov ebx, dword [sym.imp.msvcrt.dll__errno]
cmp eax, 1
jg 0x43536f
call ebx
lea edi, [ebp - 0x3c]
lea esi, [ebp - 0x44]
mov edx, dword [eax]
mov dword [ebp - 0x4c], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x40]
mov dword [esp], ecx
mov dword [esp + 4], eax
call dbg.android::base::SystemErrorCodeToString(int)
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], str._get_key_event_record:_ReadConsoleInputA___failed:__s_n
mov dword [esp], edi
mov dword [esp + 8], eax
call dbg.android::base::StringPrintf(char const*, ::)
mov ecx, esi
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0x4c1
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
call dbg.android::base::LogMessage::LogMessage(char const*, unsigned int, android::base::LogId, android::base::LogSeverity, char const*, int)
mov ecx, esi
sub esp, 0x18
call dbg.android::base::LogMessage::stream()
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ecx - 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], edx
call dbg.std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)
mov ecx, esi
call dbg.android::base::LogMessage::~LogMessage()
mov eax, dword [ebp - 0x3c]
mov dword [esp], esi
lea ecx, [eax - 0xc]
call dbg.std::string::_Rep::_M_dispose(std::allocator<char> const&)
mov eax, dword [ebp - 0x40]
lea ecx, [eax - 0xc]
sub esp, 4
mov dword [esp], edi
call dbg.std::string::_Rep::_M_dispose(std::allocator<char> const&)
sub esp, 4
call ebx
mov edx, dword [ebp - 0x4c]
mov dword [eax], edx
jmp 0x43536f
and dword [ebp - 0x4c], 0xfffffff5
jmp 0x4352b0
xor edx, edx
mov eax, ebx
call sym._get_console_handle_int__unsigned_long_
test eax, eax
mov eax, 0x1000
cmove eax, dword [ebp + 0x10]
mov dword [ebp + 0x10], eax
jmp 0x4352e2
test byte [ebp - 0x4c], 0xc
mov ebx, 0x56f699
mov ecx, 0x56f697
mov edx, 1
cmove ebx, ecx
nop
lea esi, [esi]
sub eax, 1
mov word [ebp - 0x24], ax
lea eax, [ebx + edx]
mov dword [ebp - 0x4c], edi
mov edi, eax
nop
mov ecx, dword [0x5a4168]
mov eax, dword [ecx + 4]
mov byte [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call dbg.void std::vector<char, std::allocator<char> >::_M_range_insert<char const*>(__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > >, char const*, char const*, std::forward_iterator_tag)
movzx eax, word [ebp - 0x24]
lea edx, [eax - 1]
mov word [ebp - 0x24], dx
sub esp, 0x10
test ax, ax
jne 0x4354c0
mov edi, dword [ebp - 0x4c]
jmp 0x4351b0
mov ecx, dword [ebp - 0x4c]
mov edx, 0x22
mov dword [esp], str.e_6
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
test edx, edx
je case.0x435352.2
movzx eax, word [ebp - 0x24]
lea ecx, [eax - 1]
test ax, ax
mov word [ebp - 0x24], cx
lea ebx, [ebp - 0x3c]
jne 0x4354b7
jmp 0x4351b0
mov ecx, dword [ebp - 0x4c]
mov edx, 0x21
mov dword [esp], str.e_5
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x2e
mov dword [esp], str.e_3
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x2d
mov dword [esp], str.e_2
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x28
mov dword [esp], 0x56f75c
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x27
mov dword [esp], 0x56f758
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x26
mov dword [esp], 0x56f754
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x25
mov dword [esp], 0x56f750
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov edx, 3
mov ebx, 0x56f6af
jmp 0x4354b0
mov edx, 3
mov ebx, 0x56f6b3
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56f6ad
jmp 0x4354b0
test byte [0x5a4058], 0x80
je 0x4351b0
call dbg.android::base::GetMinimumLogSeverity()
cmp eax, 1
jg 0x4351b0
mov edx, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x54], edx
call edx
mov edx, dword [ebp - 0x50]
mov ecx, 0x56f665
test edx, edx
mov eax, dword [eax]
mov dword [esp + 8], ebx
lea ebx, [ebp - 0x44]
mov dword [esp + 4], str._console_read:_unknown_virtual_key_code:__d__enhanced:__s
mov dword [ebp - 0x4c], eax
mov eax, 0x56f66a
cmovne eax, ecx
lea ecx, [ebp - 0x40]
mov dword [esp + 0xc], eax
mov dword [esp], ecx
call dbg.android::base::StringPrintf(char const*, ::)
mov ecx, ebx
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], 0x7a0
mov dword [esp], str.system_core_adb_sysdeps_win32.cpp
call dbg.android::base::LogMessage::LogMessage(char const*, unsigned int, android::base::LogId, android::base::LogSeverity, char const*, int)
mov ecx, ebx
sub esp, 0x18
call dbg.android::base::LogMessage::stream()
mov ecx, dword [ebp - 0x40]
mov edx, dword [ecx - 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], edx
call dbg.std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, int)
mov ecx, ebx
call dbg.android::base::LogMessage::~LogMessage()
mov ecx, dword [ebp - 0x40]
mov dword [esp], ebx
sub ecx, 0xc
call dbg.std::string::_Rep::_M_dispose(std::allocator<char> const&)
mov edx, dword [ebp - 0x54]
sub esp, 4
call edx
mov edx, dword [ebp - 0x4c]
mov dword [eax], edx
jmp 0x4351b0
xor eax, eax
jmp 0x4352f8
sub edx, eax
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
cmp edx, dword [ebp + 0x10]
cmova edx, dword [ebp + 0x10]
mov dword [esp], eax
mov dword [esp + 8], edx
mov esi, edx
call sym._memcpy
mov edx, dword [ebx]
lea edi, [edx + esi]
cmp edx, edi
je 0x435744
mov ecx, dword [ebx + 4]
xor eax, eax
cmp edi, ecx
je 0x43573f
sub ecx, edi
jne 0x435cc7
add eax, edx
mov dword [ebx + 4], eax
mov eax, esi
jmp 0x4352f8
test byte [ebp - 0x4c], 0x10
je case.0x4352ce.32
mov byte [ebp - 0x3c], 0x30
jmp 0x43533b
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x28]
lea eax, [ebp - 0x3c]
call sym._get_control_character_char___KEY_EVENT_RECORD_const__unsigned_long_
test byte [ebp - 0x4c], 3
mov edx, eax
je 0x435512
test edx, edx
je case.0x435352.2
lea eax, [ebp - 0x3c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x3b]
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [ebp - 0x4c], edx
call sym._memmove
mov edx, dword [ebp - 0x4c]
mov byte [ebp - 0x3c], 0x1b
add edx, 1
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
lea edx, [ebp - 0x28]
lea eax, [ebp - 0x3c]
call sym._get_control_character_char___KEY_EVENT_RECORD_const__unsigned_long_
test byte [ebp - 0x4c], 3
mov edx, eax
je 0x435512
test byte [ebp - 0x4c], 0xc
je 0x435778
test byte [ebp - 0x4c], 0x10
jne 0x435778
nop
jmp 0x435512
mov eax, dword [ebp - 0x4c]
mov edx, ebx
movzx ecx, word [ebp - 0x20]
mov dword [esp + 8], 0x12
mov dword [esp + 4], eax
lea eax, [ebp - 0x1e]
mov dword [esp], eax
lea eax, [ebp - 0x3c]
call sym._get_char_ignoring_modifier_char___KEY_EVENT_RECORD_const__unsigned_long__unsigned_short___clone_.isra.131_
test byte [ebp - 0x4c], 3
mov edx, eax
je 0x435512
jmp 0x435778
mov edx, 1
mov ebx, 0x56f688
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56f672
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56f686
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56f684
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56f682
jmp 0x4354b0
mov edx, 1
mov ebx, str.517_9864320
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56f680
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56f674
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56f67e
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56f67c
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56f67a
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56f678
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56f676
jmp 0x4354b0
mov eax, dword [ebp - 0x4c]
mov edx, 0x6e
movzx ecx, word [ebp - 0x20]
mov dword [esp + 8], 0x11
mov dword [esp + 4], eax
lea eax, [ebp - 0x1e]
mov dword [esp], eax
lea eax, [ebp - 0x3c]
call sym._get_char_ignoring_modifier_char___KEY_EVENT_RECORD_const__unsigned_long__unsigned_short___clone_.isra.131_
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x70
mov dword [esp], 0x56f76a
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x71
mov dword [esp], 0x56f76e
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x72
mov dword [esp], 0x56f772
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x73
mov dword [esp], 0x56f776
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x74
mov dword [esp], str.e_15
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x75
mov dword [esp], str.e_17
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x76
mov dword [esp], str.e_18
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x77
mov dword [esp], str.e_19
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x78
mov dword [esp], str.e_20
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x79
mov dword [esp], str.e_21
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x7a
mov dword [esp], str.e_23
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x7b
mov dword [esp], str.e_24
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x7c
mov dword [esp], str.e_25
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
test byte [ebp - 0x4c], 0x10
je case.0x4352ce.20
mov byte [ebp - 0x3c], 0x39
jmp 0x43533b
test byte [ebp - 0x4c], 0x10
je case.0x4352ce.21
mov byte [ebp - 0x3c], 0x33
jmp 0x43533b
mov ecx, dword [ebp - 0x4c]
mov ebx, 0x56f672
and ecx, 0x10
cmp ecx, 1
sbb edx, edx
and edx, 3
add edx, 1
test ecx, ecx
mov ecx, str.e_4
cmove ebx, ecx
jmp 0x4354b0
mov ecx, dword [ebp - 0x4c]
mov ebx, 0x56f674
and ecx, 0x10
cmp ecx, 1
sbb edx, edx
and edx, 3
add edx, 1
test ecx, ecx
mov ecx, 0x56f68a
cmove ebx, ecx
jmp 0x4354b0
test byte [ebp - 0x4c], 0x10
je case.0x4352ce.24
mov byte [ebp - 0x3c], 0x34
jmp 0x43533b
test byte [ebp - 0x4c], 0x10
je case.0x4352ce.25
mov byte [ebp - 0x3c], 0x38
jmp 0x43533b
test byte [ebp - 0x4c], 0x10
je case.0x4352ce.26
mov byte [ebp - 0x3c], 0x36
jmp 0x43533b
test byte [ebp - 0x4c], 0x10
je case.0x4352ce.27
mov byte [ebp - 0x3c], 0x32
jmp 0x43533b
mov ecx, dword [ebp - 0x4c]
mov ebx, 0x56f6a4
and ecx, 0x10
cmp ecx, 1
sbb edx, edx
and edx, 0xfffffffe
add edx, 3
test ecx, ecx
mov ecx, 0x56f6a2
cmove ebx, ecx
jmp 0x4354b0
mov ecx, dword [ebp - 0x4c]
mov ebx, str.517_9864320
and ecx, 0x10
cmp ecx, 1
sbb edx, edx
and edx, 2
add edx, 1
test ecx, ecx
mov ecx, 0x56f69e
cmove ebx, ecx
jmp 0x4354b0
test byte [ebp - 0x4c], 3
je case.0x4352ce.0
mov edx, 2
mov ebx, 0x56f69b
jmp 0x4354b0
test byte [ebp - 0x4c], 3
jne 0x435ce7
test byte [ebp - 0x4c], 0xc
je 0x435cf6
mov byte [ebp - 0x3c], 0
jmp 0x43533b
mov ecx, dword [ebp - 0x4c]
mov edx, 0x7d
mov dword [esp], str.e_26
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x7e
mov dword [esp], str.e_28
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x7f
mov dword [esp], str.e_29
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, pe_nt_image_headers32
mov dword [esp], str.e_31
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x83
mov dword [esp], str.e_34
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x81
mov dword [esp], str.e_32
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov edx, 0x82
mov dword [esp], str.e_33
lea eax, [ebp - 0x3c]
call dbg._get_modifier_sequence
mov edx, eax
jmp 0x435512
mov ecx, dword [ebp - 0x4c]
mov ebx, 0x56f6aa
and ecx, 3
cmp ecx, 1
sbb edx, edx
add edx, 2
test ecx, ecx
mov ecx, 0x56f6a8
cmove ebx, ecx
jmp 0x4354b0
mov dword [esp], str.ReadConsoleInputA_returned_0
call dbg.fatal(char const*, ::)
mov dword [esp], str.ReadConsoleInputA_did_not_return_one_input_record
call dbg.fatal(char const*, ::)
mov dword [esp], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], edi
mov dword [ebp - 0x4c], edx
call sym._memmove
mov eax, dword [ebx + 4]
mov edx, dword [ebp - 0x4c]
sub eax, edi
jmp 0x43573f
mov edx, 2
mov ebx, 0x56f694
jmp 0x4354b0
mov edx, 1
mov ebx, 0x56ec10
jmp 0x4354b0
mov dword [esp], str.ReadConsoleInputA_returned_a_key_event_with_zero_repeat_count
call dbg.fatal(char const*, ::)
jmp dbg.internal::ParseCompleteUTF8(char const*, char const*, std::vector<char, std::allocator<char> >*)