Function at 0x140061348
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 [0x14010e0c0]
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.1400abfe0
lea rdx, [rbp - 0x30]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x1400615ab
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 0x1400613bc
lea rdx, [rbp - 0x30]
lea rcx, [rsp + 0x68]
call fcn.140003d9c
nop
lea r15, [0x1400f3a58]
mov rdx, r15
lea rcx, [rsp + 0x68]
call fcn.14005d7ec
mov rcx, qword [rsp + 0x78]
dec rcx
cmp rax, rcx
je 0x140061409
mov r8d, 1
mov rdx, r15
lea rcx, [rsp + 0x68]
call fcn.14003e920
mov r8d, 0x10
lea rdx, str.FLiNGTrainerTemp
lea rcx, [rsp + 0x68]
call fcn.14003e920
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 0x140061456
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 0x14006156f
movabs rax, 0x7ffffffffffffffe
mov rcx, qword [rsp + 0x78]
sub rax, rcx
cmp rax, 1
jb 0x1400615d8
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.14003e808
nop
lea rdx, [rbx + 0x70]
mov r8, qword [rdx + 0x10]
cmp qword [rdx + 0x18], rsi
jbe 0x1400614cd
mov rdx, qword [rdx]
lea rcx, [rbp - 0x58]
call fcn.14003e920
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 0x140061529
mov rcx, rbx
call fcn.1400186c8
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 0x14006152d
mov rdx, qword [rbp - 0x60]
cmp rdx, rsi
jbe 0x140061565
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14006155f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400615de
call fcn.140082b60
nop
lea rcx, [rbp - 0x58]
call fcn.1400186c8
nop
mov rdx, qword [rbp - 0x80]
cmp rdx, rsi
jbe 0x1400615ab
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400615a6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400615d2
call fcn.140082b60
mov rcx, qword [rbp + 0x1e0]
xor rcx, rsp
call fcn.140082b40
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.140089c50
nop
call fcn.1400017e4
nop
call fcn.140089c50
int3