Function at 0x140008b08
Capabilities:
Get common file path

Disassembly:
test rdx, rdx
je 0x140008e6d
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x1d8]
sub rsp, 0x2b0
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x14017a140]
xor rax, rsp
mov qword [rbp + 0x1a0], rax
mov rbx, rdx
mov r15, rcx
xor r12d, r12d
mov rsi, qword [rdx + 0x18]
test rsi, rsi
je 0x140008b62
mov al, byte [rsi]
jmp 0x140008b65
mov al, byte [rdx + 0x20]
test al, al
je 0x140008e43
lea r14, [0x140114e10]
test rsi, rsi
je 0x140008b89
add rsi, 8
cmp qword [rsi + 0x18], 8
jb 0x140008b8c
mov rsi, qword [rsi]
jmp 0x140008b8c
mov rsi, r14
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], r12
mov eax, 7
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x80], r12
mov word [rsp + 0x70], r12w
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x60], r12
mov word [rsp + 0x50], r12w
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathIsFileSpecW]
lea rdi, [r15 + 0x110]
test eax, eax
je 0x140008c2d
mov qword [rsp + 0x20], rdi
xor r9d, r9d
xor r8d, r8d
mov edx, 0x8023
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
cmp word [rdi], r12w
jne 0x140008bf8
mov rax, r12
jmp 0x140008c00
mov rcx, rdi
call fcn.1400c2d80
mov r8, rax
mov rdx, rdi
lea rcx, [rsp + 0x70]
call fcn.140003a2c
cmp word [rsi], r12w
jne 0x140008c1b
mov rax, r12
jmp 0x140008c23
mov rcx, rsi
call fcn.1400c2d80
mov rdx, rsi
lea rcx, [rsp + 0x50]
jmp 0x140008c90
mov r8, rsi
mov edx, 0x104
mov rcx, rdi
call fcn.1400bf0f0
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov rsi, rax
cmp word [rax], r12w
jne 0x140008c54
mov rax, r12
jmp 0x140008c5c
mov rcx, rsi
call fcn.1400c2d80
mov r8, rax
mov rdx, rsi
lea rcx, [rsp + 0x50]
call fcn.140003a2c
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
cmp word [rdi], r12w
jne 0x140008c80
mov rax, r12
jmp 0x140008c88
mov rcx, rdi
call fcn.1400c2d80
mov rdx, rdi
lea rcx, [rsp + 0x70]
mov r8, rax
call fcn.140003a2c
test dword [rbx + 0x10], 0x20000
je 0x140008d1a
lea rdx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rdx, qword [rsp + 0x50]
lea rcx, [rsp + 0x70]
cmp qword [rbp - 0x78], 8
cmovae rcx, qword [rsp + 0x70]
mov r9, rdi
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x140008d1a
mov r8d, 0x104
lea rdx, [rbp - 0x70]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x140008d1a
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x140008d1a
lea rsi, [rax + 8]
cmp word [rbp - 0x70], r12w
jne 0x140008d02
mov rax, r12
jmp 0x140008d0b
lea rcx, [rbp - 0x70]
call fcn.1400c2d80
mov r8, rax
lea rdx, [rbp - 0x70]
mov rcx, rsi
call fcn.140003a2c
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x140008d31
lea r14, [rax + 8]
cmp qword [r14 + 0x18], 8
jb 0x140008d31
mov r14, qword [r14]
mov rcx, r14
call fcn.1400c2d80
test rax, rax
je 0x140008de5
mov qword [rsp + 0x30], r12
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, r14
mov dword [rsp + 0x28], 0x80
test dword [rbx + 0x10], 0x10000
je 0x140008d70
mov dword [rsp + 0x20], 2
jmp 0x140008d78
mov dword [rsp + 0x20], 4
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x140008de5
lea rax, [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
mov r9d, 0x104
xor r8d, r8d
mov rdx, r14
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SearchPathW]
test eax, eax
je 0x140008ddc
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x140008ddc
lea r14, [rax + 8]
cmp word [rdi], r12w
jne 0x140008dc6
mov rax, r12
jmp 0x140008dce
mov rcx, rdi
call fcn.1400c2d80
mov r8, rax
mov rdx, rdi
mov rcx, r14
call fcn.140003a2c
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test dword [rbx + 0xc], 0x40000000
je 0x140008e12
mov rdx, rbx
mov rcx, r15
call fcn.140008668
test dword [rbx + 0x10], 0x100000
je 0x140008e12
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, eax
mov rcx, r15
call fcn.1400085a8
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x140008e20
mov byte [rax], r12b
jmp 0x140008e24
mov byte [rbx + 0x20], r12b
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x50]
call fcn.140003bb4
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x70]
call fcn.140003bb4
mov rcx, qword [rbp + 0x1a0]
xor rcx, rsp
call fcn.1400b9f80
lea r11, [rsp + 0x2b0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret