Function at 0x180020d30
Capabilities:
Get common file path

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x428]
sub rsp, 0x500
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x1801b0238]
xor rax, rsp
mov qword [rbp + 0x3f0], rax
mov r15, rdx
mov rbx, rcx
xor r12d, r12d
mov dword [rsp + 0x30], r12d
lea rax, [rbp + 0x1e0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r12 + 5]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x180020dc4
mov qword [rbx + 0x10], r12
mov qword [rbx + 0x18], 0xf
mov byte [rbx], r12b
lea r8d, [r12 + 0x30]
lea rdx, str.Load_Failed:_Could_not_find_My_Document_Location
mov rcx, rbx
call fcn.18000f070
jmp 0x18002100d
mov rax, r12
mov qword [rbp + 0x1d0], rax
mov edx, 7
mov qword [rbp + 0x1d8], rdx
mov word [rbp + 0x1c0], r12w
mov r14d, r12d
lea rsi, [rbp + 0x1e0]
nop dword [rax]
movzx edi, word [rsi]
test di, di
je 0x180020e9c
cmp rax, rdx
jne 0x180020e4c
lea rcx, [rax + 1]
test rcx, rcx
jne 0x180020e2a
mov qword [rbp + 0x1d0], r12
lea rax, [rbp + 0x1c0]
cmp rdx, 8
cmovae rax, qword [rbp + 0x1c0]
mov word [rax], r12w
jmp 0x180020e3e
cmp rdx, rcx
jae 0x180020e4c
mov rdx, rcx
lea rcx, [rbp + 0x1c0]
call fcn.180019300
mov rax, qword [rbp + 0x1d0]
mov rdx, qword [rbp + 0x1d8]
lea rcx, [rbp + 0x1c0]
cmp rdx, 8
cmovae rcx, qword [rbp + 0x1c0]
mov word [rcx + rax*2], di
mov rax, qword [rbp + 0x1d0]
inc rax
mov qword [rbp + 0x1d0], rax
mov word [rcx + rax*2], r12w
inc r14d
add rsi, 2
cmp r14d, 0x104
jge 0x180020e9c
mov rdx, qword [rbp + 0x1d8]
mov rax, qword [rbp + 0x1d0]
jmp 0x180020df0
mov r8d, 8
lea rdx, str.BF1.dat
lea rcx, [rbp + 0x1c0]
call fcn.18001f650
lea rcx, [rsp + 0x40]
call fcn.18001f770
nop
lea rdx, [rbp + 0x1c0]
cmp qword [rbp + 0x1d8], 8
cmovae rdx, qword [rbp + 0x1c0]
mov r8d, 0x21
lea rcx, [rsp + 0x50]
call fcn.180020200
xor r8d, r8d
test rax, rax
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, [rsp + 0x40]
jne 0x180020f0c
add rcx, rax
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]
jmp 0x180020f17
add rcx, rax
xor edx, edx
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::clear_int__bool____ptr64]
cmp qword [rbp - 0x30], 0
jne 0x180020f2d
mov r8d, 0x1c
lea rdx, str.Load_Failed:_Could_open_file
jmp 0x180020f91
lea rcx, [rbp + 0x50]
call fcn.180021040
mov r8d, 0x16c
lea rdx, [rbp + 0x50]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_istream_char__struct_std::char_traits_char__::read_char____ptr64__long_long___int64_____ptr64]
lea rcx, [rsp + 0x50]
call fcn.180020880
test rax, rax
jne 0x180020f78
mov rax, qword [rsp + 0x40]
movsxd r8, dword [rax + 4]
lea rcx, [rsp + 0x40]
add rcx, r8
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 rdx, [rbp + 0x50]
mov rcx, r15
call fcn.180020900
mov r8d, 0xf
lea rdx, str.Loaded_Settings
mov qword [rbx + 0x10], r12
mov qword [rbx + 0x18], 0xf
mov byte [rbx], 0
mov rcx, rbx
call fcn.18000f070
nop
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov qword [rsp + rcx + 0x40], rax
mov rax, qword [rsp + 0x40]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xb0]
mov dword [rsp + rcx + 0x3c], edx
lea rcx, [rsp + 0x50]
call fcn.180020010
lea rcx, [rsp + 0x58]
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 - 0x10]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
nop
mov r8, qword [rbp + 0x1d8]
cmp r8, 8
jb 0x18002100d
inc r8
mov rdx, qword [rbp + 0x1c0]
call fcn.180019510
mov rax, rbx
mov rcx, qword [rbp + 0x3f0]
xor rcx, rsp
call fcn.1800e5f40
lea r11, [rsp + 0x500]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret