Function at 0x140031800
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 - 0x208]
sub rsp, 0x2e0
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 [0x1400ab088]
xor rax, rsp
mov qword [rbp + 0x1b0], rax
mov r15, rcx
xor r13d, r13d
mov dword [rsp + 0x30], r13d
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x60]
call fcn.140053400
lea rdx, [rbp - 0x60]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140031c85
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x58], 7
mov word [rsp + 0x40], r13w
lea rax, [rbp - 0x60]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rax + r8*2], r13w
jne 0x1400318a0
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x40]
call fcn.1400021b0
nop
lea r10, [rsp + 0x40]
mov r14, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x58]
cmp rsi, 8
cmovae r10, r14
lea r12, [0x140092e88]
mov r11, qword [rsp + 0x50]
cmp r11, 1
jb 0x14003193b
lea rcx, [r11 - 1]
mov rax, 0xffffffffffffffff
cmp rcx, rax
cmovb rax, rcx
lea r9, [r10 + rax*2]
mov r8, r9
sub r8, r12
nop
cmp word [r9], 0x5c
jne 0x14003192c
mov edx, 1
mov rcx, r12
nop
movzx eax, word [rcx]
cmp word [r8 + rcx], ax
jne 0x14003192c
add rcx, 2
sub rdx, 1
jne 0x140031910
sub r9, r10
sar r9, 1
jmp 0x140031942
cmp r9, r10
je 0x14003193b
sub r9, 2
sub r8, 2
jmp 0x140031900
mov r9, 0xffffffffffffffff
lea rax, [r11 - 1]
cmp r9, rax
je 0x1400319b0
mov rax, rsi
sub rax, r11
cmp rax, 1
jb 0x140031986
lea rdi, [r11 + 1]
mov qword [rsp + 0x50], rdi
lea rbx, [rsp + 0x40]
cmp rsi, 8
cmovae rbx, r14
lea rcx, [rbx + r11*2]
mov r8d, 2
mov rdx, r12
call fcn.1400535c0
mov word [rbx + rdi*2], r13w
jmp 0x1400319a1
mov qword [rsp + 0x20], 1
mov r9, r12
mov edx, 1
lea rcx, [rsp + 0x40]
call fcn.1400030c0
mov r14, qword [rsp + 0x40]
mov r11, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x58]
mov rax, rsi
sub rax, r11
cmp rax, 0x10
jb 0x1400319ef
lea rdi, [r11 + 0x10]
mov qword [rsp + 0x50], rdi
lea rbx, [rsp + 0x40]
cmp rsi, 8
cmovae rbx, r14
lea rcx, [rbx + r11*2]
mov r8d, 0x20
lea rdx, str.FLiNGTrainerTemp
call fcn.1400535c0
mov word [rbx + rdi*2], r13w
jmp 0x140031a0e
mov qword [rsp + 0x20], 0x10
lea r9, str.FLiNGTrainerTemp
mov edx, 0x10
lea rcx, [rsp + 0x40]
call fcn.1400030c0
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 0x140031a43
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 0x140031c47
movdqa xmm0, xmmword [0x1400971e0]
movdqu xmmword [rsp + 0x70], xmm0
mov word [rsp + 0x60], r13w
mov dword [rsp + 0x30], 1
mov rdx, qword [rsp + 0x50]
inc rdx
lea rcx, [rsp + 0x60]
call fcn.140002e00
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 0x140031aef
lea rax, [rsi + rdi]
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.1400535c0
lea rax, [rsi + rdi]
mov word [rbx + rax*2], r13w
jmp 0x140031b01
mov qword [rsp + 0x20], rdi
mov rdx, rdi
lea rcx, [rsp + 0x60]
call fcn.1400030c0
mov rcx, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
mov rax, rdx
sub rax, rcx
cmp rax, 1
jb 0x140031b48
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
mov rdx, r12
call fcn.1400535c0
mov word [rbx + rdi*2], r13w
jmp 0x140031b63
mov qword [rsp + 0x20], 1
mov r9, r12
mov edx, 1
lea rcx, [rsp + 0x60]
call fcn.1400030c0
lea rdx, [r15 + 0x70]
cmp qword [r15 + 0x88], 8
jb 0x140031b75
mov rdx, qword [r15 + 0x70]
mov r8, qword [r15 + 0x80]
lea rcx, [rsp + 0x60]
call fcn.140002ec0
movups xmm6, xmmword [rax]
movups xmmword [rbp - 0x80], xmm6
movups xmm7, xmmword [rax + 0x10]
movups xmmword [rbp - 0x70], xmm7
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], 7
mov word [rax], r13w
lea rbx, [r15 + 0x50]
lea rax, [rbp - 0x80]
cmp rbx, rax
je 0x140031bc3
mov rcx, rbx
call fcn.140001f20
movups xmmword [rbx], xmm6
movups xmmword [rbx + 0x10], xmm7
jmp 0x140031c04
mov rdx, qword [rbp - 0x68]
cmp rdx, 8
jb 0x140031c04
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140031bfe
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140031cc5
call fcn.140034f54
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 8
jb 0x140031c47
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140031c41
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140031ccb
call fcn.140034f54
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 8
jb 0x140031c85
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140031c80
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140031cbf
call fcn.140034f54
mov rcx, qword [rbp + 0x1b0]
xor rcx, rsp
call fcn.140034f30
lea r11, [rsp + 0x2e0]
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.1400566cc
nop
call fcn.1400566cc
nop
call fcn.1400566cc
int3