Function at 0x140022970
Capabilities:
Get common file path

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x68]
sub rsp, 0x140
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov r15, rdx
mov r14, rcx
cmp qword [rcx + 8], 0
jne 0x140022c1e
xor r12d, r12d
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], r12
mov edx, 0x107
lea rcx, [rsp + 0x30]
call fcn.14000b250
mov rdx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x38]
test rax, rax
jne 0x1400229e2
mov word [rdi + rdx*2 - 2], r12w
lea rcx, [0x1400abb78]
test rdx, rdx
cmovne rcx, rdi
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x140022a40
lea rdx, str.GetSystemDirectory__
lea rcx, [rsp + 0x60]
call fcn.140003f70
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x50], xmm0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x78]
call fcn.14000bc60
lea rdx, [0x140098a90]
lea rcx, [rbp - 0x78]
call fcn.1400267a0
int3
mov edx, eax
cmp rdx, 0xffffffffffffffff
jne 0x140022a4e
call fcn.140001580
int3
inc rdx
lea rcx, [rsp + 0x30]
call fcn.14000b250
mov rcx, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x38]
test rax, rax
jne 0x140022a70
mov word [rdi + rcx*2 - 2], r12w
test rcx, rcx
lea rax, [rcx - 1]
jne 0x140022a7c
mov rax, r12
lea rdx, [rax - 1]
cmp qword [rsp + 0x30], 0
jne 0x140022c04
test rcx, rcx
je 0x140022c04
lea rax, [rcx - 1]
cmp rdx, rax
jae 0x140022c04
cmp word [rdi + rdx*2], 0x5c
je 0x140022ac0
mov r8d, 1
lea rdx, [0x14007bdfc]
lea rcx, [rsp + 0x30]
call fcn.14000fb30
movups xmm1, xmmword [r15]
movdqa xmm0, xmm1
psrldq xmm0, 8
movq r8, xmm0
movq rdx, xmm1
lea rcx, [rsp + 0x30]
call fcn.14000fb30
lea rdi, [0x1400abb74]
mov rbx, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
test rsi, rsi
je 0x140022b00
lea rax, [rsi - 1]
mov r9, rbx
jmp 0x140022b06
mov rax, r12
mov r9, rdi
mov qword [rsp + 0x50], r9
mov qword [rsp + 0x58], rax
movups xmm0, xmmword [rsp + 0x50]
movups xmmword [r15], xmm0
lea rcx, [rsp + 0x60]
mov qword [rbp + 0x70], rcx
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r12
mov qword [rsp + 0x78], r12
mov qword [rsp + 0x20], rax
or r8, 0xffffffffffffffff
lea rcx, [rsp + 0x60]
call fcn.14000f740
nop
cmp qword [rsp + 0x70], 0
cmovne rdi, qword [rsp + 0x68]
xor edx, edx
lea r8d, [rdx + 8]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov qword [r14 + 8], rax
lea rax, [rsp + 0x60]
mov qword [rbp + 0x70], rax
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x140022b95
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140022b95
add rcx, rcx
mov rdi, rax
xor eax, eax
rep stosb byte [rdi], al
mov rax, qword [rsp + 0x68]
mov rcx, rax
call fcn.140024f38
cmp qword [r14 + 8], 0
jne 0x140022be5
lea rdx, str.LoadLibraryEx__
lea rcx, [rsp + 0x60]
call fcn.140003b10
movups xmm0, xmmword [rax]
movaps xmmword [rsp + 0x50], xmm0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x78]
call fcn.14000bc60
lea rdx, [0x140098a90]
lea rcx, [rbp - 0x78]
call fcn.1400267a0
nop
test rbx, rbx
je 0x140022bfa
test rsi, rsi
je 0x140022bfa
lea rcx, [rsi + rsi]
mov rdi, rbx
xor eax, eax
rep stosb byte [rdi], al
mov rcx, rbx
call fcn.140024f38
jmp 0x140022c38
mov r8d, 0xca
lea rdx, str.basic_ncstring_wchar_t_::operator___
lea rcx, str._af___i_length__
call fcn.1400126e0
nop
mov r8d, 8
lea rdx, str.DllLoader::Init
lea rcx, str._m_hDll
call fcn.1400126e0
int3
lea r11, [rsp + 0x140]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret