Function at 0x140012350
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.140037da0
sub rsp, rax
mov rax, qword [0x14007e080]
xor rax, rsp
mov qword [rbp + 0x2090], rax
mov rdi, rdx
mov ebx, ecx
xor esi, esi
mov rcx, qword [0x14007fc70]
test rcx, rcx
jne 0x1400123ad
call fcn.140012c30
test al, al
je 0x140012b81
mov rcx, qword [0x14007fc70]
xor r12b, r12b
mov qword [rsp + 0x50], rsi
mov rax, qword [rcx]
lea rdx, [rsp + 0x50]
call qword [rax + 0x68]
test eax, eax
js 0x140012b6c
mov qword [rsp + 0x48], rsi
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140012bd5
mov qword [rsp + 0x48], rsi
mov rax, qword [rcx]
lea r8, [rsp + 0x48]
lea rdx, [0x140062248]
call qword [rax]
test eax, eax
js 0x140012b5b
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x58], xmm0
mov qword [rsp + 0x68], rsi
lea r8, [rsp + 0x58]
mov rdx, rdi
mov ecx, ebx
call fcn.140011b80
mov rcx, qword [rsp + 0x58]
cmp qword [rsp + 0x60], rcx
je 0x140012b27
xor edx, edx
mov r8d, 0x2000
lea rcx, [rbp + 0x90]
call fcn.14005aeb0
lea rdx, [rbp + 0x90]
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x140012b22
xorps xmm0, xmm0
movups xmmword [rbp - 0x28], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x18], xmm1
mov r8d, 0x11
lea rdx, str.FLiNGTrainer.tmp
lea rcx, [rbp - 0x28]
call fcn.140001240
nop
lea r8, [rbp - 0x28]
lea rdx, [rbp + 0x90]
lea rcx, [rsp + 0x78]
call fcn.140002ed0
nop
mov rdx, qword [rbp - 0x10]
cmp rdx, 7
jbe 0x1400124d0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400124cb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012be0
call fcn.1400378b8
movdqa xmm0, xmmword [0x14005e8b0]
movdqu xmmword [rbp - 0x18], xmm0
xor edi, edi
mov word [rbp - 0x28], di
xorps xmm0, xmm0
movups xmmword [rbp - 0x48], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x38], xmm1
lea r8d, [rdi + 1]
lea rdx, [0x140062258]
lea rcx, [rbp - 0x48]
call fcn.140001240
nop
xorps xmm0, xmm0
movups xmmword [rbp - 0x68], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x58], xmm1
lea r8d, [rdi + 2]
lea rdx, [0x14006299c]
lea rcx, [rbp - 0x68]
call fcn.140001240
nop
lea r8, [rbp - 0x48]
lea rdx, [rbp - 0x68]
lea rcx, [rsp + 0x78]
call fcn.14001bb70
nop
mov rdx, qword [rbp - 0x50]
cmp rdx, 7
jbe 0x14001257e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140012579
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012be6
call fcn.1400378b8
movdqa xmm0, xmmword [0x14005e8b0]
movdqu xmmword [rbp - 0x58], xmm0
mov word [rbp - 0x68], di
mov rdx, qword [rbp - 0x30]
cmp rdx, 7
jbe 0x1400125cf
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400125ca
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012bec
call fcn.1400378b8
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 7
cmova 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 0x140012a45
xorps xmm0, xmm0
movups xmmword [rbp - 0x68], xmm0
mov qword [rbp - 0x58], rdi
mov qword [rbp - 0x50], rdi
lea rbx, [rsp + 0x78]
mov rax, qword [rbp - 0x70]
cmp rax, 7
cmova rbx, qword [rsp + 0x78]
mov r14, qword [rbp - 0x78]
movabs r13, 0x7ffffffffffffffe
cmp r14, r13
ja 0x140012bf2
cmp r14, 7
ja 0x140012671
mov qword [rbp - 0x58], r14
mov r13d, 7
mov qword [rbp - 0x50], r13
movups xmm0, xmmword [rbx]
movups xmmword [rbp - 0x68], xmm0
movq r15, xmm0
jmp 0x140012720
mov rax, r14
or rax, 7
cmp rax, r13
jbe 0x14001268d
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x1400126bf
mov r13, rax
mov ecx, 0xa
cmp rax, rcx
cmovb r13, rcx
lea rcx, [r13 + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x140012c1c
add rcx, rcx
cmp rcx, 0x1000
jb 0x1400126eb
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140012c1c
mov rcx, rax
call fcn.14003787c
test rax, rax
je 0x140012c10
lea r15, [rax + 0x27]
and r15, 0xffffffffffffffe0
mov qword [r15 - 8], rax
jmp 0x1400126fd
test rcx, rcx
je 0x1400126fa
call fcn.14003787c
mov r15, rax
jmp 0x1400126fd
mov r15, rdi
mov qword [rbp - 0x68], r15
mov qword [rbp - 0x58], r14
mov qword [rbp - 0x50], r13
lea r8, [r14*2 + 2]
mov rdx, rbx
mov rcx, r15
call fcn.14005a810
mov rax, qword [rbp - 0x70]
mov esi, edi
mov ebx, 0x2d
lea r9, [rbp - 0x68]
cmp r13, 7
cmova r9, r15
cmp r14, rax
ja 0x14001276a
lea rdi, [rsp + 0x78]
cmp rax, 7
cmova rdi, qword [rsp + 0x78]
mov qword [rbp - 0x78], r14
lea rbx, [r14 + r14]
mov r8, rbx
mov rdx, r9
mov rcx, rdi
call fcn.14005a810
xor eax, eax
mov word [rdi + rbx], ax
xor edi, edi
lea ebx, [rax + 0x2d]
jmp 0x140012786
xor r8d, r8d
mov rdx, r14
lea rcx, [rsp + 0x78]
call fcn.140001370
mov r13, qword [rbp - 0x50]
mov r14, qword [rbp - 0x58]
mov r15, qword [rbp - 0x68]
xorps xmm0, xmm0
movups xmmword [rbp - 0x48], xmm0
mov qword [rbp - 0x38], rdi
mov qword [rbp - 0x30], rdi
mov r8d, 4
lea rdx, str..tmp
lea rcx, [rbp - 0x48]
call fcn.140001240
nop
lea r10, [rbp + 0x82]
mov r8d, esi
test esi, esi
jns 0x140012800
neg r8d
nop dword [rax]
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 0x1400127c0
add r10, 0xfffffffffffffffe
mov word [r10], bx
jmp 0x140012830
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 0x140012800
lea r9, [rsp + 0x44]
lea r8, [rbp + 0x82]
mov rdx, r10
lea rcx, [rbp - 8]
call fcn.140011df0
nop
lea r8, [rbp - 8]
lea rdx, [0x1400629b4]
lea rcx, [rbp + 0x38]
call fcn.140002ed0
nop
lea r8, str..tmp
mov rdx, rax
lea rcx, [rbp + 0x18]
call fcn.140009a00
nop
mov r8, rax
lea rdx, [rbp - 0x48]
lea rcx, [rsp + 0x78]
call fcn.14001bb70
nop
mov rdx, qword [rbp + 0x30]
cmp rdx, 7
jbe 0x1400128c4
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x18]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400128bf
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012bf8
call fcn.1400378b8
mov qword [rbp + 0x28], rdi
mov qword [rbp + 0x30], 7
mov word [rbp + 0x18], di
mov rdx, qword [rbp + 0x50]
cmp rdx, 7
jbe 0x140012914
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001290f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012bfe
call fcn.1400378b8
mov qword [rbp + 0x48], rdi
mov qword [rbp + 0x50], 7
mov word [rbp + 0x38], di
mov rdx, qword [rbp + 0x10]
cmp rdx, 7
jbe 0x140012964
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001295f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012c04
call fcn.1400378b8
mov qword [rbp + 8], rdi
mov qword [rbp + 0x10], 7
mov word [rbp - 8], di
mov rdx, qword [rbp - 0x30]
cmp rdx, 7
jbe 0x1400129b4
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400129af
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012c0a
call fcn.1400378b8
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 7
cmova 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 0x140012a04
inc esi
cmp esi, 0x32
jge 0x140012a04
mov rax, qword [rbp - 0x70]
jmp 0x140012722
cmp r13, 7
jbe 0x140012a3f
lea rdx, [r13*2 + 2]
mov rax, r15
cmp rdx, 0x1000
jb 0x140012a37
add rdx, 0x27
mov r15, qword [r15 - 8]
sub rax, r15
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012c10
mov rcx, r15
call fcn.1400378b8
cmp rbx, 0xffffffffffffffff
je 0x140012a72
mov dword [rsp + 0x40], edi
mov r8, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x58]
sub r8, rdx
mov qword [rsp + 0x20], rdi
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.1400219b0
test al, al
je 0x140012ae1
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 7
jbe 0x140012bab
mov rcx, qword [rsp + 0x78]
test rcx, rcx
jne 0x140012bab
mov rbx, rdi
mov qword [rsp + 0x70], rbx
mov dword [rsp + 0x40], edi
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140012c22
mov rax, qword [rcx]
lea r9, [rsp + 0x40]
xor r8d, r8d
mov rdx, rbx
call qword [rax + 0x190]
mov r12d, eax
shr r12d, 0x1f
xor r12b, 1
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
nop
mov rdx, qword [rbp - 0x70]
cmp rdx, 7
jbe 0x140012b22
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140012b1d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012c16
call fcn.1400378b8
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140012b5b
mov rdx, qword [rsp + 0x68]
sub rdx, rcx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140012b55
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140012bc4
call fcn.1400378b8
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140012b6c
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140012b7d
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
movzx eax, r12b
mov rcx, qword [rbp + 0x2090]
xor rcx, rsp
call fcn.1400379d0
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 0x140012bca
jmp 0x140012aa6
call fcn.14003e7f4
nop
mov ecx, 0x8007000e
call fcn.140012020
nop
mov ecx, 0x80004003
call fcn.140035cc0
nop
call fcn.14003e7f4
nop
call fcn.14003e7f4
nop
call fcn.14003e7f4
int3
call fcn.140002a10
nop
call fcn.14003e7f4
nop
call fcn.14003e7f4
nop
call fcn.14003e7f4
nop
call fcn.14003e7f4
nop
call fcn.14003e7f4
nop
call fcn.14003e7f4
nop
call fcn.140002940
nop
mov ecx, 0x80004003
call fcn.140035cc0
int3