Function at 0x140038650
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 - 0x20a0]
mov eax, 0x21a0
call fcn.140088280
sub rsp, rax
mov rax, qword [0x1400f2688]
xor rax, rsp
mov qword [rbp + 0x2090], rax
mov rdi, rdx
mov ebx, ecx
mov rcx, qword [0x1400f4fc8]
test rcx, rcx
jne 0x1400386ab
call fcn.140038f10
test al, al
je 0x140038e6c
mov rcx, qword [0x1400f4fc8]
xor r15b, r15b
xor r12d, r12d
mov qword [rsp + 0x50], r12
mov rax, qword [rcx]
mov qword [rsp + 0x50], r12
lea rdx, [rsp + 0x50]
call qword [rax + 0x68]
test eax, eax
js 0x140038e57
mov qword [rsp + 0x48], r12
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140038ec0
mov rax, qword [rcx]
mov qword [rsp + 0x48], r12
lea r8, [rsp + 0x48]
lea rdx, [0x1400ba348]
call qword [rax]
test eax, eax
js 0x140038e46
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x58], xmm0
mov qword [rsp + 0x68], r12
lea r8, [rsp + 0x58]
mov rdx, rdi
mov ecx, ebx
call fcn.14004a1a0
mov rcx, qword [rsp + 0x58]
cmp qword [rsp + 0x60], rcx
je 0x140038e12
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0x90]
call fcn.14008a730
lea rdx, [rbp + 0x90]
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140038e0d
mov qword [rbp - 0x28], r12
mov qword [rbp - 0x18], r12
mov qword [rbp - 0x10], 7
mov word [rbp - 0x28], r12w
lea r8d, [r12 + 0x11]
lea rdx, str.FLiNGTrainer.tmp
lea rcx, [rbp - 0x28]
call fcn.140029620
nop
lea r8, [rbp - 0x28]
lea rdx, [rbp + 0x90]
lea rcx, [rbp - 0x68]
call fcn.140037fc0
nop
mov rdx, qword [rbp - 0x10]
cmp rdx, 8
jb 0x1400387da
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400387d5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038ecb
call fcn.140087c4c
mov qword [rbp - 0x18], r12
mov qword [rbp - 0x10], 7
mov word [rbp - 0x28], r12w
mov qword [rbp - 0x48], r12
mov qword [rbp - 0x38], r12
mov qword [rbp - 0x30], 7
mov word [rbp - 0x48], r12w
mov r8d, 1
lea rdx, [0x1400b6ffc]
lea rcx, [rbp - 0x48]
call fcn.140029620
nop
mov qword [rsp + 0x78], r12
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x70], 7
mov word [rsp + 0x78], r12w
mov r8d, 2
lea rdx, [0x1400baa9c]
lea rcx, [rsp + 0x78]
call fcn.140029620
nop
lea r8, [rbp - 0x48]
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x68]
call fcn.14004fc20
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x14003889a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038895
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038ed1
call fcn.140087c4c
mov qword [rbp - 0x78], r12
mov qword [rbp - 0x70], 7
mov word [rsp + 0x78], r12w
mov rdx, qword [rbp - 0x30]
cmp rdx, 8
jb 0x1400388ec
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400388e7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038ed7
call fcn.140087c4c
lea rcx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rcx, qword [rbp - 0x68]
mov qword [rsp + 0x30], r12
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 0x140038d37
mov rsi, qword [rbp - 0x58]
lea rbx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rbx, qword [rbp - 0x68]
cmp rsi, 8
jae 0x140038953
movups xmm0, xmmword [rbx]
movups xmmword [rsp + 0x78], xmm0
lea edi, [rax + 8]
jmp 0x140038991
mov rdi, rsi
or rdi, 7
movabs rax, 0x7ffffffffffffffe
cmp rdi, rax
cmova rdi, rax
lea rdx, [rdi + 1]
lea rcx, [rsp + 0x78]
call fcn.140029380
mov qword [rsp + 0x78], rax
lea r8, [rsi*2 + 2]
mov rdx, rbx
mov rcx, rax
call fcn.14008a080
mov qword [rbp - 0x70], rdi
mov qword [rbp - 0x78], rsi
mov r14d, r12d
mov r13d, 0x2d
movzx ebx, byte [rsp + 0x40]
nop word [rax + rax]
lea rdx, [rsp + 0x78]
cmp rdi, 8
cmovae rdx, qword [rsp + 0x78]
mov r8, rsi
lea rcx, [rbp - 0x68]
call fcn.140029620
lea r9, [rbp + 0x82]
mov r8d, r14d
test r14d, r14d
jns 0x140038a20
neg r8d
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 0x1400389e0
add r9, 0xfffffffffffffffe
mov word [r9], r13w
jmp 0x140038a50
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 0x140038a20
mov qword [rbp + 0x18], r12
mov qword [rbp + 0x28], r12
mov qword [rbp + 0x30], 7
mov word [rbp + 0x18], r12w
lea rax, [rbp + 0x82]
cmp r9, rax
je 0x140038a8b
lea r8, [rbp + 0x82]
sub r8, r9
sar r8, 1
mov rdx, r9
lea rcx, [rbp + 0x18]
call fcn.140029620
nop
lea r8, [rbp + 0x18]
lea rdx, [0x1400baab4]
lea rcx, [rbp + 0x38]
call fcn.140037fc0
mov rcx, rax
mov rdx, qword [rax + 0x10]
mov r9, qword [rax + 0x18]
mov rax, r9
sub rax, rdx
cmp rax, 4
jb 0x140038adf
lea r8, [rdx + 4]
mov qword [rcx + 0x10], r8
mov rax, rcx
cmp r9, 8
jb 0x140038aca
mov rax, qword [rcx]
movabs r9, 0x70006d0074002e
mov qword [rax + rdx*2], r9
mov word [rax + r8*2], r12w
jmp 0x140038b00
mov qword [rsp + 0x20], 4
lea r9, str..tmp
movzx r8d, bl
mov edx, 4
call fcn.140005170
mov rcx, rax
mov qword [rbp - 0x48], r12
mov qword [rbp - 0x38], r12
mov qword [rbp - 0x30], r12
movups xmm0, xmmword [rcx]
movups xmmword [rbp - 0x48], xmm0
movups xmm1, xmmword [rcx + 0x10]
movups xmmword [rbp - 0x38], xmm1
mov qword [rcx + 0x10], r12
mov qword [rcx + 0x18], 7
mov word [rcx], r12w
mov qword [rbp - 8], r12
mov qword [rbp + 8], r12
mov qword [rbp + 0x10], 7
mov word [rbp - 8], r12w
mov r8d, 4
lea rdx, str..tmp
lea rcx, [rbp - 8]
call fcn.140029620
nop
lea r8, [rbp - 0x48]
lea rdx, [rbp - 8]
lea rcx, [rbp - 0x68]
call fcn.14004fc20
nop
mov rdx, qword [rbp + 0x10]
cmp rdx, 8
jb 0x140038ba9
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038ba4
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038edd
call fcn.140087c4c
mov qword [rbp + 8], r12
mov qword [rbp + 0x10], 7
mov word [rbp - 8], r12w
mov rdx, qword [rbp - 0x30]
cmp rdx, 8
jb 0x140038bfa
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038bf5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038ee3
call fcn.140087c4c
mov qword [rbp - 0x38], r12
mov qword [rbp - 0x30], 7
mov word [rbp - 0x48], r12w
mov rdx, qword [rbp + 0x50]
cmp rdx, 8
jb 0x140038c4b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038c46
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038ee9
call fcn.140087c4c
mov qword [rbp + 0x48], r12
mov qword [rbp + 0x50], 7
mov word [rbp + 0x38], r12w
mov rdx, qword [rbp + 0x30]
cmp rdx, 8
jb 0x140038c9c
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x18]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038c97
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038eef
call fcn.140087c4c
lea rcx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rcx, qword [rbp - 0x68]
mov qword [rsp + 0x30], r12
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 0x140038cf0
inc r14d
cmp r14d, 0x32
jge 0x140038cf0
mov rdi, qword [rbp - 0x70]
mov rsi, qword [rbp - 0x78]
jmp 0x1400389b0
mov rdx, qword [rbp - 0x70]
cmp rdx, 8
jb 0x140038d31
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038d2c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038ef5
call fcn.140087c4c
cmp rdi, 0xffffffffffffffff
je 0x140038d65
mov dword [rsp + 0x44], r12d
mov r8, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
sub r8, rdx
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x44]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp - 0x68]
call fcn.14004f040
test al, al
je 0x140038dcd
lea rcx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
jb 0x140038e96
mov rcx, qword [rbp - 0x68]
test rcx, rcx
jne 0x140038e96
mov rbx, r12
mov qword [rsp + 0x70], rbx
mov dword [rsp + 0x44], r12d
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140038f01
mov rax, qword [rcx]
lea r9, [rsp + 0x44]
xor r8d, r8d
mov rdx, rbx
call qword [rax + 0x190]
test eax, eax
setns r15b
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
nop
mov rdx, qword [rbp - 0x50]
cmp rdx, 8
jb 0x140038e0d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038e08
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038efb
call fcn.140087c4c
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140038e46
mov rdx, qword [rsp + 0x68]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038e40
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140038eaf
call fcn.140087c4c
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140038e57
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140038e68
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
movzx eax, r15b
mov rcx, qword [rbp + 0x2090]
xor rcx, rsp
call fcn.140088250
mov rbx, qword [rsp + 0x21f0]
add rsp, 0x21a0
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 0x140038eb5
jmp 0x140038d96
call fcn.14008e46c
nop
mov ecx, 0x8007000e
call fcn.140038310
nop
mov ecx, 0x80004003
call fcn.1400849b0
nop
call fcn.14008e46c
nop
call fcn.14008e46c
nop
call fcn.14008e46c
nop
call fcn.14008e46c
nop
call fcn.14008e46c
nop
call fcn.14008e46c
nop
call fcn.14008e46c
nop
call fcn.14008e46c
nop
call fcn.14008e46c
nop
mov ecx, 0x80004003
call fcn.1400849b0
int3