Function at 0x140165c00
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 [0x140418a10]
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 0x140165eb4
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 0x140165c9f
cmp eax, 5
je 0x140165cb7
inc eax
inc rdx
movsxd rcx, eax
cmp rcx, 6
jb 0x140165c80
inc r9
inc r10d
lea eax, [r11 - 0x400]
cmp r10d, eax
jge 0x140165eb4
jmp 0x140165c70
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 0x140165d88
movzx eax, byte [r12]
test al, al
je 0x140165cea
cmp al, 0x90
jne 0x140165d88
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 0x140165d64
mov rbx, r15
inc rbx
cmp byte [rdi + rbx], 0
jne 0x140165d11
test ebx, ebx
jle 0x140165d64
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 0x140165d6b
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.1402bb6a0
mov byte [rbx + rsi], 0
jmp 0x140165d6b
mov r14d, ebx
mov dword [rsp + 0x30], ebx
cmp r14d, 0x12
je 0x140165da2
test rsi, rsi
je 0x140165d84
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 0x140165eb4
jmp 0x140165cd0
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 0x140165db5
xor eax, eax
mov qword [rsp + 0x28], rax
test r15d, r15d
jne 0x140165dda
lea rax, [0x140348ca0]
mov qword [rsp + 0x20], rax
jmp 0x140165e01
mov edx, r15d
lea rcx, [rsp + 0x20]
call fcn.1401ff260
movsxd r9, r15d
mov eax, dword [rsp + 0x28]
inc eax
movsxd rdx, eax
lea r8, [rbp - 0x80]
mov rcx, qword [rsp + 0x20]
call fcn.1402bd21c
mov edx, r15d
lea rcx, [rsp + 0x20]
call fcn.140200570
nop
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x30]
call fcn.140207690
nop
mov r8, rax
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x50]
call fcn.1400d2bd0
mov rbx, rax
mov edx, dword [rax + 0xc]
mov rdi, qword [rsp + 0x48]
mov rcx, rdi
call fcn.1401ff260
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.1402bd21c
mov edx, dword [rbx + 0xc]
mov rcx, rdi
call fcn.140200570
nop
cmp dword [rsp + 0x58], 0
jle 0x140165e79
mov rcx, qword [rsp + 0x50]
call fcn.1402b9c20
nop
cmp dword [rsp + 0x68], 0
jle 0x140165e8b
mov rcx, qword [rsp + 0x60]
call fcn.1402b9c20
nop
cmp dword [rsp + 0x28], 0
jle 0x140165e9d
mov rcx, qword [rsp + 0x20]
call fcn.1402b9c20
nop
test rsi, rsi
je 0x140165eb0
mov r8, rsi
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov al, 1
jmp 0x140165eb6
xor al, al
mov rcx, qword [rbp + 0x190]
xor rcx, rsp
call fcn.1402b9610
mov rbx, qword [rsp + 0x2f0]
add rsp, 0x2a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret