Function at 0x140004aa0
Capabilities:
Encode data using xor
Get common file path

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x1a0]
sub rsp, 0x2a0
mov rax, qword [0x140019010]
xor rax, rsp
mov qword [rbp + 0x190], rax
lea r9, [rsp + 0x40]
xor r8d, r8d
mov edx, 0x8000
lea rcx, [0x140012c30]
call qword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
jne 0x140004ec4
mov rbx, qword [rsp + 0x40]
mov rdi, 0xffffffffffffffff
mov r9, rdi
inc r9
cmp word [rbx + r9*2], 0
jne 0x140004b05
xor r14d, r14d
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
mov r8, rbx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rsi, eax
mov r9, rdi
nop dword [rax]
inc r9
cmp word [rbx + r9*2], r14w
jne 0x140004b40
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], esi
lea rax, [rbp + 0x80]
mov qword [rsp + 0x20], rax
mov r8, rbx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov byte [rbp + rsi + 0x80], r14b
lea rax, [rbp + 0x80]
mov r8, rdi
inc r8
cmp byte [rax + r8], r14b
jne 0x140004b86
lea rdx, [rbp + 0x80]
lea rsi, [0x140019520]
mov rcx, rsi
call fcn.140006d20
movsxd r10, dword [0x14001a3e0]
lea r15, [0x14001a3f0]
mov r9, qword [r15 + r10*8]
inc r10d
mov rcx, r9
lea r8, [0x140019120]
sub r8, r9
mov edx, 0x12
nop dword [rax]
movzx eax, byte [r8 + rcx]
xor al, 0xf7
mov byte [rcx], al
lea rcx, [rcx + 1]
sub rdx, 1
jne 0x140004bd0
mov byte [r9 + 0x12], r14b
cmp r10d, 0xf
cmovge r10d, r14d
mov dword [0x14001a3e0], r10d
inc rdi
cmp byte [r9 + rdi], r14b
jne 0x140004bf6
mov rcx, qword [0x140019530]
mov rdx, qword [0x140019538]
mov rax, rdx
sub rax, rcx
cmp rdi, rax
ja 0x140004c49
lea rax, [rcx + rdi]
mov qword [0x140019530], rax
mov rbx, rsi
cmp rdx, 0x10
cmovae rbx, qword [0x140019520]
add rbx, rcx
mov r8, rdi
mov rdx, r9
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + rdi], r14b
jmp 0x140004c56
mov qword [rsp + 0x20], rdi
mov rdx, rdi
call fcn.140007820
cmp qword [0x140019538], 0x10
cmovae rsi, qword [0x140019520]
mov rdx, rsi
lea rcx, [rsp + 0x50]
call fcn.1400060e0
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rbx, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x50], rbx
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x4c], edx
mov qword [rbp + 0x60], r14
mov qword [rbp + 0x70], r14
mov edx, 0xf
mov qword [rbp + 0x78], rdx
mov byte [rbp + 0x60], 0
cmp qword [rbp - 0x20], 0
je 0x140004ded
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
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, [rbp + 0x60]
lea rcx, [rsp + 0x50]
call fcn.140007ed0
movsxd r9, dword [0x14001a3e0]
mov r10, qword [r15 + r9*8]
inc r9d
mov rcx, r10
lea r8, [0x140019114]
sub r8, r10
mov edx, 6
nop word [rax + rax]
movzx eax, byte [r8 + rcx]
xor al, 0xf7
mov byte [rcx], al
lea rcx, [rcx + 1]
sub rdx, 1
jne 0x140004d10
mov byte [r10 + 6], dl
cmp r9d, 0xf
cmovge r9d, r14d
mov dword [0x14001a3e0], r9d
lea rcx, [rbp + 0x60]
cmp qword [rbp + 0x78], 0x10
cmovae rcx, qword [rbp + 0x60]
mov rdx, r10
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
jne 0x140004da8
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x14001a3b8], rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140004da8
lea rcx, [rsp + 0x60]
call fcn.140006930
test rax, rax
jne 0x140004da8
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
lea rcx, [rsp + 0x60]
call fcn.140006930
test rax, rax
jne 0x140004dd5
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x50]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 2]
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
mov dword [0x14001a3c4], 1
mov dword [0x14001a3c0], 1
mov rdx, qword [rbp + 0x78]
cmp rdx, 0x10
jb 0x140004e27
inc rdx
mov rcx, qword [rbp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004e22
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004e22
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1400101c8
mov qword [rbp + 0x70], r14
mov qword [rbp + 0x78], 0xf
mov byte [rbp + 0x60], 0
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x50], rbx
mov rax, qword [rsp + 0x50]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x4c], edx
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rsp + 0x60], rax
cmp qword [rbp - 0x20], 0
je 0x140004e93
mov rax, qword [rsp + 0x78]
lea rcx, [rbp - 0x30]
cmp qword [rax], rcx
jne 0x140004e93
mov rdx, qword [rbp - 0x10]
mov rcx, qword [rbp - 0x18]
mov qword [rax], rcx
mov rax, qword [rbp - 0x68]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x50]
mov dword [rax], edx
cmp byte [rbp - 0x24], 0
je 0x140004ea3
lea rcx, [rsp + 0x60]
call fcn.140006930
lea rcx, [rsp + 0x60]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_streambuf_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
lea rcx, [rsp + 0x68]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_istream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.14000fe60
lea r11, [rsp + 0x2a0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret