Function at 0x140043308
Capabilities:
Get common file path
Write file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2070]
mov eax, 0x2170
call fcn.140087360
sub rsp, rax
mov rax, qword [0x14010d440]
xor rax, rsp
mov qword [rbp + 0x2060], rax
mov rdi, rdx
mov ebx, ecx
xor r15d, r15d
mov rcx, qword [0x140120978]
test rcx, rcx
jne 0x140043366
call fcn.1400439a8
test al, al
je 0x140043920
mov rcx, qword [0x140120978]
mov sil, r15b
mov qword [rsp + 0x50], r15
mov rax, qword [rcx]
mov qword [rsp + 0x50], r15
lea rdx, [rsp + 0x50]
call qword [rax + 0x68]
test eax, eax
js 0x14004390c
mov qword [rsp + 0x48], r15
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140043979
mov rax, qword [rcx]
mov qword [rsp + 0x48], r15
lea r8, [rsp + 0x48]
lea rdx, [0x1400be3b8]
call qword [rax]
test eax, eax
js 0x1400438fb
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x58], xmm0
mov qword [rsp + 0x68], r15
lea r8, [rsp + 0x58]
mov rdx, rdi
mov ecx, ebx
call fcn.140052d2c
mov r13d, 0x1000
mov rcx, qword [rsp + 0x58]
cmp qword [rsp + 0x60], rcx
je 0x1400438c7
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0x60]
call fcn.1400b02e0
lea rdx, [rbp + 0x60]
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x1400438c2
xorps xmm0, xmm0
movups xmmword [rbp + 0x18], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x28], xmm1
mov r8d, 0x11
lea rdx, str.FLiNGTrainer.tmp
lea rcx, [rbp + 0x18]
call fcn.1400031c0
nop
lea rax, [rbp + 0x60]
or r9, 0xffffffffffffffff
inc r9
cmp word [rax + r9*2], r15w
jne 0x14004343e
lea r8, [rbp + 0x60]
xor edx, edx
lea rcx, [rbp + 0x18]
call fcn.140043afc
xorps xmm0, xmm0
movups xmmword [rsp + 0x78], xmm0
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x70], r15
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x78], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x78], xmm1
mov qword [rax + 0x10], r15
mov r12d, 7
mov qword [rax + 0x18], r12
mov word [rax], r15w
mov rdx, qword [rbp + 0x30]
cmp rdx, r12
jbe 0x1400434c4
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x18]
mov rax, rcx
cmp rdx, r13
jb 0x1400434bf
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140043984
call fcn.140086ebc
movdqa xmm0, xmmword [0x1400b6d20]
movdqu xmmword [rbp + 0x28], xmm0
mov word [rbp + 0x18], r15w
xorps xmm0, xmm0
movups xmmword [rbp - 0x68], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x58], xmm1
mov r8d, 1
lea rdx, [0x1400be3c8]
lea rcx, [rbp - 0x68]
call fcn.1400031c0
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x28], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x18], xmm1
mov ebx, 2
mov r8d, ebx
lea rdx, [0x1400beb0c]
lea rcx, [rbp - 0x28]
call fcn.1400031c0
nop
lea r8, [rbp - 0x68]
lea rdx, [rbp - 0x28]
lea rcx, [rsp + 0x78]
call fcn.1400576cc
nop
lea rcx, [rbp - 0x28]
call fcn.140021960
nop
mov rdx, qword [rbp - 0x50]
cmp rdx, r12
jbe 0x14004357c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, r13
jb 0x140043577
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14004398a
call fcn.140086ebc
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], r12
cmova rcx, qword [rsp + 0x78]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], ebx
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x14004381d
xorps xmm0, xmm0
movups xmmword [rbp - 8], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 8], xmm1
mov rdi, qword [rbp - 0x78]
lea r14, [rsp + 0x78]
cmp qword [rbp - 0x70], r12
cmova r14, qword [rsp + 0x78]
movabs rbx, 0x7ffffffffffffffe
cmp rdi, rbx
ja 0x140043990
cmp rdi, r12
ja 0x140043608
mov qword [rbp + 8], rdi
mov qword [rbp + 0x10], r12
movups xmm0, xmmword [r14]
movdqu xmmword [rbp - 8], xmm0
jmp 0x140043687
mov rax, rdi
or rax, r12
cmp rax, rbx
jbe 0x140043623
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x140043651
mov rbx, rax
mov ecx, 0xa
cmp rax, rcx
cmovb rbx, rcx
lea rcx, [rbx + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x140043996
add rcx, rcx
cmp rcx, r13
jb 0x140043658
call fcn.140002ab0
jmp 0x140043667
test rcx, rcx
je 0x140043664
call fcn.140086e80
jmp 0x140043667
mov rax, r15
mov qword [rbp - 8], rax
mov qword [rbp + 8], rdi
mov qword [rbp + 0x10], rbx
lea r8, [rdi*2 + 2]
mov rdx, r14
mov rcx, rax
call fcn.1400afc40
nop
mov edi, r15d
mov r14d, 4
lea rdx, [rbp - 8]
lea rcx, [rsp + 0x78]
call fcn.1400096c4
mov edx, edi
lea rcx, [rbp + 0x38]
call fcn.140042cf8
nop
mov r9d, 1
lea r8, [0x1400beb24]
xor edx, edx
lea rcx, [rbp + 0x38]
call fcn.140043afc
xorps xmm0, xmm0
movups xmmword [rbp - 0x48], xmm0
mov qword [rbp - 0x38], r15
mov qword [rbp - 0x30], r15
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x48], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x38], xmm1
mov qword [rax + 0x18], r12
mov qword [rax + 0x10], r15
mov word [rax], r15w
mov r8, r14
lea rdx, str..tmp
lea rcx, [rbp - 0x48]
call fcn.14004049c
xorps xmm0, xmm0
movups xmmword [rbp - 0x68], xmm0
mov qword [rbp - 0x58], r15
mov qword [rbp - 0x50], r15
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x68], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x58], xmm1
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r12
mov word [rax], r15w
xorps xmm0, xmm0
movups xmmword [rbp - 0x28], xmm0
mov qword [rbp - 0x18], r15
mov qword [rbp - 0x10], r15
mov r8, r14
lea rdx, str..tmp
lea rcx, [rbp - 0x28]
call fcn.1400031c0
nop
lea r8, [rbp - 0x68]
lea rdx, [rbp - 0x28]
lea rcx, [rsp + 0x78]
call fcn.1400576cc
nop
lea rcx, [rbp - 0x28]
call fcn.140021960
nop
lea rcx, [rbp - 0x68]
call fcn.140021960
nop
mov rdx, qword [rbp - 0x30]
cmp rdx, r12
jbe 0x1400437ae
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, r13
jb 0x1400437a9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400439a2
call fcn.140086ebc
mov qword [rbp - 0x38], r15
mov qword [rbp - 0x30], r12
mov word [rbp - 0x48], r15w
lea rcx, [rbp + 0x38]
call fcn.140021960
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], r12
cmova rcx, qword [rsp + 0x78]
mov qword [rsp + 0x30], r15
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 0x14004380e
inc edi
cmp edi, 0x32
jl 0x140043690
lea rcx, [rbp - 8]
call fcn.140021960
cmp rbx, 0xffffffffffffffff
je 0x14004384b
mov dword [rsp + 0x40], r15d
mov r8, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
sub r8, rdx
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x40]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x78]
call fcn.14005720c
test al, al
je 0x1400438b8
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], r12
jbe 0x14004394a
mov rcx, qword [rsp + 0x78]
test rcx, rcx
jne 0x14004394a
mov rbx, r15
mov qword [rsp + 0x70], rbx
mov dword [rsp + 0x40], r15d
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140043963
mov rax, qword [rcx]
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rdx, rbx
call qword [rax + 0x190]
mov esi, eax
shr esi, 0x1f
xor sil, 1
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
nop
lea rcx, [rsp + 0x78]
call fcn.140021960
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1400438fb
mov rdx, qword [rsp + 0x68]
sub rdx, rcx
mov rax, rcx
cmp rdx, r13
jb 0x1400438f5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14004399c
call fcn.140086ebc
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14004390c
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14004391d
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
mov al, sil
mov rcx, qword [rbp + 0x2060]
xor rcx, rsp
call fcn.140087330
mov rbx, qword [rsp + 0x21c0]
add rsp, 0x2170
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
nop
mov rbx, rax
mov qword [rsp + 0x70], rax
test rax, rax
je 0x14004396e
jmp 0x14004387e
mov ecx, 0x80004003
call fcn.140084510
nop
mov ecx, 0x8007000e
call fcn.140042fe4
nop
mov ecx, 0x80004003
call fcn.140084510
nop
call fcn.14008deb0
int3
call fcn.14008deb0
int3
call fcn.140021bc4
int3
call fcn.140021494
nop
call fcn.14008deb0
nop
call fcn.14008deb0
int3