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

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x308]
sub rsp, 0x3e0
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
movaps xmmword [rax - 0x38], xmm6
movaps xmmword [rax - 0x48], xmm7
mov rax, qword [0x1400a6088]
xor rax, rsp
mov qword [rbp + 0x2b0], rax
mov r13, rcx
xor r12d, r12d
mov dword [rsp + 0x30], r12d
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0xa0]
call fcn.140053760
lea rdx, [rbp + 0xa0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x14003246d
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x58], 7
mov word [rsp + 0x40], r12w
lea rax, [rbp + 0xa0]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], r12w
jne 0x140032013
lea rdx, [rbp + 0xa0]
lea rcx, [rsp + 0x40]
call fcn.140003f60
nop
lea rbx, [rsp + 0x40]
mov r15, qword [rsp + 0x40]
mov r14, qword [rsp + 0x58]
cmp r14, 8
cmovae rbx, r15
mov rsi, qword [rsp + 0x50]
test rsi, rsi
je 0x140032113
mov edi, 0x100
mov r8d, edi
xor edx, edx
lea rcx, [rbp - 0x60]
call fcn.140053760
lea rcx, [0x14008c6f0]
lea rdx, [0x14008c6f2]
movzx eax, word [rcx]
cmp ax, di
jae 0x1400320c1
movzx eax, al
mov byte [rbp + rax - 0x60], 1
add rcx, 2
cmp rcx, rdx
jne 0x140032075
lea rcx, [rsi - 1]
mov rax, 0xffffffffffffffff
cmp rcx, rax
cmovb rax, rcx
lea rcx, [rbx + rax*2]
movzx eax, word [rcx]
cmp ax, di
jae 0x1400320b6
movzx eax, ax
cmp byte [rbp + rax - 0x60], 0
jne 0x14003210b
cmp rcx, rbx
je 0x140032113
sub rcx, 2
jmp 0x1400320a4
lea rcx, [rsi - 1]
mov rax, 0xffffffffffffffff
cmp rcx, rax
cmovb rax, rcx
lea rcx, [rbx + rax*2]
nop word [rax + rax]
mov edx, 1
lea rax, [0x14008c6f0]
movzx r8d, word [rcx]
cmp word [rax], r8w
je 0x14003210b
add rax, 2
sub rdx, 1
jne 0x1400320f0
cmp rcx, rbx
je 0x140032113
sub rcx, 2
jmp 0x1400320e0
sub rcx, rbx
sar rcx, 1
jmp 0x14003211a
mov rcx, 0xffffffffffffffff
lea rax, [rsi - 1]
cmp rcx, rax
je 0x140032190
mov rax, r14
sub rax, rsi
cmp rax, 1
jb 0x140032162
lea rdi, [rsi + 1]
mov qword [rsp + 0x50], rdi
lea rbx, [rsp + 0x40]
cmp r14, 8
cmovae rbx, r15
lea rcx, [rbx + rsi*2]
mov r8d, 2
lea rdx, [0x14008c6f0]
call fcn.140053920
mov word [rbx + rdi*2], r12w
jmp 0x140032181
mov qword [rsp + 0x20], 1
lea r9, [0x14008c6f0]
mov edx, 1
lea rcx, [rsp + 0x40]
call fcn.140005a70
mov r15, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x50]
mov r14, qword [rsp + 0x58]
mov rax, r14
sub rax, rsi
cmp rax, 0x10
jb 0x1400321cf
lea rdi, [rsi + 0x10]
mov qword [rsp + 0x50], rdi
lea rbx, [rsp + 0x40]
cmp r14, 8
cmovae rbx, r15
lea rcx, [rbx + rsi*2]
mov r8d, 0x20
lea rdx, str.FLiNGTrainerTemp
call fcn.140053920
mov word [rbx + rdi*2], r12w
jmp 0x1400321ee
mov qword [rsp + 0x20], 0x10
lea r9, str.FLiNGTrainerTemp
mov edx, 0x10
lea rcx, [rsp + 0x40]
call fcn.140005a70
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 8
cmovae rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140032223
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 8
cmovae rcx, qword [rsp + 0x40]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 8
cmovae rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14003242f
movdqa xmm0, xmmword [0x140092c40]
movdqu xmmword [rsp + 0x70], xmm0
mov word [rsp + 0x60], r12w
mov dword [rsp + 0x30], 1
mov rdx, qword [rsp + 0x50]
inc rdx
lea rcx, [rsp + 0x60]
call fcn.140005550
lea r9, [rsp + 0x40]
cmp qword [rsp + 0x58], 8
cmovae r9, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
sub rax, rsi
cmp rdi, rax
ja 0x1400322cf
lea rax, [rdi + rsi]
mov qword [rsp + 0x70], rax
lea rbx, [rsp + 0x60]
cmp rcx, 8
cmovae rbx, qword [rsp + 0x60]
lea r8, [rdi + rdi]
lea rcx, [rbx + rsi*2]
mov rdx, r9
call fcn.140053920
lea rax, [rsi + rdi]
mov word [rbx + rax*2], r12w
jmp 0x1400322e1
mov qword [rsp + 0x20], rdi
mov rdx, rdi
lea rcx, [rsp + 0x60]
call fcn.140005a70
mov rcx, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x14003232c
lea rdi, [rcx + 1]
mov qword [rsp + 0x70], rdi
lea rbx, [rsp + 0x60]
cmp rdx, 8
cmovae rbx, qword [rsp + 0x60]
lea rcx, [rbx + rcx*2]
mov r8d, 2
lea rdx, [0x14008c6f0]
call fcn.140053920
mov word [rbx + rdi*2], r12w
jmp 0x14003234b
mov qword [rsp + 0x20], 1
lea r9, [0x14008c6f0]
mov edx, 1
lea rcx, [rsp + 0x60]
call fcn.140005a70
lea rdx, [r13 + 0x70]
cmp qword [r13 + 0x88], 8
jb 0x14003235d
mov rdx, qword [r13 + 0x70]
mov r8, qword [r13 + 0x80]
lea rcx, [rsp + 0x60]
call fcn.1400057d0
movups xmm6, xmmword [rax]
movups xmmword [rbp - 0x80], xmm6
movups xmm7, xmmword [rax + 0x10]
movups xmmword [rbp - 0x70], xmm7
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], 7
mov word [rax], r12w
lea rbx, [r13 + 0x50]
lea rax, [rbp - 0x80]
cmp rbx, rax
je 0x1400323ab
mov rcx, rbx
call fcn.140003d20
movups xmmword [rbx], xmm6
movups xmmword [rbx + 0x10], xmm7
jmp 0x1400323ec
mov rdx, qword [rbp - 0x68]
cmp rdx, 8
jb 0x1400323ec
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400323e6
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400324ad
call fcn.1400352b4
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 8
jb 0x14003242f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140032429
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400324b3
call fcn.1400352b4
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 8
jb 0x14003246d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140032468
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400324a7
call fcn.1400352b4
mov rcx, qword [rbp + 0x2b0]
xor rcx, rsp
call fcn.140035290
lea r11, [rsp + 0x3e0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
movaps xmm6, xmmword [r11 - 0x10]
movaps xmm7, xmmword [r11 - 0x20]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.14005674c
nop
call fcn.14005674c
nop
call fcn.14005674c
int3