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

Disassembly:
push rbp
push rsi
push r14
lea rbp, [rsp - 0x620]
sub rsp, 0x720
mov rax, qword [0x1400420e0]
xor rax, rsp
mov qword [rbp + 0x600], rax
xor sil, sil
cmp qword [0x140045d40], 0
mov r14, rcx
je 0x1400198c6
cmp qword [0x140045d48], 0
je 0x1400198c6
mov al, 1
jmp 0x140019ca4
test rcx, rcx
je 0x140019cbf
mov qword [rsp + 0x748], rbx
mov qword [rsp + 0x750], rdi
mov qword [rsp + 0x758], r12
mov r12, qword [0x140045d60]
mov qword [rsp + 0x718], r13
mov qword [rsp + 0x710], r15
test r12, r12
jne 0x140019914
xor ecx, ecx
call fcn.140019720
mov r12, rax
mov qword [0x140045d60], rax
mov ecx, 0x104
call fcn.14001ce7c
xor edx, edx
mov r8d, 0x104
mov rcx, rax
mov rdi, rax
call fcn.14001d640
xor r15d, r15d
mov rbx, rdi
test rdi, rdi
je 0x140019959
mov rdx, rbx
mov ecx, 0x103
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x140019959
mov rcx, rbx
call fcn.14001ce3c
mov ebx, r15d
call fcn.140019cd0
cmp byte [0x140045f90], r15b
lea rdi, [0x140045f90]
cmove rdi, rbx
mov r13, rax
test r12, r12
je 0x140019c5e
test rdi, rdi
je 0x140019c5e
test rax, rax
je 0x140019c5e
mov eax, 0x5f
mov edx, 0x5c
mov rcx, r14
mov word [rsp + 0x70], ax
mov eax, dword [str..log]
mov dword [rbp - 0x7c], eax
movzx eax, byte [0x1400398d0]
mov byte [rbp - 0x78], al
mov eax, dword [str..mlk]
mov dword [rsp + 0x7c], eax
movzx eax, byte [0x1400398d8]
mov byte [rbp - 0x80], al
call fcn.14001d2f0
mov edx, 0x5c
mov rcx, r12
mov r14, rax
call fcn.14001d2f0
mov r12, rax
test r14, r14
je 0x140019c5e
test rax, rax
je 0x140019c5e
mov rax, qword [str._s_s_s_s_s_s_s_s_s_s]
lea rcx, [rbp + 0x1e1]
xor edx, edx
mov qword [rbp - 0x70], rax
mov rax, qword [0x1400398e8]
mov r8d, 0x207
mov qword [rbp - 0x68], rax
mov eax, dword [0x1400398f0]
inc r14
mov dword [rbp - 0x60], eax
movzx eax, byte [0x1400398f4]
inc r12
mov byte [rsp + 0x74], r15b
mov byte [rbp + 0x1e0], r15b
mov byte [rbp - 0x5c], al
call fcn.14001d640
lea rcx, [rbp + 0x3f1]
xor edx, edx
mov r8d, 0x207
mov byte [rbp + 0x3f0], r15b
call fcn.14001d640
lea rcx, [rbp - 0x2f]
xor edx, edx
mov r8d, 0x207
mov byte [rbp - 0x30], r15b
call fcn.14001d640
lea rcx, [rbp - 0x30]
call fcn.14001a510
lea r11, [rsp + 0x74]
lea rax, [rsp + 0x7c]
mov qword [rsp + 0x60], r11
mov qword [rsp + 0x58], rax
lea rax, [rbp - 0x30]
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x70]
lea r8, [rbp - 0x70]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r13
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], rax
lea rcx, [rbp + 0x3f0]
mov r9, rdi
mov edx, 0x208
mov qword [rsp + 0x20], r12
call fcn.14001ce18
cmp eax, 0xffffffff
je 0x140019c5e
lea rax, [rbp - 0x7c]
lea r8, [rbp - 0x70]
lea rcx, [rbp + 0x1e0]
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x7c]
mov r9, rdi
mov qword [rsp + 0x58], rax
lea rax, [rbp - 0x30]
mov edx, 0x208
mov qword [rsp + 0x50], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r13
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
call fcn.14001ce18
cmp eax, 0xffffffff
je 0x140019c5e
xor r9d, r9d
mov qword [rsp + 0x30], r15
lea rcx, [rbp + 0x1e0]
lea r8d, [r9 + 1]
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
xor r9d, r9d
mov qword [rsp + 0x30], r15
lea rcx, [rbp + 0x3f0]
lea r8d, [r9 + 1]
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov qword [0x140045d48], rax
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r10, qword [0x140045d48]
mov qword [0x140045d40], rax
mov rax, qword [str._r_n_Leak_Report__r_n]
mov qword [rbp - 0x58], rax
mov rax, qword [0x140039900]
mov qword [rbp - 0x50], rax
mov rax, qword [0x140039908]
mov qword [rbp - 0x48], rax
mov rax, qword [0x140039910]
mov qword [rbp - 0x40], rax
test r10, r10
je 0x140019c2c
cmp r10, 0xffffffffffffffff
je 0x140019c2c
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rbp - 0x58]
repne scasb al, byte [rdi]
lea r9, [rsp + 0x78]
lea rdx, [rbp - 0x58]
not rcx
mov dword [rsp + 0x78], r15d
mov qword [rsp + 0x20], r15
lea r8, [rcx - 1]
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov r10, qword [0x140045d48]
cmp qword [0x140045d38], r15
je 0x140019c48
lea rcx, [rbp + 0x1e0]
call fcn.140018fd0
mov r10, qword [0x140045d48]
cmp qword [0x140045d40], r15
je 0x140019c5b
test r10, r10
je 0x140019c5b
mov sil, 1
jmp 0x140019c5e
xor sil, sil
mov r15, qword [rsp + 0x710]
mov r12, qword [rsp + 0x758]
mov rdi, qword [rsp + 0x750]
test rbx, rbx
je 0x140019c83
mov rcx, rbx
call fcn.14001ce3c
mov rbx, qword [rsp + 0x748]
test r13, r13
je 0x140019c98
mov rcx, r13
call fcn.14001ce3c
mov r13, qword [rsp + 0x718]
movzx eax, sil
mov rcx, qword [rbp + 0x600]
xor rcx, rsp
call fcn.14001b510
add rsp, 0x720
pop r14
pop rsi
pop rbp
ret
movzx eax, sil
jmp 0x140019ca4