Function at 0x140064878
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 [0x14010c0c0]
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.1400af720
lea rdx, [rbp - 0x30]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140064adb
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 0x1400648ec
lea rdx, [rbp - 0x30]
lea rcx, [rsp + 0x68]
call fcn.140005d6c
nop
lea r15, [0x1400f6c38]
mov rdx, r15
lea rcx, [rsp + 0x68]
call fcn.140060250
mov rcx, qword [rsp + 0x78]
dec rcx
cmp rax, rcx
je 0x140064939
mov r8d, 1
mov rdx, r15
lea rcx, [rsp + 0x68]
call fcn.140019c88
mov r8d, 0x10
lea rdx, str.FLiNGTrainerTemp
lea rcx, [rsp + 0x68]
call fcn.140019c88
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 0x140064986
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 0x140064a9f
movabs rax, 0x7ffffffffffffffe
mov rcx, qword [rsp + 0x78]
sub rax, rcx
cmp rax, 1
jb 0x140064b08
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.14001d92c
nop
lea rdx, [rbx + 0x70]
mov r8, qword [rdx + 0x10]
cmp qword [rdx + 0x18], rsi
jbe 0x1400649fd
mov rdx, qword [rdx]
lea rcx, [rbp - 0x58]
call fcn.140019c88
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 0x140064a59
mov rcx, rbx
call fcn.14001a720
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 0x140064a5d
mov rdx, qword [rbp - 0x60]
cmp rdx, rsi
jbe 0x140064a95
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140064a8f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140064b0e
call fcn.1400862a0
nop
lea rcx, [rbp - 0x58]
call fcn.14001a720
nop
mov rdx, qword [rbp - 0x80]
cmp rdx, rsi
jbe 0x140064adb
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140064ad6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140064b02
call fcn.1400862a0
mov rcx, qword [rbp + 0x1e0]
xor rcx, rsp
call fcn.140086280
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.14008d390
nop
call fcn.140001724
nop
call fcn.14008d390
int3