Function at 0x140001920
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes
Terminate process

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 - 0x47]
sub rsp, 0xd0
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x3f], rax
xor r15d, r15d
mov qword [rbp - 0x69], r15
lea r9, [rbp - 0x69]
xor r8d, r8d
xor edx, edx
lea rcx, [0x1400054c0]
call qword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
js 0x140001e42
mov rsi, qword [rbp - 0x69]
xorps xmm0, xmm0
movups xmmword [rbp - 0x21], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x11], xmm1
mov rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp word [rsi + rbx*2], r15w
jne 0x140001990
movabs r14, 0x7ffffffffffffffe
cmp rbx, r14
ja 0x140001e8d
cmp rbx, 7
ja 0x1400019dc
mov qword [rbp - 0x11], rbx
mov qword [rbp - 9], 7
add rbx, rbx
mov r8, rbx
mov rdx, rsi
lea rcx, [rbp - 0x21]
call sub.VCRUNTIME140.dll_memcpy
mov word [rbp + rbx - 0x21], r15w
jmp 0x140001a89
mov rax, rbx
or rax, 7
cmp rax, r14
jbe 0x140001a2b
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
cmp rcx, 0x1000
jb 0x140001a5b
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140001e87
mov rcx, rax
call fcn.140003ab0
test rax, rax
je 0x140001e0b
lea rdi, [rax + 0x27]
and rdi, 0xffffffffffffffe0
mov qword [rdi - 8], rax
jmp 0x140001a63
mov r14, rax
mov ecx, 0xa
cmp rax, rcx
cmovb r14, rcx
lea rcx, [r14 + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x140001e87
add rcx, rcx
jne 0x1400019f6
mov rdi, r15
jmp 0x140001a63
call fcn.140003ab0
mov rdi, rax
mov qword [rbp - 0x21], rdi
mov qword [rbp - 0x11], rbx
mov qword [rbp - 9], r14
add rbx, rbx
mov r8, rbx
mov rdx, rsi
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov word [rbx + rdi], r15w
mov rsi, qword [rbp - 0x69]
mov rcx, rsi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
lea r8, str._serotonin
lea rdx, [rbp - 0x21]
lea rcx, [rbp - 0x61]
call fcn.140003340
nop
lea rcx, [rbp - 0x61]
cmp qword [rbp - 0x49], 7
cmova rcx, qword [rbp - 0x61]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140001ada
lea rcx, [rbp - 0x61]
cmp qword [rbp - 0x49], 7
cmova rcx, qword [rbp - 0x61]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jmp 0x140001adc
test al, 0x10
jne 0x140001b18
lea rdx, str.____failed_to_create_dir__now_closing_in_3_seconds..
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400034c0
lea rdx, [0x1400036a0]
mov rcx, rax
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, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea r8, str.configs
lea rdx, [rbp - 0x61]
lea rcx, [rbp - 0x41]
call fcn.140003340
nop
lea rcx, [rbp - 0x41]
cmp qword [rbp - 0x29], 7
cmova rcx, qword [rbp - 0x41]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140001b60
lea rcx, [rbp - 0x41]
cmp qword [rbp - 0x29], 7
cmova rcx, qword [rbp - 0x41]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jmp 0x140001b62
test al, 0x10
jne 0x140001b9e
lea rdx, str.____failed_to_create_dir__now_closing_in_3_seconds..
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400034c0
lea rdx, [0x1400036a0]
mov rcx, rax
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, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea r8, str.logs
lea rdx, [rbp - 0x61]
lea rcx, [rbp - 1]
call fcn.140003340
nop
lea rcx, [rbp - 1]
cmp qword [rbp + 0x17], 7
cmova rcx, qword [rbp - 1]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140001be6
lea rcx, [rbp - 1]
cmp qword [rbp + 0x17], 7
cmova rcx, qword [rbp - 1]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jmp 0x140001be8
test al, 0x10
jne 0x140001c24
lea rdx, str.____failed_to_create_dir__now_closing_in_3_seconds..
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400034c0
lea rdx, [0x1400036a0]
mov rcx, rax
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, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
lea r8, str.default.cfg
lea rdx, [rbp - 0x41]
lea rcx, [rbp + 0x1f]
call fcn.140003340
nop
lea rcx, [rbp + 0x1f]
call fcn.140001550
test al, al
jne 0x140001c80
lea rdx, str.____failed_to_create_default.cfg__now_closing_in_3_seconds..
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400034c0
lea rdx, [0x1400036a0]
mov rcx, rax
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, 0xbb8
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
nop
mov rdx, qword [rbp + 0x37]
cmp rdx, 7
jbe 0x140001cc3
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x1f]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001cbe
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001cbe
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003aec
movdqa xmm0, xmmword [0x1400061f0]
movdqu xmmword [rbp + 0x2f], xmm0
mov word [rbp + 0x1f], r15w
mov rdx, qword [rbp + 0x17]
cmp rdx, 7
jbe 0x140001d20
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 1]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001d13
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001d13
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003aec
movdqa xmm0, xmmword [0x1400061f0]
movdqu xmmword [rbp + 0xf], xmm0
mov word [rbp - 1], r15w
mov rdx, qword [rbp - 0x29]
cmp rdx, 7
jbe 0x140001d75
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x41]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001d68
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001d68
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003aec
movdqa xmm0, xmmword [0x1400061f0]
movdqu xmmword [rbp - 0x31], xmm0
mov word [rbp - 0x41], r15w
mov rdx, qword [rbp - 0x49]
cmp rdx, 7
jbe 0x140001dca
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x61]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001dbd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001dbd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003aec
movdqa xmm0, xmmword [0x1400061f0]
movdqu xmmword [rbp - 0x51], xmm0
mov word [rbp - 0x61], r15w
mov rdx, qword [rbp - 9]
cmp rdx, 7
jbe 0x140001e17
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x21]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140001e12
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140001e12
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140003aec
mov al, 1
mov rcx, qword [rbp + 0x3f]
xor rcx, rsp
call fcn.140003a90
lea r11, [rsp + 0xd0]
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
lea rdx, str.____failed_to_get_roaming_path__now_closing_in_3_seconds..
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.1400034c0
lea rdx, [0x1400036a0]
mov rcx, rax
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]
lea rdx, str.press_any_key_to_close
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.1400034c0
call qword [sym.imp.api_ms_win_crt_conio_l1_1_0.dll__getch]
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
call fcn.140001110
int3
call fcn.1400011b0
int3