Function at 0x140035420
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 - 0x20b0]
mov eax, 0x21b0
call fcn.140083500
sub rsp, rax
mov rax, qword [0x1400e54e8]
xor rax, rsp
mov qword [rbp + 0x20a0], rax
mov rdi, rdx
mov ebx, ecx
xor r15d, r15d
mov rcx, qword [0x1400e7be0]
test rcx, rcx
jne 0x14003547e
call fcn.140035df0
test al, al
je 0x140035d50
mov rcx, qword [0x1400e7be0]
xor sil, sil
mov dword [rsp + 0x58], esi
mov qword [rsp + 0x68], r15
mov rax, qword [rcx]
mov qword [rsp + 0x68], r15
lea rdx, [rsp + 0x68]
call qword [rax + 0x68]
test eax, eax
js 0x140035d3b
mov qword [rsp + 0x60], r15
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140035d8b
mov rax, qword [rcx]
mov qword [rsp + 0x60], r15
lea r8, [rsp + 0x60]
lea rdx, [0x1400b5018]
call qword [rax]
test eax, eax
js 0x140035d2a
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x70], xmm0
mov qword [rbp - 0x80], r15
lea r8, [rsp + 0x70]
mov rdx, rdi
mov ecx, ebx
call fcn.140046160
mov rcx, qword [rsp + 0x70]
cmp qword [rsp + 0x78], rcx
je 0x140035cf7
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0xa0]
call fcn.1400859f0
lea rdx, [rbp + 0xa0]
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140035cf2
xorps xmm0, xmm0
movups xmmword [rbp + 8], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x18], xmm1
mov r8d, 0x11
lea rdx, str.FLiNGTrainer.tmp
lea rcx, [rbp + 8]
call fcn.1400030d0
nop
lea r8, [rbp + 8]
lea rdx, [rbp + 0xa0]
lea rcx, [rbp - 0x78]
call fcn.140034d90
nop
mov rdx, qword [rbp + 0x20]
cmp rdx, 8
jb 0x1400355a8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400355a3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140035d96
call fcn.140083048
movdqa xmm0, xmmword [0x1400b1b70]
movdqu xmmword [rbp + 0x18], xmm0
mov word [rbp + 8], r15w
xorps xmm0, xmm0
movups xmmword [rbp - 0x38], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x28], xmm1
mov r8d, 1
lea rdx, [0x1400b1cbc]
lea rcx, [rbp - 0x38]
call fcn.1400030d0
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x58], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x48], xmm1
mov r8d, 2
lea rdx, [0x1400b576c]
lea rcx, [rbp - 0x58]
call fcn.1400030d0
nop
lea r8, [rbp - 0x38]
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x78]
call fcn.14004b3d0
nop
mov rdx, qword [rbp - 0x40]
cmp rdx, 8
jb 0x140035658
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140035653
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140035d9c
call fcn.140083048
movdqa xmm0, xmmword [0x1400b1b70]
movdqu xmmword [rbp - 0x48], xmm0
mov word [rbp - 0x58], r15w
mov rdx, qword [rbp - 0x20]
cmp rdx, 8
jb 0x1400356aa
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400356a5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140035da2
call fcn.140083048
lea rcx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rcx, qword [rbp - 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 rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140035c03
xorps xmm0, xmm0
movups xmmword [rbp - 0x18], xmm0
mov qword [rbp - 8], r15
mov qword [rbp], r15
mov r12, qword [rbp - 0x68]
lea rbx, [rbp - 0x78]
mov r14, qword [rbp - 0x60]
cmp r14, 8
cmovae rbx, qword [rbp - 0x78]
movabs rdx, 0x7ffffffffffffffe
cmp r12, rdx
ja 0x140035da8
cmp r12, 8
jae 0x14003574e
mov qword [rbp - 8], r12
mov edi, 7
mov qword [rsp + 0x48], rdi
mov qword [rbp], rdi
movups xmm0, xmmword [rbx]
movups xmmword [rbp - 0x18], xmm0
movq rsi, xmm0
mov qword [rsp + 0x50], rsi
jmp 0x1400357b7
mov rdi, r12
or rdi, 7
cmp rdi, rdx
jbe 0x140035764
mov rdi, rdx
mov qword [rsp + 0x48], rdx
jmp 0x140035775
mov eax, 0xa
cmp rdi, rax
cmovb rdi, rax
mov qword [rsp + 0x48], rdi
lea rdx, [rdi + 1]
lea rcx, [rbp - 0x18]
call fcn.140027610
mov rsi, rax
mov qword [rsp + 0x50], rax
mov qword [rbp - 0x18], rax
mov qword [rbp - 8], r12
mov qword [rbp], rdi
lea r8, [r12*2 + 2]
mov rdx, rbx
mov rcx, rax
call fcn.140085350
mov r14, qword [rbp - 0x60]
movabs rdx, 0x7ffffffffffffffe
mov r13d, r15d
movzx ebx, byte [rsp + 0x40]
nop
lea r15, [rbp - 0x18]
cmp rdi, 8
cmovae r15, rsi
cmp r12, r14
ja 0x140035801
lea rsi, [rbp - 0x78]
cmp r14, 8
cmovae rsi, qword [rbp - 0x78]
mov qword [rbp - 0x68], r12
lea rdi, [r12 + r12]
mov r8, rdi
mov rdx, r15
mov rcx, rsi
call fcn.140085350
xor r15d, r15d
mov word [rsi + rdi], r15w
jmp 0x1400358ae
cmp r12, rdx
ja 0x140035dd2
mov rdi, r12
or rdi, 7
cmp rdi, rdx
jbe 0x14003581b
mov rdi, rdx
jmp 0x14003583c
mov rcx, r14
shr rcx, 1
mov rax, rdx
sub rax, rcx
cmp r14, rax
jbe 0x140035831
mov rdi, rdx
jmp 0x14003583c
lea rax, [rcx + r14]
cmp rdi, rax
cmovb rdi, rax
lea rdx, [rdi + 1]
lea rcx, [rbp - 0x78]
call fcn.140027610
mov rsi, rax
mov qword [rbp - 0x68], r12
mov qword [rbp - 0x60], rdi
lea rdi, [r12 + r12]
mov r8, rdi
mov rdx, r15
mov rcx, rax
call fcn.140085350
xor r15d, r15d
mov word [rsi + rdi], r15w
cmp r14, 8
jb 0x1400358aa
lea rdx, [r14*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400358a5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140035dae
call fcn.140083048
mov qword [rbp - 0x78], rsi
lea r10, [rbp + 0x92]
mov r8d, r13d
test r13d, r13d
jns 0x140035900
neg r8d
sub r10, 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 [r10], r8w
mov r8d, edx
test edx, edx
jne 0x1400358c0
add r10, 0xfffffffffffffffe
mov word [r10], 0x2d
jmp 0x140035930
sub r10, 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 [r10], r8w
mov r8d, edx
test edx, edx
jne 0x140035900
lea r9, [rsp + 0x40]
lea r8, [rbp + 0x92]
mov rdx, r10
lea rcx, [rbp + 0x48]
call fcn.140034c90
nop
lea r8, [rbp + 0x48]
lea rdx, [0x1400b5784]
lea rcx, [rbp + 0x28]
call fcn.140034d90
mov rcx, rax
mov r8, qword [rax + 0x10]
mov r9, qword [rax + 0x18]
mov rax, r9
sub rax, r8
cmp rax, 4
jb 0x14003599d
lea rdx, [r8 + 4]
mov qword [rcx + 0x10], rdx
mov rax, rcx
cmp r9, 8
jb 0x140035988
mov rax, qword [rcx]
movabs r9, 0x70006d0074002e
mov qword [rax + r8*2], r9
mov word [rax + rdx*2], r15w
jmp 0x1400359be
mov qword [rsp + 0x20], 4
lea r9, str..tmp
movzx r8d, bl
mov edx, 4
call fcn.14002b9c0
mov rcx, rax
xorps xmm0, xmm0
movups xmmword [rbp - 0x38], xmm0
mov qword [rbp - 0x28], r15
mov qword [rbp - 0x20], r15
movups xmm0, xmmword [rcx]
movups xmmword [rbp - 0x38], xmm0
movups xmm1, xmmword [rcx + 0x10]
movups xmmword [rbp - 0x28], xmm1
mov qword [rcx + 0x10], r15
mov qword [rcx + 0x18], 7
mov word [rcx], r15w
xorps xmm0, xmm0
movups xmmword [rbp - 0x58], xmm0
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x40], r15
mov r8d, 4
lea rdx, str..tmp
lea rcx, [rbp - 0x58]
call fcn.1400030d0
nop
lea r8, [rbp - 0x38]
lea rdx, [rbp - 0x58]
lea rcx, [rbp - 0x78]
call fcn.14004b3d0
nop
mov rdx, qword [rbp - 0x40]
cmp rdx, 8
jb 0x140035a64
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x58]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140035a5f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140035db4
call fcn.140083048
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x40], 7
mov word [rbp - 0x58], r15w
mov rdx, qword [rbp - 0x20]
cmp rdx, 8
jb 0x140035ab5
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140035ab0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140035dba
call fcn.140083048
mov qword [rbp - 0x28], r15
mov qword [rbp - 0x20], 7
mov word [rbp - 0x38], r15w
mov rdx, qword [rbp + 0x40]
cmp rdx, 8
jb 0x140035b06
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140035b01
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140035dc0
call fcn.140083048
mov qword [rbp + 0x38], r15
mov qword [rbp + 0x40], 7
mov word [rbp + 0x28], r15w
mov rdx, qword [rbp + 0x60]
cmp rdx, 8
jb 0x140035b57
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140035b52
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140035dc6
call fcn.140083048
lea rcx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
cmovae rcx, qword [rbp - 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 rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140035bbb
inc r13d
cmp r13d, 0x32
jge 0x140035bbb
mov r14, qword [rbp - 0x60]
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
movabs rdx, 0x7ffffffffffffffe
jmp 0x1400357c0
mov rdx, qword [rsp + 0x48]
cmp rdx, 8
jb 0x140035bfd
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140035bf8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140035dcc
call fcn.140083048
cmp rdi, 0xffffffffffffffff
je 0x140035c31
mov dword [rsp + 0x48], r15d
mov r8, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x70]
sub r8, rdx
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp - 0x78]
call fcn.14004fe50
test al, al
je 0x140035cae
lea rcx, [rbp - 0x78]
cmp qword [rbp - 0x60], 8
jb 0x140035c95
mov rcx, qword [rbp - 0x78]
test rcx, rcx
jne 0x140035c95
mov rbx, r15
mov qword [rsp + 0x50], rbx
mov dword [rsp + 0x48], r15d
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140035dd8
mov rax, qword [rcx]
lea r9, [rsp + 0x48]
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]
jmp 0x140035cb2
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rbx, rax
mov qword [rsp + 0x50], rax
test rax, rax
je 0x140035d80
jmp 0x140035c5a
mov esi, dword [rsp + 0x58]
mov rdx, qword [rbp - 0x60]
cmp rdx, 8
jb 0x140035cf2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140035ced
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140035de3
call fcn.140083048
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140035d2a
mov rdx, qword [rbp - 0x80]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140035d24
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140035d7a
call fcn.140083048
nop
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140035d3b
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140035d4c
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
movzx eax, sil
mov rcx, qword [rbp + 0x20a0]
xor rcx, rsp
call fcn.1400834d0
mov rbx, qword [rsp + 0x2200]
add rsp, 0x21b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.140089b84
nop
mov ecx, 0x8007000e
call fcn.1400350e0
nop
mov ecx, 0x80004003
call fcn.140080660
nop
call fcn.140089b84
nop
call fcn.140089b84
nop
call fcn.140089b84
int3
call fcn.140027390
nop
call fcn.140089b84
nop
call fcn.140089b84
nop
call fcn.140089b84
nop
call fcn.140089b84
nop
call fcn.140089b84
nop
call fcn.140089b84
nop
call fcn.140027390
nop
mov ecx, 0x80004003
call fcn.140080660
nop
call fcn.140089b84
int3