Function at 0x14005f2a0
Capabilities:
Get common file path

Disassembly:
mov rax, rsp
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rax - 0x198]
sub rsp, 0x270
mov qword [rax + 8], r12
mov r12, rcx
mov qword [rax + 0x10], r15
lea rcx, [rsp + 0x60]
lea rax, [0x140062d88]
mov qword [rsp + 0x50], 0x104
mov qword [rbp + 0x1b0], rax
movzx r15d, dl
lea rax, [rsp + 0x60]
mov edx, 0x104
mov qword [rsp + 0x58], rax
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edi, eax
cmp eax, 0x104
jbe 0x14005f3ae
mov ecx, dword [rsp + 0x50]
mov r14d, eax
mov ebx, dword [rsp + 0x54]
cmp eax, ecx
mov rax, qword [rsp + 0x58]
cmovl r14d, ecx
mov rsi, rax
cmp edi, ebx
cmovl ebx, edi
cmp r14d, ecx
je 0x14005f373
cmp r14d, 0x104
jle 0x14005f343
movsxd rcx, r14d
add rcx, rcx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov dword [rsp + 0x50], r14d
jmp 0x14005f350
lea rax, [rsp + 0x60]
mov dword [rsp + 0x50], 0x104
movsxd r8, ebx
mov rdx, rsi
add r8, r8
mov qword [rsp + 0x58], rax
mov rcx, rax
mov dword [rsp + 0x54], 0
call sub.VCRUNTIME140.dll_memcpy
mov rax, qword [rsp + 0x58]
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x54], ebx
cmp rsi, rcx
je 0x14005f398
cmp rsi, rax
je 0x14005f398
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [rsp + 0x58]
mov ebx, dword [rsp + 0x54]
cmp ebx, edi
mov edx, edi
mov rcx, rax
cmovl ebx, edi
mov dword [rsp + 0x54], ebx
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edi, eax
mov rdx, qword [rsp + 0x58]
lea rcx, [rbp + 0x1b8]
mov r8d, edi
call fcn.140019f60
lea r14, [0x140062cf8]
mov rbx, qword [rax]
mov qword [rax], r14
mov rcx, qword [rbp + 0x1b8]
mov eax, dword [rcx]
test eax, eax
je 0x14005f3ef
cmp eax, 0xffffffff
je 0x14005f3fd
sub eax, 1
mov dword [rcx], eax
jne 0x14005f3fd
mov rcx, qword [rbp + 0x1b8]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140014460
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x60]
cmp rcx, rax
je 0x14005f412
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [rbp + 0x1b0]
cmp dword [rax], 1
seta al
test al, al
je 0x14005f451
mov edx, 0x7fffffff
lea rcx, [rbp + 0x1b0]
mov r8d, 1
call fcn.140006330
mov qword [rax], rbx
mov ecx, dword [rbx]
mov eax, ecx
test ecx, ecx
je 0x14005f47b
cmp ecx, 0xffffffff
je 0x14005f47b
lea eax, [rcx + 1]
mov dword [rbx], eax
jmp 0x14005f47b
mov qword [rsp + 0x30], rbx
mov ecx, dword [rbx]
lea eax, [rcx + 1]
cmp eax, 1
jbe 0x14005f465
lea eax, [rcx + 1]
mov dword [rbx], eax
lea rcx, [rbp + 0x1b0]
call fcn.140014be0
mov rcx, qword [rsp + 0x30]
mov qword [rax], rcx
mov eax, dword [rbx]
test eax, eax
je 0x14005f48b
cmp eax, 0xffffffff
je 0x14005f49c
sub eax, 1
mov dword [rbx], eax
jne 0x14005f49c
mov edx, 2
mov rcx, rbx
lea r8d, [rdx + 6]
call fcn.140014460
test r15b, r15b
jne 0x14005f5e6
lea rdx, str.PATH
lea rcx, [rsp + 0x30]
call fcn.140045180
mov rcx, qword [rax]
add rcx, qword [rcx + 0x10]
je 0x14005f4d1
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x14005f4c6
jmp 0x14005f4d3
xor eax, eax
mov edx, eax
call fcn.140019d30
mov rcx, qword [rsp + 0x30]
mov qword [rbp + 0x1b8], rax
mov eax, dword [rcx]
test eax, eax
je 0x14005f4fd
cmp eax, 0xffffffff
je 0x14005f50b
sub eax, 1
mov dword [rcx], eax
jne 0x14005f50b
mov rcx, qword [rsp + 0x30]
mov edx, 1
lea r8d, [rdx + 7]
call fcn.140014460
mov r8d, 0x3b
mov dword [rsp + 0x20], 1
lea rdx, [rsp + 0x30]
lea rcx, [rbp + 0x1b8]
lea r9d, [r8 - 0x3a]
call fcn.14001df70
mov rdx, rax
lea rcx, [rbp + 0x1b0]
call fcn.14005f110
mov rdi, qword [rsp + 0x30]
mov eax, dword [rdi]
test eax, eax
je 0x14005f559
cmp eax, 0xffffffff
je 0x14005f5b8
sub eax, 1
mov dword [rdi], eax
jne 0x14005f5b8
mov rdi, qword [rsp + 0x30]
movsxd rsi, dword [rdi + 8]
movsxd rbx, dword [rdi + 0xc]
add rsi, 2
add rbx, 2
lea rsi, [rdi + rsi*8]
lea rbx, [rdi + rbx*8]
cmp rbx, rsi
je 0x14005f5b0
nop word [rax + rax]
mov rcx, qword [rbx - 8]
sub rbx, 8
mov eax, dword [rcx]
test eax, eax
je 0x14005f59a
cmp eax, 0xffffffff
je 0x14005f5ab
sub eax, 1
mov dword [rcx], eax
jne 0x14005f5ab
mov rcx, qword [rbx]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140014460
cmp rbx, rsi
jne 0x14005f580
mov rcx, rdi
call fcn.140014d20
mov rcx, qword [rbp + 0x1b8]
mov eax, dword [rcx]
test eax, eax
je 0x14005f5d8
cmp eax, 0xffffffff
je 0x14005f5e6
sub eax, 1
mov dword [rcx], eax
jne 0x14005f5e6
mov rcx, qword [rbp + 0x1b8]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140014460
mov r8d, 0xffffffff
lea rcx, [rbp + 0x1b8]
mov rdx, r12
call fcn.140019f60
mov r12, qword [rsp + 0x2a0]
mov rcx, qword [rax]
mov qword [rsp + 0x40], rcx
mov qword [rax], r14
mov rcx, qword [rbp + 0x1b8]
mov eax, dword [rcx]
test eax, eax
je 0x14005f62e
cmp eax, 0xffffffff
je 0x14005f63c
sub eax, 1
mov dword [rcx], eax
jne 0x14005f63c
mov rcx, qword [rbp + 0x1b8]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140014460
mov dword [rsp + 0x30], 4
lea rax, str..dll
mov qword [rsp + 0x38], rax
lea rdx, [rsp + 0x30]
movaps xmm0, xmmword [rsp + 0x30]
lea rcx, [rsp + 0x40]
movdqa xmmword [rsp + 0x30], xmm0
call fcn.140018530
mov rbx, qword [rbp + 0x1b0]
xor edi, edi
mov eax, dword [rbx + 0xc]
mov ecx, dword [rbx + 8]
sub eax, ecx
test eax, eax
jle 0x14005f759
xor r14d, r14d
lea r15d, [rdi + 0x5c]
nop word [rax + rax]
movsxd rax, ecx
add rax, r14
mov rax, qword [rbx + rax*8 + 0x10]
mov qword [rbp + 0x1b8], rax
mov edx, dword [rax]
lea ecx, [rdx + 1]
cmp ecx, 1
jbe 0x14005f6b1
lea ecx, [rdx + 1]
mov dword [rax], ecx
mov r8d, 1
lea rcx, [rbp + 0x1b8]
movzx edx, r15w
call fcn.1400198e0
test al, al
jne 0x14005f6db
movzx edx, r15w
lea rcx, [rbp + 0x1b8]
call fcn.140005050
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 0x1b8]
call fcn.1400183c0
lea rcx, [rbp + 0x1b8]
call fcn.14001f0a0
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rcx, qword [rbp + 0x1b8]
mov rsi, rax
test rax, rax
mov eax, dword [rcx]
jne 0x14005f819
test eax, eax
je 0x14005f72f
cmp eax, 0xffffffff
je 0x14005f73d
dec eax
mov dword [rcx], eax
cmp eax, 0
jne 0x14005f73d
mov rcx, qword [rbp + 0x1b8]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140014460
mov rbx, qword [rbp + 0x1b0]
inc edi
inc r14
mov eax, dword [rbx + 0xc]
mov ecx, dword [rbx + 8]
sub eax, ecx
cmp edi, eax
jl 0x14005f690
xor esi, esi
mov rcx, qword [rsp + 0x40]
mov r15, qword [rsp + 0x2a8]
mov eax, dword [rcx]
test eax, eax
je 0x14005f77f
cmp eax, 0xffffffff
je 0x14005f794
sub eax, 1
mov dword [rcx], eax
jne 0x14005f78d
mov rcx, qword [rsp + 0x40]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140014460
mov rbx, qword [rbp + 0x1b0]
mov eax, dword [rbx]
test eax, eax
je 0x14005f7ad
cmp eax, 0xffffffff
je 0x14005f808
sub eax, 1
mov dword [rbx], eax
jne 0x14005f808
mov rbx, qword [rbp + 0x1b0]
movsxd r14, dword [rbx + 8]
movsxd rdi, dword [rbx + 0xc]
add r14, 2
add rdi, 2
lea r14, [rbx + r14*8]
lea rdi, [rbx + rdi*8]
cmp rdi, r14
je 0x14005f800
nop word [rax + rax]
mov rcx, qword [rdi - 8]
sub rdi, 8
mov eax, dword [rcx]
test eax, eax
je 0x14005f7ea
cmp eax, 0xffffffff
je 0x14005f7fb
sub eax, 1
mov dword [rcx], eax
jne 0x14005f7fb
mov rcx, qword [rdi]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140014460
cmp rdi, r14
jne 0x14005f7d0
mov rcx, rbx
call fcn.140014d20
mov rax, rsi
add rsp, 0x270
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
test eax, eax
je 0x14005f830
cmp eax, 0xffffffff
je 0x14005f83e
sub eax, 1
mov dword [rcx], eax
jne 0x14005f83e
mov rcx, qword [rbp + 0x1b8]
mov edx, 2
lea r8d, [rdx + 6]
call fcn.140014460
mov rbx, qword [rbp + 0x1b0]
jmp 0x14005f75b