Function at 0x14004a864
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r15
lea rbp, [rsp - 0x1f0]
sub rsp, 0x2f0
mov rax, qword [0x1401040c0]
xor rax, rsp
mov qword [rbp + 0x1e0], rax
mov rbx, rcx
xor edi, edi
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x30]
call fcn.1400a7330
lea rdx, [rbp - 0x30]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x14004aac7
xorps xmm0, xmm0
movups xmmword [rsp + 0x68], xmm0
mov qword [rsp + 0x78], rdi
mov qword [rbp - 0x80], rdi
lea rax, [rbp - 0x30]
or r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], di
jne 0x14004a8d8
lea rdx, [rbp - 0x30]
lea rcx, [rsp + 0x68]
call fcn.14000632c
nop
lea r15, [0x1400eb118]
mov rdx, r15
lea rcx, [rsp + 0x68]
call fcn.1400462c4
mov rcx, qword [rsp + 0x78]
dec rcx
cmp rax, rcx
je 0x14004a925
mov r8d, 1
mov rdx, r15
lea rcx, [rsp + 0x68]
call fcn.14001a6e4
mov r8d, 0x10
lea rdx, str.FLiNGTrainerTemp
lea rcx, [rsp + 0x68]
call fcn.14001a6e4
lea rcx, [rsp + 0x68]
mov esi, 7
cmp qword [rbp - 0x80], rsi
cmova rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14004a972
lea rcx, [rsp + 0x68]
cmp qword [rbp - 0x80], rsi
cmova rcx, qword [rsp + 0x68]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rcx, [rsp + 0x68]
cmp qword [rbp - 0x80], rsi
cmova rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14004aa8b
movabs rax, 0x7ffffffffffffffe
mov rcx, qword [rsp + 0x78]
sub rax, rcx
cmp rax, 1
jb 0x14004aaf4
lea r9, [rsp + 0x68]
cmp qword [rbp - 0x80], rsi
cmova r9, qword [rsp + 0x68]
mov qword [rsp + 0x30], 1
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rcx
lea rcx, [rbp - 0x58]
call fcn.14001e6f8
nop
lea rdx, [rbx + 0x70]
mov r8, qword [rdx + 0x10]
cmp qword [rdx + 0x18], rsi
jbe 0x14004a9e9
mov rdx, qword [rdx]
lea rcx, [rbp - 0x58]
call fcn.14001a6e4
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x48], xmm0
movups xmmword [rbp - 0x78], xmm0
movups xmm0, xmmword [rax + 0x10]
movups xmmword [rsp + 0x58], xmm0
movups xmmword [rbp - 0x68], xmm0
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], rsi
mov word [rax], di
add rbx, 0x50
lea rax, [rbp - 0x78]
cmp rbx, rax
je 0x14004aa45
mov rcx, rbx
call fcn.14001b2e4
movups xmm0, xmmword [rsp + 0x48]
movups xmmword [rbx], xmm0
movups xmm1, xmmword [rsp + 0x58]
movups xmmword [rbx + 0x10], xmm1
mov rdx, rsi
mov word [rbp - 0x78], di
jmp 0x14004aa49
mov rdx, qword [rbp - 0x60]
cmp rdx, rsi
jbe 0x14004aa81
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004aa7b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14004aafa
call fcn.1400810e0
nop
lea rcx, [rbp - 0x58]
call fcn.14001b2e4
nop
mov rdx, qword [rbp - 0x80]
cmp rdx, rsi
jbe 0x14004aac7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14004aac2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14004aaee
call fcn.1400810e0
mov rcx, qword [rbp + 0x1e0]
xor rcx, rsp
call fcn.1400810c0
lea r11, [rsp + 0x2f0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop rdi
pop rbp
ret
call fcn.140087ff4
nop
call fcn.140001b44
nop
call fcn.140087ff4
int3