Function at 0x140001ef4
Capabilities:
Check if file exists
Create directory
Encode data using xor
Get common file path
Get file attributes

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x238]
sub rsp, 0x310
mov rax, qword [0x140033080]
xor rax, rsp
mov qword [rbp + 0x200], rax
mov qword [rsp + 0x70], rdx
mov r12, rcx
xor ebx, ebx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov qword [rsp + 0x68], rax
movsxd rdi, dword [rax + 0x3c]
add rdi, rax
movzx r8d, word [rdi + 0x14]
lea r13, [rdi + 0x18]
add r13, r8
mov dword [rsp + 0x30], ebx
cmp bx, word [rdi + 6]
jae 0x14000244f
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x30], rbx
mov qword [rbp - 0x28], rbx
mov r8d, 8
mov rdx, r13
lea rcx, [rbp - 0x40]
call fcn.140004e0c
nop
mov r15, r12
cmp qword [r12 + 0x18], 0xf
jbe 0x140001f94
mov r15, qword [r12]
lea rsi, [rbp - 0x40]
cmp qword [rbp - 0x28], 0xf
cmova rsi, qword [rbp - 0x40]
mov r14, qword [r12 + 0x10]
mov rax, qword [rbp - 0x30]
cmp r14, rax
ja 0x14000200a
test r14, r14
je 0x140002070
sub rax, r14
inc rax
add rax, rsi
mov qword [rsp + 0x60], rax
mov r8, rax
sub r8, rsi
mov rcx, rsi
jmp 0x140001ff2
mov r8, r14
mov rdx, r15
mov rcx, rbx
call fcn.140022910
test eax, eax
je 0x140002005
inc rbx
mov r8, qword [rsp + 0x60]
sub r8, rbx
mov rcx, rbx
movsx edx, byte [r15]
call fcn.1400229f0
test rax, rax
mov rbx, rax
jne 0x140001fd2
jmp 0x140002014
sub rbx, rsi
jmp 0x14000200e
or rbx, 0xffffffffffffffff
cmp rbx, 0xffffffffffffffff
jne 0x140002070
mov rdx, qword [rbp - 0x28]
cmp rdx, 0xf
jbe 0x14000204f
inc rdx
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000204a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002485
call fcn.140006e20
mov ebx, dword [rsp + 0x30]
inc ebx
mov dword [rsp + 0x30], ebx
add r13, 0x28
movzx eax, word [rdi + 6]
cmp ebx, eax
jge 0x14000244f
xor ebx, ebx
jmp 0x140001f63
mov r15d, dword [r13 + 0xc]
add r15, qword [rsp + 0x68]
lea rdx, [rbp + 0xf0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
xor r12d, r12d
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r12
lea rcx, [rbp + 0xf0]
call fcn.14000e7a0
mov r8, rax
lea rdx, [rbp + 0xf0]
lea rcx, [rsp + 0x38]
call fcn.140004e0c
nop
lea rcx, str.cache_
call fcn.14000e7a0
mov r8, rax
lea rdx, str.cache_
lea rcx, [rsp + 0x38]
call fcn.1400042ec
mov rbx, rax
xorps xmm0, xmm0
movups xmmword [rbp - 0x80], xmm0
mov qword [rbp - 0x70], r12
mov qword [rbp - 0x68], r12
lea r8d, [r12 + 0x20]
mov rdx, rax
lea rcx, [rbp - 0x80]
call fcn.140022290
mov qword [rbx + 0x10], r12
lea r13d, [r12 + 0xf]
mov qword [rbx + 0x18], r13
mov byte [rbx], r12b
mov rdx, qword [rsp + 0x50]
cmp rdx, r13
jbe 0x140002150
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000214b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000248b
call fcn.140006e20
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x50], r13
mov byte [rsp + 0x38], r12b
lea rcx, [rbp - 0x80]
cmp qword [rbp - 0x68], r13
cmova rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x14000217b
test al, 0x10
jne 0x140002190
lea rcx, [rbp - 0x80]
cmp qword [rbp - 0x68], r13
cmova rcx, qword [rbp - 0x80]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov r14d, r12d
mov rbx, qword [rsp + 0x70]
mov rbx, qword [rbx]
mov rbx, qword [rbx]
jmp 0x1400023c9
lea rdi, [rbx + 0x20]
mov r8, rdi
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x60]
call fcn.140004928
nop
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp - 0x20]
call fcn.140022ab0
lea rdx, [rbp - 0x60]
cmp qword [rbp - 0x48], r13
cmova rdx, qword [rbp - 0x60]
lea rcx, [rbp - 0x20]
call fcn.1400040d0
mov rax, qword [rbp - 0x20]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx - 0x20], rax
mov rax, qword [rbp - 0x20]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 0x24], edx
cmp qword [rbp + 0x68], r12
je 0x1400022fb
mov ecx, dword [rdi + 0x20]
call fcn.140006f34
mov rsi, rax
mov r8d, dword [rdi + 0x20]
mov edx, r14d
add rdx, r15
mov rcx, rax
call fcn.140022290
cmp dword [rdi + 0x20], r12d
jbe 0x14000224b
mov rcx, rsi
mov edx, dword [rdi + 0x20]
mov al, byte [rcx]
xor al, 0xba
dec al
xor al, 0xaa
mov byte [rcx], al
inc rcx
sub rdx, 1
jne 0x140002238
mov r8d, dword [rdi + 0x20]
mov rdx, rsi
lea rcx, [rbp - 0x20]
call fcn.1400039a0
lea rcx, [rbp - 0x18]
call fcn.140004040
test rax, rax
jne 0x140002296
mov rax, qword [rbp - 0x20]
movsxd rcx, dword [rax + 4]
mov rax, qword [rbp + rcx + 0x28]
neg rax
sbb edx, edx
and edx, 0xfffffffc
add edx, 6
or edx, dword [rbp + rcx - 0x10]
and edx, 0x17
mov dword [rbp + rcx - 0x10], edx
and edx, dword [rbp + rcx - 0xc]
jne 0x140002497
lea rdx, str.Stored
lea rcx, [0x1400343a0]
call fcn.140004a38
mov rdx, rdi
cmp qword [rdi + 0x18], r13
jbe 0x1400022b5
mov rdx, qword [rdi]
mov r8, qword [rdi + 0x10]
mov rcx, rax
call fcn.140005430
lea rdx, str._in
mov rcx, rax
call fcn.140004a38
lea rdx, [rbp - 0x60]
cmp qword [rbp - 0x48], r13
cmova rdx, qword [rbp - 0x60]
mov r8, qword [rbp - 0x50]
mov rcx, rax
call fcn.140005430
mov rcx, rax
call fcn.140004c84
mov rcx, rsi
call fcn.140006e20
jmp 0x14000232f
lea rdx, str.Failed_to_open_file:
lea rcx, [0x140034520]
call fcn.140004a38
lea rdx, [rbp - 0x60]
cmp qword [rbp - 0x48], r13
cmova rdx, qword [rbp - 0x60]
mov r8, qword [rbp - 0x50]
mov rcx, rax
call fcn.140005430
mov rcx, rax
call fcn.140004c84
add r14d, dword [rdi + 0x20]
lea rcx, [rbp + 0x88]
call fcn.140003920
nop
lea rax, vtable.std::ios_base.0
mov qword [rbp + 0x88], rax
lea rcx, [rbp + 0x88]
call fcn.140006578
nop
mov rdx, qword [rbp - 0x48]
cmp rdx, r13
jbe 0x140002395
inc rdx
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002390
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400024eb
call fcn.140006e20
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], r12b
je 0x1400023bd
mov rax, qword [rbx + 8]
jmp 0x1400023b2
cmp rbx, qword [rax + 0x10]
jne 0x1400023b8
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], r12b
je 0x1400023a5
mov rbx, rax
jmp 0x1400023c9
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], r12b
je 0x1400023bd
cmp byte [rbx + 0x19], r12b
je 0x1400021a3
mov rdx, qword [rbp - 0x68]
cmp rdx, r13
jbe 0x14000240d
inc rdx
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002408
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140002491
call fcn.140006e20
mov qword [rbp - 0x70], r12
mov qword [rbp - 0x68], r13
mov byte [rbp - 0x80], r12b
mov rdx, qword [rbp - 0x28]
cmp rdx, r13
jbe 0x14000244f
inc rdx
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000244a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000247f
call fcn.140006e20
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.140006e00
lea r11, [rsp + 0x310]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.14000f728
int3
call fcn.14000f728
nop
call fcn.14000f728
nop
call fcn.14000f728
nop
test dl, 4
je 0x1400024a5
lea rbx, str.ios_base::badbit_set
jmp 0x1400024ba
test dl, 2
lea rbx, str.ios_base::failbit_set
lea rax, str.ios_base::eofbit_set
cmove rbx, rax
mov edx, 1
lea rcx, [rsp + 0x70]
call fcn.1400014ac
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x38]
call fcn.140001d3c
lea rdx, [0x140032140]
lea rcx, [rsp + 0x38]
call fcn.140008cc4
nop
call fcn.14000f728
int3