Function at 0x1400166f0
Capabilities:
Check if file exists
Get common file path
Get file attributes
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x20a0]
mov eax, 0x21a0
call fcn.14003b130
sub rsp, rax
mov rax, qword [0x14008b048]
xor rax, rsp
mov qword [rbp + 0x2090], rax
mov rcx, qword [0x14008e590]
test rcx, rcx
jne 0x14001674e
call fcn.1400162c0
test al, al
je 0x140016f8a
mov rcx, qword [0x14008e590]
xor dil, dil
xor ebx, ebx
mov qword [rsp + 0x50], rbx
mov rax, qword [rcx]
mov qword [rsp + 0x50], rbx
lea rdx, [rsp + 0x50]
call qword [rax + 0x68]
test eax, eax
js 0x140016f75
mov qword [rsp + 0x48], rbx
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140016fcb
mov rax, qword [rcx]
mov qword [rsp + 0x48], rbx
lea r8, [rsp + 0x48]
lea rdx, [0x140079198]
call qword [rax]
test eax, eax
js 0x140016f64
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], rbx
lea r8, [rsp + 0x60]
lea rdx, [0x140078a8c]
lea ecx, [rbx + 0x65]
call fcn.1400159b0
mov rax, qword [rsp + 0x68]
mov r13, qword [rsp + 0x60]
sub rax, r13
mov qword [rsp + 0x58], rax
je 0x140016f2d
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0x90]
call fcn.14003cbc0
lea rdx, [rbp + 0x90]
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140016f2d
mov qword [rbp - 0x28], rbx
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x10], 7
mov word [rbp - 0x28], bx
lea r8d, [rbx + 0x11]
lea rdx, str.FLiNGTrainer.tmp
lea rcx, [rbp - 0x28]
call fcn.1400040a0
nop
lea rax, [rbp + 0x90]
mov r9, 0xffffffffffffffff
inc r9
cmp word [rax + r9*2], 0
jne 0x140016840
lea r8, [rbp + 0x90]
lea rcx, [rbp - 0x28]
call fcn.14000b000
mov qword [rsp + 0x78], rbx
mov qword [rbp - 0x78], rbx
mov qword [rbp - 0x70], rbx
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x78], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x78], xmm1
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], 7
mov word [rax], bx
mov rdx, qword [rbp - 0x10]
cmp rdx, 8
jb 0x1400168c7
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400168c2
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140016fd6
call fcn.14003a990
mov qword [rbp - 0x18], rbx
mov qword [rbp - 0x10], 7
mov word [rbp - 0x28], bx
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x58], rbx
mov qword [rbp - 0x50], 7
mov word [rbp - 0x68], bx
mov r8d, 1
lea rdx, [0x1400752c0]
lea rcx, [rbp - 0x68]
call fcn.1400040a0
nop
mov qword [rbp - 0x48], rbx
mov qword [rbp - 0x38], rbx
mov qword [rbp - 0x30], 7
mov word [rbp - 0x48], bx
mov r8d, 2
lea rdx, [0x14007917c]
lea rcx, [rbp - 0x48]
call fcn.1400040a0
nop
mov r12, qword [rbp - 0x30]
cmp r12, 8
setae r15b
mov r14, qword [rbp - 0x38]
mov rsi, qword [rbp - 0x48]
mov rdi, qword [rbp - 0x58]
nop word [rax + rax]
lea r9, [rbp - 0x48]
test r15b, r15b
cmovne r9, rsi
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae rcx, qword [rsp + 0x78]
mov qword [rsp + 0x20], r14
mov r8, rbx
mov rdx, qword [rbp - 0x78]
call fcn.140005c00
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400169b1
lea r9, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae r9, qword [rbp - 0x68]
mov qword [rsp + 0x20], rdi
mov r8, r14
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.14001b3f0
mov rdi, qword [rbp - 0x58]
add rbx, rdi
jmp 0x140016950
test r15b, r15b
je 0x1400169ec
lea rdx, [r12*2 + 2]
mov rax, rsi
cmp rdx, 0x1000
jb 0x1400169e3
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140016fdc
mov rcx, rsi
call fcn.14003a990
nop
mov rdx, qword [rbp - 0x50]
cmp rdx, 8
jb 0x140016a2c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016a27
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140016fe2
call fcn.14003a990
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae rcx, qword [rsp + 0x78]
xor edi, edi
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [rdi + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140016e37
lea rdx, [rsp + 0x78]
lea rcx, [rbp + 0x38]
call fcn.1400151c0
nop
mov r12d, edi
mov ebx, 0x2d
lea rdx, [rbp + 0x38]
cmp qword [rbp + 0x50], 8
cmovae rdx, qword [rbp + 0x38]
mov r8, qword [rbp + 0x48]
lea rcx, [rsp + 0x78]
call fcn.1400040a0
lea r9, [rbp + 0x82]
test r12d, r12d
jns 0x140016af9
mov ecx, r12d
neg ecx
nop word [rax + rax]
sub r9, 2
mov eax, 0xcccccccd
mul ecx
shr edx, 3
movzx eax, dx
shl ax, 2
lea r8d, [rax + rdx]
add r8w, r8w
sub cx, r8w
add cx, 0x30
mov word [r9], cx
mov ecx, edx
test edx, edx
jne 0x140016ac0
add r9, 0xfffffffffffffffe
mov word [r9], bx
jmp 0x140016b30
mov r8d, r12d
nop dword [rax]
sub r9, 2
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dx
shl ax, 2
lea ecx, [rax + rdx]
add cx, cx
sub r8w, cx
add r8w, 0x30
mov word [r9], r8w
mov r8d, edx
test edx, edx
jne 0x140016b00
mov qword [rbp + 0x18], rdi
mov qword [rbp + 0x28], rdi
mov qword [rbp + 0x30], 7
mov word [rbp + 0x18], di
lea rax, [rbp + 0x82]
cmp r9, rax
je 0x140016b6a
lea r8, [rbp + 0x82]
sub r8, r9
sar r8, 1
mov rdx, r9
lea rcx, [rbp + 0x18]
call fcn.1400040a0
nop
mov r9d, 1
lea r8, [0x140079194]
lea rcx, [rbp + 0x18]
call fcn.14000b000
mov qword [rbp - 0x68], rdi
mov qword [rbp - 0x58], rdi
mov qword [rbp - 0x50], rdi
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x68], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x58], xmm1
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], 7
mov word [rax], di
mov r8d, 4
lea rdx, str..tmp
lea rcx, [rbp - 0x68]
call fcn.140005680
movups xmm0, xmmword [rax]
movups xmmword [rbp - 8], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 8], xmm1
mov qword [rax + 0x10], rdi
mov qword [rax + 0x18], 7
mov word [rax], di
mov qword [rbp - 0x48], rdi
mov qword [rbp - 0x38], rdi
mov qword [rbp - 0x30], 7
mov word [rbp - 0x48], di
mov r8d, 4
lea rdx, str..tmp
lea rcx, [rbp - 0x48]
call fcn.1400040a0
nop
mov rbx, rdi
mov r13, qword [rbp - 0x30]
cmp r13, 8
setae r15b
mov r14, qword [rbp - 0x38]
mov rsi, qword [rbp - 0x48]
mov rdi, qword [rbp + 8]
nop dword [rax]
nop dword [rax + rax]
lea r9, [rbp - 0x48]
test r15b, r15b
cmovne r9, rsi
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae rcx, qword [rsp + 0x78]
mov qword [rsp + 0x20], r14
mov r8, rbx
mov rdx, qword [rbp - 0x78]
call fcn.140005c00
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x140016c91
lea r9, [rbp - 8]
cmp qword [rbp + 0x10], 8
cmovae r9, qword [rbp - 8]
mov qword [rsp + 0x20], rdi
mov r8, r14
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.14001b3f0
mov rdi, qword [rbp + 8]
add rbx, rdi
jmp 0x140016c30
test r15b, r15b
je 0x140016ccc
lea rdx, [r13*2 + 2]
mov rax, rsi
cmp rdx, 0x1000
jb 0x140016cc3
add rdx, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140016fe8
mov rcx, rsi
call fcn.14003a990
nop
mov rdx, qword [rbp + 0x10]
cmp rdx, 8
jb 0x140016d0d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016d07
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140016fee
call fcn.14003a990
nop
mov rdx, qword [rbp - 0x50]
cmp rdx, 8
jb 0x140016d4d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016d48
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140016ff4
call fcn.14003a990
xor edi, edi
mov qword [rbp - 0x58], rdi
mov qword [rbp - 0x50], 7
mov word [rbp - 0x68], di
mov rdx, qword [rbp + 0x30]
cmp rdx, 8
jb 0x140016d9f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x18]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016d9a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140016ffa
call fcn.14003a990
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae rcx, qword [rsp + 0x78]
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140016dec
inc r12d
cmp r12d, 0x32
jl 0x140016a84
mov rdx, qword [rbp + 0x50]
cmp rdx, 8
jb 0x140016e2c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016e27
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140016fe2
call fcn.14003a990
mov r13, qword [rsp + 0x60]
cmp rbx, 0xffffffffffffffff
je 0x140016e5f
mov dword [rsp + 0x40], edi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x40]
mov r8d, dword [rsp + 0x58]
mov rdx, r13
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140016ee8
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
jb 0x140016ecf
mov rcx, qword [rsp + 0x78]
test rcx, rcx
jne 0x140016ecf
mov rbx, rdi
mov qword [rsp + 0x58], rbx
mov dword [rsp + 0x40], edi
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140017000
mov rax, qword [rcx]
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rdx, rbx
call qword [rax + 0x190]
test eax, eax
setns dil
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x140016eeb
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x140016fc0
jmp 0x140016e98
xor dil, dil
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x140016f2d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140016f27
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001700b
call fcn.14003a990
nop
test r13, r13
je 0x140016f64
mov rdx, qword [rsp + 0x70]
sub rdx, r13
mov rax, r13
cmp rdx, 0x1000
jb 0x140016f5b
add rdx, 0x27
mov r13, qword [r13 - 8]
sub rax, r13
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140016fba
mov rcx, r13
call fcn.14003a990
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140016f75
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140016f86
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
movzx eax, dil
mov rcx, qword [rbp + 0x2090]
xor rcx, rsp
call fcn.14003a970
lea r11, [rsp + 0x21a0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
call fcn.1400412d4
nop
mov ecx, 0x8007000e
call fcn.140015d80
nop
mov ecx, 0x80004003
call fcn.140038960
nop
call fcn.1400412d4
nop
call fcn.1400412d4
nop
call fcn.1400412d4
nop
call fcn.1400412d4
nop
call fcn.1400412d4
nop
call fcn.1400412d4
nop
call fcn.1400412d4
nop
mov ecx, 0x80004003
call fcn.140038960
nop
call fcn.1400412d4
int3