Function at 0x140038640
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 r12
push r14
push r15
lea rbp, [rsp - 0x2d0]
sub rsp, 0x3d0
mov rax, qword [0x14007f048]
xor rax, rsp
mov qword [rbp + 0x2c0], rax
mov rsi, rcx
xor r12d, r12d
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0xb0]
call fcn.14003c9c0
lea rdx, [rbp + 0xb0]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x1400389ae
xorps xmm0, xmm0
movups xmmword [rsp + 0x48], xmm0
mov qword [rsp + 0x58], r12
mov qword [rsp + 0x60], r12
lea rax, [rbp + 0xb0]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], r12w
jne 0x1400386c6
lea rdx, [rbp + 0xb0]
lea rcx, [rsp + 0x48]
call fcn.140007620
nop
lea rbx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rbx, qword [rsp + 0x48]
lea r15, [0x14006dd44]
mov rdi, qword [rsp + 0x58]
test rdi, rdi
je 0x1400387c3
mov r14d, 0x100
mov r8d, r14d
xor edx, edx
lea rcx, [rbp - 0x50]
call fcn.14003c9c0
mov rcx, r15
lea rdx, [0x14006dd46]
movzx eax, word [rcx]
cmp ax, r14w
jae 0x140038771
movzx eax, al
mov byte [rbp + rax - 0x50], 1
add rcx, 2
cmp rcx, rdx
jne 0x140038726
lea rcx, [rdi - 1]
mov rax, 0xffffffffffffffff
cmp rcx, rax
cmovb rax, rcx
lea rcx, [rbx + rax*2]
movzx eax, word [rcx]
cmp ax, r14w
jae 0x140038766
cmp byte [rbp + rax - 0x50], 0
jne 0x1400387bb
cmp rcx, rbx
je 0x1400387c3
sub rcx, 2
jmp 0x140038756
lea rcx, [rdi - 1]
mov rax, 0xffffffffffffffff
cmp rcx, rax
cmovb rax, rcx
lea rcx, [rbx + rax*2]
nop word [rax + rax]
mov edx, 1
mov rax, r15
movzx r8d, word [rcx]
nop dword [rax]
cmp word [rax], r8w
je 0x1400387bb
add rax, 2
sub rdx, 1
jne 0x1400387a0
cmp rcx, rbx
je 0x1400387c3
sub rcx, 2
jmp 0x140038790
sub rcx, rbx
sar rcx, 1
jmp 0x1400387ca
mov rcx, 0xffffffffffffffff
lea rax, [rdi - 1]
cmp rcx, rax
je 0x1400387e6
mov r8d, 1
mov rdx, r15
lea rcx, [rsp + 0x48]
call fcn.140007250
mov r8d, 0x10
lea rdx, str.FLiNGTrainerTemp
lea rcx, [rsp + 0x48]
call fcn.140007250
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140038832
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140038970
movabs rax, 0x7ffffffffffffffe
mov rcx, qword [rsp + 0x58]
sub rax, rcx
cmp rax, 1
jb 0x1400389df
lea r9, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae r9, qword [rsp + 0x48]
mov qword [rsp + 0x30], 1
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], rcx
lea rcx, [rbp - 0x78]
call fcn.140008590
nop
lea rdx, [rsi + 0x70]
cmp qword [rsi + 0x88], 8
jb 0x1400388ae
mov rdx, qword [rsi + 0x70]
mov r8, qword [rsi + 0x80]
lea rcx, [rbp - 0x78]
call fcn.140007250
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x68], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rsp + 0x78], xmm1
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], 7
mov word [rax], r12w
lea rcx, [rsi + 0x50]
lea rdx, [rsp + 0x68]
call fcn.140006d50
mov rdx, qword [rbp - 0x80]
cmp rdx, 8
jb 0x14003892f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038929
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400389e5
call fcn.14003a850
nop
mov rdx, qword [rbp - 0x60]
cmp rdx, 8
jb 0x140038970
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003896a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400389eb
call fcn.14003a850
nop
mov rdx, qword [rsp + 0x60]
cmp rdx, 8
jb 0x1400389ae
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400389a9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400389d9
call fcn.14003a850
mov rcx, qword [rbp + 0x2c0]
xor rcx, rsp
call fcn.14003a830
lea r11, [rsp + 0x3d0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
call fcn.14004147c
nop
call fcn.1400012c0
nop
call fcn.14004147c
nop
call fcn.14004147c
int3