Function at 0x140014170
Capabilities:
Get common file path

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xc48
mov rsi, r8
mov rdi, rdx
mov r13, rcx
mov word [rcx], 0
lea r14, [rsp + 0x440]
lea rdx, str.TEMP
lea rbx, str.PROGRAM
mov rbp, qword [sym.imp.msvcrt.dll___wargv]
lea r15, str._PROGRAM_
add rdi, 2
xor eax, eax
nop dword [rax + rax]
movzx ecx, word [rdi - 2]
cmp cx, 0x25
je 0x1400141f0
test cx, cx
je 0x14001477e
test rax, rax
je 0x140014210
mov word [rax], cx
add rax, 2
add rdi, 2
jmp 0x1400141c0
test rax, rax
jne 0x140014230
mov word [rsp + 0x440], 0
add rdi, 2
mov rax, r14
jmp 0x1400141c0
test rsi, rsi
je 0x14001479b
mov word [r13], cx
add r13, 2
add rsi, 0xffffffffffffffff
jmp 0x1400141b5
mov word [rax], 0
mov rcx, r14
mov r12, rdx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x1400143c7
mov rcx, r14
mov rdx, rbx
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x1400143e8
mov rcx, r14
lea rdx, str.PROGRAM_BASE
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x140014474
mov rcx, r14
lea rdx, [0x140025fda]
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x1400144ec
mov rcx, r14
lea rdx, str.HOME
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x14001465c
mov rcx, r14
lea rdx, str.CACHE_DIR
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x1400146e4
mov rcx, r14
lea rdx, str.TIME
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x14001479b
mov qword [rsp + 0x38], 0
lea rcx, [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov r9, qword [rsp + 0x38]
mov edx, 0x400
lea rcx, [rsp + 0x40]
lea r8, str._lld
call fcn.140014820
cmp word [r13], 0
mov r15, r13
mov r12, rsi
je 0x140014320
nop dword [rax + rax]
add r12, 0xffffffffffffffff
cmp word [r15 + 2], 0
lea r15, [r15 + 2]
jne 0x140014310
mov r14b, byte [rsp + 0x40]
test r14b, r14b
je 0x1400145cb
xor ecx, ecx
lea rbx, [rsp + 0x40]
mov rax, r12
mov rbp, r15
test cx, cx
jne 0x140014367
jmp 0x140014382
add rbx, 1
add r12, 0xffffffffffffffff
movzx ecx, word [r15]
mov rax, r12
mov rbp, r15
test cx, cx
je 0x140014382
mov rcx, r15
mov rax, r12
nop dword [rax]
lea rbp, [rcx + 2]
add rax, 0xffffffffffffffff
cmp word [rcx + 2], 0
mov rcx, rbp
jne 0x140014370
test rax, rax
je 0x14001479f
mov rcx, rbp
call sub.msvcrt.dll_wcslen
lea rcx, [rax*2]
add rcx, rbp
mov byte [rsp + 0x36], r14b
mov byte [rsp + 0x37], 0
mov r8d, 2
lea rdx, [rsp + 0x36]
call sub.msvcrt.dll_mbstowcs
movzx r14d, byte [rbx + 1]
test r14b, r14b
jne 0x140014350
jmp 0x1400145cb
mov ecx, esi
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
mov al, 1
mov rdx, r12
cmp word [r13], 0
jne 0x140014600
jmp 0x140014622
cmp word [r13], 0
mov rax, r13
mov rcx, rsi
je 0x14001440f
nop word cs:[rax + rax]
add rcx, 0xffffffffffffffff
cmp word [rax + 2], 0
lea rax, [rax + 2]
jne 0x140014400
mov r10, rbp
mov rdx, qword [rbp]
mov rdx, qword [rdx]
mov r8, qword [rdx]
movzx ebp, word [r8]
test bp, bp
je 0x140014456
mov r9, rbx
xor edx, edx
xor ebx, ebx
nop dword [rax]
cmp rcx, rbx
je 0x14001479f
mov word [rax + rbx*2], bp
movzx ebp, word [r8 + rbx*2 + 2]
add rbx, 1
add rdx, 0xfffffffffffffffe
test bp, bp
jne 0x140014430
sub rax, rdx
mov rbx, r9
mov word [rax], 0
xor eax, eax
mov rbp, r10
mov rdx, r12
cmp word [r13], 0
jne 0x140014600
jmp 0x140014622
mov rcx, r13
call sub.msvcrt.dll_wcslen
mov r8, rsi
sub r8, rax
mov rcx, r13
mov rdx, r15
call fcn.140014170
test al, al
je 0x14001479b
mov r15, rbp
mov rcx, r13
call sub.msvcrt.dll_wcslen
cmp rax, 4
jb 0x1400144cc
mov rbp, rax
lea rcx, [rax*2 - 8]
add rcx, r13
lea rdx, str..exe
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x1400144cc
mov word [r13 + rbp*2 - 8], 0
xor eax, eax
mov rbp, r15
lea r15, str._PROGRAM_
mov rdx, r12
cmp word [r13], 0
jne 0x140014600
jmp 0x140014622
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, pe_nt_image_headers64
lea rcx, [rsp + 0x40]
lea r8, [0x140025fe2]
mov r9d, eax
call fcn.140014820
cmp word [r13], 0
mov rbp, r13
mov r12, rsi
je 0x14001452f
nop dword [rax]
add r12, 0xffffffffffffffff
cmp word [rbp + 2], 0
lea rbp, [rbp + 2]
jne 0x140014520
mov r14b, byte [rsp + 0x40]
test r14b, r14b
je 0x1400145cb
xor ecx, ecx
lea rbx, [rsp + 0x40]
mov rax, r12
mov r15, rbp
test cx, cx
jne 0x140014577
jmp 0x140014592
add rbx, 1
add r12, 0xffffffffffffffff
movzx ecx, word [rbp]
mov rax, r12
mov r15, rbp
test cx, cx
je 0x140014592
mov rcx, rbp
mov rax, r12
nop dword [rax]
lea r15, [rcx + 2]
add rax, 0xffffffffffffffff
cmp word [rcx + 2], 0
mov rcx, r15
jne 0x140014580
test rax, rax
je 0x14001479f
mov rcx, r15
call sub.msvcrt.dll_wcslen
lea rcx, [r15 + rax*2]
mov byte [rsp + 0x38], r14b
mov byte [rsp + 0x39], 0
mov r8d, 2
lea rdx, [rsp + 0x38]
call sub.msvcrt.dll_mbstowcs
movzx r14d, byte [rbx + 1]
test r14b, r14b
jne 0x140014560
xor eax, eax
lea r14, [rsp + 0x440]
lea rdx, str.TEMP
lea rbx, str.PROGRAM
mov rbp, qword [sym.imp.msvcrt.dll___wargv]
lea r15, str._PROGRAM_
cmp word [r13], 0
je 0x140014622
nop dword [rax]
mov rcx, r13
nop word cs:[rax + rax]
nop dword [rax]
lea r13, [rcx + 2]
add rsi, 0xffffffffffffffff
cmp word [rcx + 2], 0
mov rcx, r13
jne 0x140014610
test al, al
je 0x1400141b5
cmp word [r13 - 2], 0x5c
jne 0x1400141b5
nop word cs:[rax + rax]
mov word [r13 - 2], 0
add rsi, 1
cmp word [r13 - 4], 0x5c
lea r13, [r13 - 2]
je 0x140014640
jmp 0x1400141b5
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor ecx, ecx
mov edx, 0x28
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x14001479b
cmp word [r13], 0
mov rax, r13
mov rcx, rsi
je 0x14001469f
nop
add rcx, 0xffffffffffffffff
cmp word [rax + 2], 0
lea rax, [rax + 2]
jne 0x140014690
movzx edx, word [rsp + 0x40]
test dx, dx
je 0x140014774
mov r9, rbp
mov r8, rbx
xor ebp, ebp
xor ebx, ebx
nop word [rax + rax]
cmp rcx, rbx
je 0x14001479f
mov word [rax + rbx*2], dx
movzx edx, word [rsp + rbx*2 + 0x42]
add rbx, 1
add rbp, 0xfffffffffffffffe
test dx, dx
jne 0x1400146c0
jmp 0x14001476b
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor ecx, ecx
mov edx, 0x1c
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x14001479b
cmp word [r13], 0
mov rax, r13
mov rcx, rsi
je 0x14001472f
nop word [rax + rax]
add rcx, 0xffffffffffffffff
cmp word [rax + 2], 0
lea rax, [rax + 2]
jne 0x140014720
movzx edx, word [rsp + 0x40]
test dx, dx
je 0x140014774
mov r9, rbp
mov r8, rbx
xor ebp, ebp
xor ebx, ebx
nop word cs:[rax + rax]
nop dword [rax]
cmp rcx, rbx
je 0x14001479f
mov word [rax + rbx*2], dx
movzx edx, word [rsp + rbx*2 + 0x42]
add rbx, 1
add rbp, 0xfffffffffffffffe
test dx, dx
jne 0x140014750
sub rax, rbp
mov rbx, r8
mov rbp, r9
mov word [rax], 0
jmp 0x1400143d2
mov word [r13], 0
mov al, 1
add rsp, 0xc48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor eax, eax
jmp 0x140014787
call sub.msvcrt.dll_abort
int3