Function at 0x140004a70
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 [0x140017010]
xor rax, rsp
mov qword [rbp + 0x190], rax
lea r9, [rsp + 0x40]
xor r8d, r8d
mov edx, 0x8000
lea rcx, [0x1400115c0]
call qword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
jne 0x140004eb1
mov rbx, qword [rsp + 0x40]
mov rdi, 0xffffffffffffffff
mov r9, rdi
inc r9
cmp word [rbx + r9*2], 0
jne 0x140004ad5
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 0x140004b10
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 0x140004b56
lea rdx, [rbp + 0x80]
lea rsi, [0x140017480]
mov rcx, rsi
call fcn.140006a10
movsxd r10, dword [0x1400180b0]
lea r15, [0x140018020]
mov r9, qword [r15 + r10*8]
inc r10d
mov rcx, r9
lea r8, [0x1400171a8]
sub r8, r9
mov edx, 0x12
nop dword [rax]
movzx eax, byte [r8 + rcx]
xor al, 0xde
mov byte [rcx], al
lea rcx, [rcx + 1]
sub rdx, 1
jne 0x140004ba0
mov byte [r9 + 0x12], r14b
cmp r10d, 0xf
cmovge r10d, r14d
mov dword [0x1400180b0], r10d
inc rdi
cmp byte [r9 + rdi], r14b
jne 0x140004bc6
mov rcx, qword [0x140017490]
mov rdx, qword [0x140017498]
mov rax, rdx
sub rax, rcx
cmp rdi, rax
ja 0x140004c19
lea rax, [rcx + rdi]
mov qword [0x140017490], rax
mov rbx, rsi
cmp rdx, 0x10
cmovae rbx, qword [0x140017480]
add rbx, rcx
mov r8, rdi
mov rdx, r9
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + rdi], r14b
jmp 0x140004c26
mov qword [rsp + 0x20], rdi
mov rdx, rdi
call fcn.1400075a0
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rsp + 0x70]
call sub.VCRUNTIME140.dll_memset
cmp qword [0x140017498], 0x10
cmovae rsi, qword [0x140017480]
mov rdx, rsi
lea rcx, [rsp + 0x70]
call fcn.140005da0
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rbx, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x70], rbx
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x6c], edx
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x58], r14
mov edx, 0xf
mov qword [rsp + 0x60], rdx
mov byte [rsp + 0x48], 0
cmp qword [rbp], 0
je 0x140004ddb
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x70]
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, [rsp + 0x48]
lea rcx, [rsp + 0x70]
call fcn.140007c40
movsxd r9, dword [0x1400180b0]
mov r10, qword [r15 + r9*8]
inc r9d
mov rcx, r10
lea r8, [0x1400171bc]
sub r8, r10
mov edx, 6
nop dword [rax]
movzx eax, byte [r8 + rcx]
xor al, 0xde
mov byte [rcx], al
lea rcx, [rcx + 1]
sub rdx, 1
jne 0x140004cf0
mov byte [r10 + 6], dl
cmp r9d, 0xf
cmovge r9d, r14d
mov dword [0x1400180b0], r9d
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 0x10
cmovae rcx, qword [rsp + 0x48]
mov rdx, r10
call qword [sym.imp.VCRUNTIME140.dll_strstr]
test rax, rax
jne 0x140004d8a
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [0x140018018], rax
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x140004d8a
lea rcx, [rbp - 0x80]
call fcn.140006650
test rax, rax
jne 0x140004d8a
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x70]
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, [rbp - 0x80]
call fcn.140006650
test rax, rax
jne 0x140004db6
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x70]
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 [0x140018008], 1
mov dword [0x1400180b4], 1
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [0x14001800c], eax
mov rdx, qword [rsp + 0x60]
cmp rdx, 0x10
jb 0x140004e16
inc rdx
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004e11
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004e11
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14000f32c
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], 0xf
mov byte [rsp + 0x48], 0
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
mov qword [rsp + rcx + 0x70], rbx
mov rax, qword [rsp + 0x70]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x6c], edx
lea rax, vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
mov qword [rbp - 0x80], rax
cmp qword [rbp], 0
je 0x140004e83
mov rax, qword [rbp - 0x68]
lea rcx, [rbp - 0x10]
cmp qword [rax], rcx
jne 0x140004e83
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rbp + 8]
mov qword [rax], rcx
mov rax, qword [rbp - 0x48]
mov qword [rax], rcx
sub edx, ecx
mov rax, qword [rbp - 0x30]
mov dword [rax], edx
cmp byte [rbp - 4], 0
je 0x140004e92
lea rcx, [rbp - 0x80]
call fcn.140006650
lea rcx, [rbp - 0x80]
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, [rbp - 0x78]
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 + 0x20]
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.14000f080
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