Function at 0x140005a60
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x20], rsi
mov qword [rsp + 8], rcx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x70
mov r9d, dword [0x14008be84]
xor r15d, r15d
mov rax, qword gs:[0x58]
mov r12, rcx
mov ecx, 8
mov rsi, r8
mov r10d, edx
mov r14d, r15d
mov r8d, r15d
mov rax, qword [rax + r9*8]
mov r9, qword [rcx + rax]
nop word [rax + rax]
mov rdx, qword [r9]
lea rax, [rsp + 0xa0]
mov rcx, r15
nop
cmp rdx, qword [rax]
je 0x140005bac
inc rcx
add rax, 8
cmp rcx, 1
jb 0x140005ac0
mov r14, rdx
mov rax, qword [r14 + 8]
mov rdi, r15
mov qword [rsp + 0xa8], rbx
mov qword [rsp + 0xb0], rbp
movaps xmmword [rsp + 0x60], xmm6
mov r13, qword [rax + 0x18]
add r13, qword [rax + 0x10]
test r10d, r10d
je 0x140005eb7
sub r10d, 1
je 0x140005e50
sub r10d, 1
je 0x140005da8
sub r10d, 1
je 0x140005cb9
cmp r10d, 1
jne 0x140006009
mov r15, qword [rsi + 0x10]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edi, eax
mov ebx, 1
test eax, eax
je 0x140005bfe
mov edx, edi
mov rcx, r14
add rdx, rdx
call fcn.1400012c0
mov edx, edi
mov rcx, rax
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x140005bfe
mov eax, eax
lea r8, [rsp + 0x30]
mov rdx, r12
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x30], rbp
call fcn.140015e10
lea edx, [rbx + 0x17]
mov rcx, r12
movups xmm6, xmmword [rax]
call fcn.1400012c0
cmp qword [rsi], 0
mov rcx, rax
je 0x140005bc2
mov rax, qword [rsi + 8]
mov qword [rax], rcx
jmp 0x140005bc5
inc r8
add r9, 8
cmp r8, 2
jb 0x140005ab0
jmp 0x140005ad9
mov qword [rsi], rcx
mov qword [rsi + 8], rcx
movdqa xmm0, xmm6
mov qword [rcx], 0
movq xmm2, rbx
psrldq xmm0, 8
movq rax, xmm0
movdqu xmm0, xmmword [rsi + 0x10]
movq xmm1, rax
punpcklqdq xmm2, xmm1
paddq xmm2, xmm0
movdqu xmmword [rsi + 0x10], xmm2
movups xmmword [rcx + 8], xmm6
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov edi, eax
test eax, eax
je 0x140005cad
mov edx, edi
mov rcx, r14
add rdx, rdx
call fcn.1400012c0
mov edx, edi
mov rcx, rax
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x140005cad
mov eax, eax
lea r8, [rsp + 0x30]
mov rdx, r12
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x30], rbp
call fcn.140015e10
mov edx, 0x18
mov rcx, r12
movups xmm6, xmmword [rax]
call fcn.1400012c0
cmp qword [rsi], 0
mov rcx, rax
je 0x140005c71
mov rax, qword [rsi + 8]
mov qword [rax], rcx
jmp 0x140005c74
mov qword [rsi], rcx
mov qword [rsi + 8], rcx
movdqa xmm0, xmm6
mov qword [rcx], 0
movq xmm2, rbx
psrldq xmm0, 8
movq rax, xmm0
movdqu xmm0, xmmword [rsi + 0x10]
movq xmm1, rax
punpcklqdq xmm2, xmm1
paddq xmm2, xmm0
movdqu xmmword [rsi + 0x10], xmm2
movups xmmword [rcx + 8], xmm6
mov rdi, qword [rsi + 0x10]
sub rdi, r15
jmp 0x140006009
cmp dword [0x14008b18c], edi
je 0x140005d98
mov edx, 0x10000
mov dword [0x14008b18c], r15d
mov rcx, r14
call fcn.1400012c0
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
xor ecx, ecx
mov rbx, rax
lea edx, [r9 + 0x1a]
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x140005d98
mov rax, rbx
mov qword [rsp + 0x30], rbx
cmp word [rbx], di
je 0x140005d19
nop dword [rax + rax]
add rax, 2
cmp word [rax], di
jne 0x140005d10
sub rax, rbx
lea r8, [rsp + 0x30]
sar rax, 1
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov rdx, r14
movaps xmm0, xmmword [rsp + 0x30]
movdqa xmmword [rsp + 0x30], xmm0
call fcn.140015e10
lea rcx, [0x14008be10]
movups xmm0, xmmword [rax]
movups xmmword [0x14008be70], xmm0
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rdx, qword [0x14008be78]
mov rcx, qword [0x14008bde8]
call fcn.1400012c0
lea rcx, [0x14008be10]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov r8, qword [0x14008be78]
mov rcx, rbx
mov rdx, qword [0x14008be70]
call fcn.140072e10
mov qword [0x14008be70], rbx
movups xmm6, xmmword [0x14008be70]
mov ebx, 1
mov edi, ebx
jmp 0x140005df5
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov rcx, r14
lea ebx, [rax + 1]
mov edx, ebx
add rdx, rdx
call fcn.1400012c0
mov rdx, rax
mov qword [rsp + 0x30], rax
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, eax
mov ebx, 1
lea r8, [rsp + 0x30]
mov qword [rsp + 0x38], rax
mov rdx, r12
lea rcx, [rsp + 0x50]
mov edi, ebx
call fcn.140015e10
movups xmm6, xmmword [rax]
mov edx, 0x18
mov rcx, r12
call fcn.1400012c0
mov rcx, rax
cmp qword [rsi], r15
je 0x140005e13
mov rax, qword [rsi + 8]
mov qword [rax], rcx
jmp 0x140005e16
mov qword [rsi], rcx
mov qword [rsi + 8], rcx
movdqa xmm0, xmm6
mov qword [rcx], r15
movq xmm2, rbx
psrldq xmm0, 8
movq rax, xmm0
movdqu xmm0, xmmword [rsi + 0x10]
movq xmm1, rax
punpcklqdq xmm2, xmm1
paddq xmm2, xmm0
movdqu xmmword [rsi + 0x10], xmm2
movups xmmword [rcx + 8], xmm6
jmp 0x140006009
movups xmm6, xmmword [0x14008be38]
mov ebx, 1
mov rcx, r12
mov edi, ebx
movdqa xmm0, xmm6
psrldq xmm0, 8
lea edx, [rbx + 0x17]
movq rbp, xmm0
call fcn.1400012c0
mov rcx, rax
cmp qword [rsi], r15
je 0x140005e88
mov rax, qword [rsi + 8]
mov qword [rax], rcx
jmp 0x140005e8b
mov qword [rsi], rcx
mov qword [rsi + 8], rcx
movq xmm0, rbp
mov qword [rcx], r15
movq xmm1, rbx
punpcklqdq xmm1, xmm0
movdqu xmm0, xmmword [rsi + 0x10]
paddq xmm1, xmm0
movdqu xmmword [rsi + 0x10], xmm1
movups xmmword [rcx + 8], xmm6
jmp 0x140006009
lea rcx, [0x14008be10]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x14008b15c], edi
je 0x140005f81
mov edx, 0x10000
mov dword [0x14008b15c], r15d
mov rcx, r14
call fcn.1400012c0
mov r8d, 0x8000
mov qword [rsp + 0x30], rax
mov rdx, rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, eax
lea r8, [rsp + 0x30]
mov rdx, r14
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x50]
call fcn.140015e10
mov rdi, qword [rax + 8]
mov rbp, qword [rax]
test rdi, rdi
je 0x140005f4e
dec rdi
add rdi, rbp
cmp rdi, rbp
jb 0x140005f4b
nop word [rax + rax]
movzx eax, byte [rdi]
cmp al, 0x2f
je 0x140005fce
cmp al, 0x5c
je 0x140005fce
dec rdi
cmp rdi, rbp
jae 0x140005f30
mov rdi, r15
mov rcx, qword [0x14008bde8]
lea rdx, [rdi + 1]
call fcn.1400012c0
mov r8, rdi
mov rdx, rbp
mov rcx, rax
mov rbx, rax
call fcn.140072e10
mov byte [rbx + rdi], r15b
mov qword [0x14008be60], rbx
mov qword [0x14008be68], rdi
lea rcx, [0x14008be10]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rax, qword [0x14008be60]
mov ebx, 1
mov rbp, qword [0x14008be68]
mov rcx, r12
mov edi, ebx
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rbp
lea edx, [rbx + 0x17]
call fcn.1400012c0
mov rcx, rax
movaps xmm2, xmmword [rsp + 0x30]
cmp qword [rsi], r15
je 0x140005fdf
mov rax, qword [rsi + 8]
mov qword [rax], rcx
jmp 0x140005fe2
cmp rdi, rbp
jb 0x140005f4b
sub rdi, rbp
jmp 0x140005f4e
mov qword [rsi], rcx
mov qword [rsi + 8], rcx
movq xmm0, rbp
mov qword [rcx], r15
movq xmm1, rbx
punpcklqdq xmm1, xmm0
movdqu xmm0, xmmword [rsi + 0x10]
paddq xmm1, xmm0
movdqu xmmword [rsi + 0x10], xmm1
movups xmmword [rcx + 8], xmm2
mov rdx, r13
mov rcx, r14
call fcn.140001240
movaps xmm6, xmmword [rsp + 0x60]
mov rax, rdi
mov rbp, qword [rsp + 0xb0]
mov rbx, qword [rsp + 0xa8]
mov rsi, qword [rsp + 0xb8]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
ret