Function at 0x140158510
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 [0x1403eaa10]
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 0x1401587c4
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 0x1401585af
cmp eax, 5
je 0x1401585c7
inc eax
inc rdx
movsxd rcx, eax
cmp rcx, 6
jb 0x140158590
inc r9
inc r10d
lea eax, [r11 - 0x400]
cmp r10d, eax
jge 0x1401587c4
jmp 0x140158580
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 0x140158698
movzx eax, byte [r12]
test al, al
je 0x1401585fa
cmp al, 0x90
jne 0x140158698
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 0x140158674
mov rbx, r15
inc rbx
cmp byte [rdi + rbx], 0
jne 0x140158621
test ebx, ebx
jle 0x140158674
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 0x14015867b
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.140299fc8
mov byte [rbx + rsi], 0
jmp 0x14015867b
mov r14d, ebx
mov dword [rsp + 0x30], ebx
cmp r14d, 0x12
je 0x1401586b2
test rsi, rsi
je 0x140158694
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 0x1401587c4
jmp 0x1401585e0
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 0x1401586c5
xor eax, eax
mov qword [rsp + 0x28], rax
test r15d, r15d
jne 0x1401586ea
lea rax, [0x140323de0]
mov qword [rsp + 0x20], rax
jmp 0x140158711
mov edx, r15d
lea rcx, [rsp + 0x20]
call fcn.1401e9030
movsxd r9, r15d
mov eax, dword [rsp + 0x28]
inc eax
movsxd rdx, eax
lea r8, [rbp - 0x80]
mov rcx, qword [rsp + 0x20]
call fcn.14029b4d8
mov edx, r15d
lea rcx, [rsp + 0x20]
call fcn.1401ea290
nop
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x30]
call fcn.1401f1300
nop
mov r8, rax
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x50]
call fcn.1400d1690
mov rbx, rax
mov edx, dword [rax + 0xc]
mov rdi, qword [rsp + 0x48]
mov rcx, rdi
call fcn.1401e9030
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.14029b4d8
mov edx, dword [rbx + 0xc]
mov rcx, rdi
call fcn.1401ea290
nop
cmp dword [rsp + 0x58], 0
jle 0x140158789
mov rcx, qword [rsp + 0x50]
call fcn.140298600
nop
cmp dword [rsp + 0x68], 0
jle 0x14015879b
mov rcx, qword [rsp + 0x60]
call fcn.140298600
nop
cmp dword [rsp + 0x28], 0
jle 0x1401587ad
mov rcx, qword [rsp + 0x20]
call fcn.140298600
nop
test rsi, rsi
je 0x1401587c0
mov r8, rsi
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov al, 1
jmp 0x1401587c6
xor al, al
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.140297ff0
mov rbx, qword [rsp + 0x2f0]
add rsp, 0x2a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret