Function at 0x1400c8790
Capabilities:
Get common file path

Disassembly:
push rbp
push r15
lea rbp, [rsp - 0x178]
sub rsp, 0x278
mov rax, qword [0x1401664b8]
xor rax, rsp
mov qword [rbp + 0x150], rax
mov r15, rcx
lea rcx, [rsp + 0x20]
call fcn.1400c5b50
mov rdx, rax
mov rcx, r15
call fcn.1400c8370
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x1400c87db
call fcn.140044390
cmp dword [r15 + 8], 1
jg 0x1400c8ac7
xor edx, edx
lea rcx, [rsp + 0x40]
mov r8d, 0x208
call sub.VCRUNTIME140.dll_memset
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov r8d, 0x104
lea rdx, [rsp + 0x40]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400c8ac7
mov qword [rsp + 0x298], rbx
mov qword [rsp + 0x2a0], rsi
mov qword [rsp + 0x2a8], rdi
mov qword [rsp + 0x260], r14
xor r14d, r14d
mov edx, r14d
mov ecx, r14d
mov dword [rsp + 0x28], edx
mov dword [rsp + 0x2c], ecx
mov qword [rsp + 0x20], r14
cmp word [rsp + 0x40], r14w
je 0x1400c88b3
lea rax, [rsp + 0x40]
mov rbx, 0xffffffffffffffff
inc rbx
cmp word [rax + rbx*2], cx
jne 0x1400c8866
inc ebx
test ebx, ebx
jle 0x1400c8889
mov edx, ebx
lea rcx, [rsp + 0x20]
call fcn.140019590
mov ecx, dword [rsp + 0x2c]
mov edx, dword [rsp + 0x28]
lea eax, [rbx + rdx]
mov dword [rsp + 0x28], eax
cmp eax, ecx
jle 0x1400c889e
lea rcx, [rsp + 0x20]
call fcn.1400191f0
mov rcx, qword [rsp + 0x20]
lea rdx, [rsp + 0x40]
movsxd r8, ebx
add r8, r8
call fcn.140032f10
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x30]
call fcn.14009f760
mov rbx, rax
cmp r15, rax
je 0x1400c88f2
mov rcx, qword [r15]
test rcx, rcx
je 0x1400c88d7
call fcn.140044390
mov rcx, qword [rbx]
mov qword [r15], rcx
mov qword [rbx], r14
mov eax, dword [rbx + 8]
mov dword [r15 + 8], eax
mov eax, dword [rbx + 0xc]
mov dword [r15 + 0xc], eax
mov qword [rbx + 8], r14
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x1400c8901
call fcn.140044390
mov rcx, qword [rsp + 0x20]
test rcx, rcx
je 0x1400c8910
call fcn.140044390
mov r8d, 1
lea rdx, [0x140134a18]
mov rcx, r15
call fcn.14001cb80
mov r9d, 0x80
mov qword [rsp + 0x20], r14
mov ebx, r14d
mov dword [rsp + 0x2c], r14d
cmp r9d, ebx
mov rdi, r14
mov esi, r14d
jle 0x1400c895d
mov edx, ebx
mov ebx, r9d
mov dword [rsp + 0x28], ebx
cmp r9d, esi
jle 0x1400c89a6
lea rcx, [rsp + 0x20]
call fcn.1400191f0
jmp 0x1400c8999
jge 0x1400c89a6
mov eax, ebx
sub eax, r9d
je 0x1400c89a6
sub ebx, eax
mov ecx, ebx
sub ecx, r9d
je 0x1400c898b
movsxd r8, ecx
add eax, r9d
movsxd rcx, eax
add r8, r8
movsxd rax, r9d
lea rdx, [rdi + rcx*2]
lea rcx, [rdi + rax*2]
call fcn.1401112ee
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x28], ebx
call fcn.140019390
mov rdi, qword [rsp + 0x20]
mov ebx, dword [rsp + 0x28]
mov esi, dword [rsp + 0x2c]
mov rdx, rdi
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov r9d, eax
test eax, eax
je 0x1400c8a44
cmp eax, ebx
jae 0x1400c8941
inc r9d
cmp r9d, ebx
jle 0x1400c8a26
mov qword [rsp + 0x270], r12
mov r12d, r9d
sub r12d, ebx
mov qword [rsp + 0x268], r13
movsxd r13, ebx
mov ebx, r9d
mov dword [rsp + 0x28], ebx
cmp r9d, esi
jle 0x1400c8a03
mov edx, r13d
lea rcx, [rsp + 0x20]
call fcn.1400191f0
mov ebx, dword [rsp + 0x28]
mov rdi, qword [rsp + 0x20]
movsxd r8, r12d
lea rcx, [rdi + r13*2]
add r8, r8
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov r13, qword [rsp + 0x268]
mov r12, qword [rsp + 0x270]
jmp 0x1400c8a6f
jge 0x1400c8a6f
je 0x1400c8a6f
lea rcx, [rsp + 0x20]
mov dword [rsp + 0x28], r9d
call fcn.140019390
mov ebx, dword [rsp + 0x28]
mov rdi, qword [rsp + 0x20]
jmp 0x1400c8a6f
mov ebx, r14d
test esi, esi
jns 0x1400c8a66
mov dword [rsp + 0x28], ebx
je 0x1400c8a66
xor edx, edx
lea rcx, [rsp + 0x20]
call fcn.140019590
mov ebx, dword [rsp + 0x28]
mov rdi, qword [rsp + 0x20]
test rdi, rdi
je 0x1400c8a6f
mov word [rdi], r14w
mov rsi, qword [rsp + 0x2a0]
test ebx, ebx
je 0x1400c8a7f
lea r14d, [rbx - 1]
mov r8d, r14d
mov rdx, rdi
mov rcx, r15
call fcn.14001cc20
mov r14, qword [rsp + 0x260]
mov rbx, qword [rsp + 0x298]
test rdi, rdi
je 0x1400c8aaa
mov rcx, rdi
call fcn.140044390
mov r8d, 1
lea rdx, [0x140134a18]
mov rcx, r15
call fcn.14001cb80
mov rdi, qword [rsp + 0x2a8]
mov rax, r15
mov rcx, qword [rbp + 0x150]
xor rcx, rsp
call fcn.14010f320
add rsp, 0x278
pop r15
pop rbp
ret