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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x2098]
mov eax, 0x2170
call fcn.1400871f0
sub rsp, rax
mov rax, qword [0x14010c0c0]
xor rax, rsp
mov qword [rbp + 0x2060], rax
xor r13d, r13d
mov rcx, qword [0x140120570]
test rcx, rcx
jne 0x1400439a4
call fcn.1400435d4
test al, al
je 0x140043f70
mov rcx, qword [0x140120570]
mov r14b, r13b
mov qword [rsp + 0x50], r13
mov rax, qword [rcx]
mov qword [rsp + 0x50], r13
lea rdx, [rsp + 0x50]
call qword [rax + 0x68]
test eax, eax
js 0x140043f5c
mov qword [rsp + 0x48], r13
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140043fcf
mov rax, qword [rcx]
mov qword [rsp + 0x48], r13
lea r8, [rsp + 0x48]
lea rdx, [0x1400f83a8]
call qword [rax]
test eax, eax
js 0x140043f4b
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], r13
lea r8, [rsp + 0x60]
lea rdx, [0x1400f7ca4]
mov ecx, 0x65
call fcn.140051db8
mov r12, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x60]
mov ebx, 0x1000
sub r12, rdi
je 0x140043f14
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0x60]
call fcn.1400af970
lea rdx, [rbp + 0x60]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140043f14
xorps xmm0, xmm0
movups xmmword [rbp - 8], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 8], xmm1
mov r8d, 0x11
lea rdx, str.FLiNGTrainer.tmp
lea rcx, [rbp - 8]
call fcn.140005dcc
nop
lea rax, [rbp + 0x60]
or r9, 0xffffffffffffffff
inc r9
cmp word [rax + r9*2], r13w
jne 0x140043a84
lea r8, [rbp + 0x60]
lea rcx, [rbp - 8]
call fcn.140044018
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
mov qword [rbp - 0x78], r13
mov qword [rbp - 0x70], r13
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x78], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x78], xmm1
mov qword [rax + 0x10], r13
mov r15d, 7
mov qword [rax + 0x18], r15
mov word [rax], r13w
mov rdx, qword [rbp + 0x10]
cmp rdx, r15
jbe 0x140043b08
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 8]
mov rax, rcx
cmp rdx, rbx
jb 0x140043b03
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140043fda
call fcn.1400864f0
movdqa xmm0, xmmword [0x1400fc480]
movdqu xmmword [rbp + 8], xmm0
mov word [rbp - 8], r13w
xorps xmm0, xmm0
movups xmmword [rbp - 0x68], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x58], xmm1
mov r8d, 1
lea rdx, [0x1400f7c38]
lea rcx, [rbp - 0x68]
call fcn.140005dcc
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x28], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x18], xmm1
mov esi, 2
mov r8d, esi
lea rdx, [0x1400f838c]
lea rcx, [rbp - 0x28]
call fcn.140005dcc
nop
lea r8, [rbp - 0x68]
lea rdx, [rbp - 0x28]
lea rcx, [rsp + 0x78]
call fcn.140052488
nop
lea rcx, [rbp - 0x28]
call fcn.14001a780
nop
mov rdx, qword [rbp - 0x50]
cmp rdx, r15
jbe 0x140043bc0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, rbx
jb 0x140043bbb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140043fe0
call fcn.1400864f0
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], r15
cmova rcx, qword [rsp + 0x78]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], esi
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140043e63
xorps xmm0, xmm0
movups xmmword [rbp - 0x68], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x58], xmm1
mov rsi, qword [rbp - 0x78]
lea r15, [rsp + 0x78]
lea ecx, [rax + 8]
cmp qword [rbp - 0x70], rcx
cmova r15, qword [rsp + 0x78]
movabs rbx, 0x7ffffffffffffffe
cmp rsi, rbx
ja 0x140043fe6
cmp rsi, rcx
ja 0x140043c52
mov qword [rbp - 0x58], rsi
mov qword [rbp - 0x50], rcx
movups xmm0, xmmword [r15]
movdqu xmmword [rbp - 0x68], xmm0
jmp 0x140043cd5
mov rax, rsi
or rax, rcx
cmp rax, rbx
jbe 0x140043c6d
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x140043c9f
mov rbx, rax
mov ecx, 0xa
cmp rax, rcx
cmovb rbx, rcx
lea rcx, [rbx + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x140043fec
add rcx, rcx
cmp rcx, 0x1000
jb 0x140043ca6
call fcn.14001ee68
jmp 0x140043cb5
test rcx, rcx
je 0x140043cb2
call fcn.140086524
jmp 0x140043cb5
mov rax, r13
mov qword [rbp - 0x68], rax
mov qword [rbp - 0x58], rsi
mov qword [rbp - 0x50], rbx
lea r8, [rsi*2 + 2]
mov rdx, r15
mov rcx, rax
call fcn.1400af2d0
nop
mov esi, r13d
mov r15d, 7
lea rdx, [rbp - 0x68]
lea rcx, [rsp + 0x78]
call fcn.140019de0
mov edx, esi
lea rcx, [rbp + 0x38]
call fcn.140042f00
nop
mov r9d, 1
lea r8, [0x1400f83a4]
mov rcx, rax
call fcn.140044018
xorps xmm0, xmm0
movups xmmword [rbp - 0x48], xmm0
mov qword [rbp - 0x38], r13
mov qword [rbp - 0x30], r13
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x48], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x38], xmm1
mov qword [rax + 0x18], r15
mov qword [rax + 0x10], r13
mov word [rax], r13w
mov r8d, 4
lea rdx, str..tmp
lea rcx, [rbp - 0x48]
call fcn.140019ce8
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0x18], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x28], xmm1
mov qword [rax + 0x10], r13
mov qword [rax + 0x18], r15
mov word [rax], r13w
xorps xmm0, xmm0
movups xmmword [rbp - 0x28], xmm0
mov qword [rbp - 0x18], r13
mov qword [rbp - 0x10], r13
mov r8d, 4
lea rdx, str..tmp
lea rcx, [rbp - 0x28]
call fcn.140005dcc
nop
lea r8, [rbp + 0x18]
lea rdx, [rbp - 0x28]
lea rcx, [rsp + 0x78]
call fcn.140052488
nop
lea rcx, [rbp - 0x28]
call fcn.14001a780
nop
lea rcx, [rbp + 0x18]
call fcn.14001a780
nop
mov rdx, qword [rbp - 0x30]
cmp rdx, r15
jbe 0x140043df4
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140043def
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140043ff8
call fcn.1400864f0
mov qword [rbp - 0x38], r13
mov qword [rbp - 0x30], r15
mov word [rbp - 0x48], r13w
lea rcx, [rbp + 0x38]
call fcn.14001a780
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], r15
cmova rcx, qword [rsp + 0x78]
mov qword [rsp + 0x30], r13
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 0x140043e54
inc esi
cmp esi, 0x32
jl 0x140043cde
lea rcx, [rbp - 0x68]
call fcn.14001a780
cmp rbx, 0xffffffffffffffff
je 0x140043e8a
mov dword [rsp + 0x40], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x40]
mov r8d, r12d
mov rdx, rdi
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], r15
cmova rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140043f05
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], r15
jbe 0x140043fa0
mov rcx, qword [rsp + 0x78]
test rcx, rcx
jne 0x140043fa0
mov rbx, r13
mov qword [rsp + 0x58], rbx
mov dword [rsp + 0x40], r13d
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140043fb9
mov rax, qword [rcx]
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rdx, rbx
call qword [rax + 0x190]
mov r14d, eax
shr r14d, 0x1f
xor r14b, 1
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
nop
lea rcx, [rsp + 0x78]
call fcn.14001a780
mov ebx, 0x1000
test rdi, rdi
je 0x140043f4b
mov rdx, qword [rsp + 0x70]
sub rdx, rdi
mov rax, rdi
cmp rdx, rbx
jb 0x140043f42
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140043ff2
mov rcx, rdi
call fcn.1400864f0
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140043f5c
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140043f6d
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
mov al, r14b
mov rcx, qword [rbp + 0x2060]
xor rcx, rsp
call fcn.1400864d0
lea r11, [rsp + 0x2170]
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 qword [sym.imp.OLEAUT32.dll_SysReAllocString]
nop
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x140043fc4
jmp 0x140043ec9
mov ecx, 0x80004003
call fcn.1400837a0
nop
mov ecx, 0x8007000e
call fcn.140043014
nop
mov ecx, 0x80004003
call fcn.1400837a0
nop
call fcn.14008d5e0
int3
call fcn.14008d5e0
int3
call fcn.140001784
int3
call fcn.1400016ec
nop
call fcn.14008d5e0
nop
call fcn.14008d5e0
int3