Function at 0x14005ff88
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 [0x1401060c0]
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.1400a9c50
lea rdx, [rbp - 0x30]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x1400601eb
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 0x14005fffc
lea rdx, [rbp - 0x30]
lea rcx, [rsp + 0x68]
call fcn.140003dfc
nop
lea r15, [0x1400f1a48]
mov rdx, r15
lea rcx, [rsp + 0x68]
call fcn.14005c42c
mov rcx, qword [rsp + 0x78]
dec rcx
cmp rax, rcx
je 0x140060049
mov r8d, 1
mov rdx, r15
lea rcx, [rsp + 0x68]
call fcn.14003d7f8
mov r8d, 0x10
lea rdx, str.FLiNGTrainerTemp
lea rcx, [rsp + 0x68]
call fcn.14003d7f8
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 0x140060096
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 0x1400601af
movabs rax, 0x7ffffffffffffffe
mov rcx, qword [rsp + 0x78]
sub rax, rcx
cmp rax, 1
jb 0x140060218
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.14003d6e0
nop
lea rdx, [rbx + 0x70]
mov r8, qword [rdx + 0x10]
cmp qword [rdx + 0x18], rsi
jbe 0x14006010d
mov rdx, qword [rdx]
lea rcx, [rbp - 0x58]
call fcn.14003d7f8
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 0x140060169
mov rcx, rbx
call fcn.140018728
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 0x14006016d
mov rdx, qword [rbp - 0x60]
cmp rdx, rsi
jbe 0x1400601a5
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14006019f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14006021e
call fcn.1400807d0
nop
lea rcx, [rbp - 0x58]
call fcn.140018728
nop
mov rdx, qword [rbp - 0x80]
cmp rdx, rsi
jbe 0x1400601eb
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400601e6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140060212
call fcn.1400807d0
mov rcx, qword [rbp + 0x1e0]
xor rcx, rsp
call fcn.1400807b0
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.1400878c0
nop
call fcn.140001844
nop
call fcn.1400878c0
int3