Function at 0x140009014
Capabilities:
Get common file path

Disassembly:
test rdx, rdx
je 0x140009379
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x1f8]
sub rsp, 0x2c0
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x1400416b0]
xor rax, rsp
mov qword [rbp + 0x1b0], rax
mov rbx, rdx
mov r14, rcx
xor edi, edi
mov r12, qword [rdx + 0x18]
test r12, r12
je 0x14000906e
mov al, byte [r12]
jmp 0x140009071
mov al, byte [rdx + 0x20]
test al, al
je 0x140009350
lea rsi, [0x1400362a8]
test r12, r12
je 0x140009097
add r12, 8
cmp qword [r12 + 0x18], 8
jb 0x14000909a
mov r12, qword [r12]
jmp 0x14000909a
mov r12, rsi
mov eax, 7
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x78], rdi
mov word [rsp + 0x78], di
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x60], rdi
mov word [rsp + 0x50], di
mov rcx, r12
call qword [sym.imp.SHLWAPI.dll_PathIsFileSpecW]
lea r13, [r14 + 0x138]
test eax, eax
je 0x140009126
mov qword [rsp + 0x20], r13
xor r9d, r9d
xor r8d, r8d
mov edx, 0x8023
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
xor eax, eax
or r15, 0xffffffffffffffff
mov rcx, r15
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r13
lea rcx, [rsp + 0x78]
call fcn.14000444c
xor eax, eax
mov rcx, r15
mov rdi, r12
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r12
lea rcx, [rsp + 0x50]
jmp 0x140009185
mov r8, r12
mov edx, 0x104
mov rcx, r13
call fcn.1400150d4
mov rcx, r13
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov rdx, rax
xor eax, eax
or r15, 0xffffffffffffffff
mov rcx, r15
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rsp + 0x50]
call fcn.14000444c
mov rcx, r13
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
xor eax, eax
mov rcx, r15
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r13
lea rcx, [rsp + 0x78]
call fcn.14000444c
test dword [rbx + 0x10], 0x20000
je 0x140009206
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae rcx, qword [rsp + 0x78]
mov r9, r13
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
xor edi, edi
test eax, eax
je 0x140009208
mov r8d, 0x104
lea rdx, [rbp - 0x60]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x140009208
mov r9, qword [rbx + 0x18]
test r9, r9
je 0x140009208
xor eax, eax
mov rcx, r15
lea rdi, [rbp - 0x60]
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rbp - 0x60]
lea rcx, [r9 + 8]
call fcn.14000444c
xor edi, edi
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x14000921f
lea rsi, [rax + 8]
cmp qword [rsi + 0x18], 8
jb 0x14000921f
mov rsi, qword [rsi]
mov rcx, rsi
call fcn.140015094
test rax, rax
je 0x1400092cd
mov qword [rsp + 0x30], rdi
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rsi
mov dword [rsp + 0x28], 0x80
test dword [rbx + 0x10], 0x10000
je 0x14000925e
mov dword [rsp + 0x20], 2
jmp 0x140009266
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, r15
je 0x1400092cd
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
mov r9d, 0x104
xor r8d, r8d
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SearchPathW]
test eax, eax
je 0x1400092c4
mov r9, qword [rbx + 0x18]
test r9, r9
je 0x1400092c4
xor eax, eax
mov rcx, r15
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r13
lea rcx, [r9 + 8]
call fcn.14000444c
xor edi, edi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test dword [rbx + 0xc], 0x40000000
je 0x1400092fa
mov rdx, rbx
mov rcx, r14
call fcn.140008c04
test dword [rbx + 0x10], 0x100000
je 0x1400092fa
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, eax
mov rcx, r14
call fcn.140008b50
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x140009308
mov byte [rax], dil
jmp 0x14000930c
mov byte [rbx + 0x20], dil
cmp qword [rsp + 0x68], 8
jb 0x14000931e
mov rcx, qword [rsp + 0x50]
call fcn.140014720
mov ebx, 7
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x60], rdi
mov word [rsp + 0x50], di
cmp qword [rbp - 0x70], 8
jb 0x140009343
mov rcx, qword [rsp + 0x78]
call fcn.140014720
mov qword [rbp - 0x70], rbx
mov qword [rbp - 0x78], rdi
mov word [rsp + 0x78], di
mov rcx, qword [rbp + 0x1b0]
xor rcx, rsp
call fcn.140014700
mov rbx, qword [rsp + 0x310]
add rsp, 0x2c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret