Function at 0x140164970
Capabilities:
Get common file path

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1a0]
sub rsp, 0x2a0
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x2f0], rbx
mov rax, qword [0x140415a10]
xor rax, rsp
mov qword [rbp + 0x190], rax
mov qword [rsp + 0x48], rdx
mov dword [rsp + 0x78], 0x74736f68
mov word [rsp + 0x7c], 0x73
mov r9, qword [rcx + 0x10]
mov r10d, 0x1000
mov r11d, dword [rcx + 8]
lea eax, [r11 - 0x400]
cmp eax, r10d
jle 0x140164c24
nop
mov r8, r9
xor eax, eax
lea rdx, [rsp + 0x78]
nop word [rax + rax]
movzx ecx, byte [r8]
lea r8, [r8 + 1]
cmp cl, byte [rdx]
jne 0x140164a0f
cmp eax, 5
je 0x140164a27
inc eax
inc rdx
movsxd rcx, eax
cmp rcx, 6
jb 0x1401649f0
inc r9
inc r10d
lea eax, [r11 - 0x400]
cmp r10d, eax
jge 0x140164c24
jmp 0x1401649e0
lea r12, [r9 - 0x28]
xor ecx, ecx
mov dword [rsp + 0x78], ecx
lea rdi, [r12 + 1]
or r15, 0xffffffffffffffff
nop word [rax + rax]
cmp byte [rdi], 0x5c
jne 0x140164af8
movzx eax, byte [r12]
test al, al
je 0x140164a5a
cmp al, 0x90
jne 0x140164af8
xor r14d, r14d
mov qword [rsp + 0x30], r14
xor esi, esi
mov qword [rsp + 0x38], rsi
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r13, rax
mov qword [rsp + 0x40], rax
xor ebx, ebx
test rdi, rdi
je 0x140164ad4
mov rbx, r15
inc rbx
cmp byte [rdi + rbx], 0
jne 0x140164a81
test ebx, ebx
jle 0x140164ad4
lea eax, [rbx + 1]
movsxd r8, eax
mov edx, 8
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rsi, rax
mov qword [rsp + 0x38], rax
test rax, rax
je 0x140164adb
mov dword [rsp + 0x34], ebx
mov r14d, ebx
mov dword [rsp + 0x30], ebx
movsxd rbx, ebx
mov r9, rbx
mov r8, rdi
mov rdx, rbx
mov rcx, rax
call fcn.1402b8dd0
mov byte [rbx + rsi], 0
jmp 0x140164adb
mov r14d, ebx
mov dword [rsp + 0x30], ebx
cmp r14d, 0x12
je 0x140164b12
test rsi, rsi
je 0x140164af4
mov r8, rsi
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [rsp + 0x78]
inc r12
inc rdi
inc ecx
mov dword [rsp + 0x78], ecx
cmp ecx, 0x50
jge 0x140164c24
jmp 0x140164a40
mov edx, 0x104
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea rax, [rbp - 0x80]
inc r15
cmp word [rax + r15*2], 0
jne 0x140164b25
xor eax, eax
mov qword [rsp + 0x28], rax
test r15d, r15d
jne 0x140164b4a
lea rax, [0x140346ce0]
mov qword [rsp + 0x20], rax
jmp 0x140164b71
mov edx, r15d
lea rcx, [rsp + 0x20]
call fcn.1401fcb40
movsxd r9, r15d
mov eax, dword [rsp + 0x28]
inc eax
movsxd rdx, eax
lea r8, [rbp - 0x80]
mov rcx, qword [rsp + 0x20]
call fcn.1402ba94c
mov edx, r15d
lea rcx, [rsp + 0x20]
call fcn.1401fde50
nop
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x30]
call fcn.140204f70
nop
mov r8, rax
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x50]
call fcn.1400d2ba0
mov rbx, rax
mov edx, dword [rax + 0xc]
mov rdi, qword [rsp + 0x48]
mov rcx, rdi
call fcn.1401fcb40
movsxd r9, dword [rbx + 0xc]
mov edx, dword [rdi + 8]
inc edx
movsxd rdx, edx
mov r8, qword [rbx]
mov rcx, qword [rdi]
call fcn.1402ba94c
mov edx, dword [rbx + 0xc]
mov rcx, rdi
call fcn.1401fde50
nop
cmp dword [rsp + 0x58], 0
jle 0x140164be9
mov rcx, qword [rsp + 0x50]
call fcn.1402b7350
nop
cmp dword [rsp + 0x68], 0
jle 0x140164bfb
mov rcx, qword [rsp + 0x60]
call fcn.1402b7350
nop
cmp dword [rsp + 0x28], 0
jle 0x140164c0d
mov rcx, qword [rsp + 0x20]
call fcn.1402b7350
nop
test rsi, rsi
je 0x140164c20
mov r8, rsi
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov al, 1
jmp 0x140164c26
xor al, al
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.1402b6d40
mov rbx, qword [rsp + 0x2f0]
add rsp, 0x2a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret