Function at 0x14004a260
Capabilities:
Get common file path

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x250
mov rax, qword [0x1400e4040]
xor rax, rsp
mov qword [rsp + 0x248], rax
mov sil, 1
cmp qword [0x1400f5318], 0
jne 0x14004a5a2
mov rdi, qword [0x1400f52f0]
test rdi, rdi
je 0x14004a2ab
test byte [0x1400e6478], 1
jne 0x14004a45e
jmp 0x14004a5a2
mov ecx, 0x18
call fcn.1400866a0
mov rdi, rax
lea rbx, [rsp + 0x40]
mov r8d, 0x208
mov rcx, rbx
mov dl, 0xaa
call fcn.1400b8e90
xor ecx, ecx
mov rdx, rbx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
movaps xmm0, xmmword [0x1400c5aa0]
movups xmmword [rdi], xmm0
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rdi + 0x10], rax
mov rcx, rdi
mov rdx, rbx
call fcn.14001f114
movzx eax, byte [rdi + 0x17]
test al, al
mov rcx, qword [rdi]
mov r8, qword [rdi + 8]
movzx r9d, al
mov r10, r9
cmovs r10, r8
mov r11, rdi
cmovs r11, rcx
test r10, r10
je 0x14004a384
add r10, r10
nop dword [rax + rax]
test r10, r10
je 0x14004a384
lea rdx, [r10 - 2]
cmp word [r11 + r10 - 2], 0x5c
mov r10, rdx
jne 0x14004a330
cmp rdx, 0xfffffffffffffffe
je 0x14004a384
sar rdx, 1
lea r10, [rdx + 1]
test al, al
js 0x14004a36c
cmp rdx, r9
jae 0x14004a634
and r10b, 0x7f
mov byte [rdi + 0x17], r10b
mov rcx, rdi
jmp 0x14004a379
cmp r8, rdx
jbe 0x14004a634
mov qword [rdi + 8], r10
mov word [rcx + rdx*2 + 2], 0
movzx eax, byte [rdi + 0x17]
test al, al
js 0x14004a3a0
movzx r9d, al
lea rcx, [r9 - 2]
mov edx, 0xa
mov rax, rdi
cmp rcx, 9
jb 0x14004a3c1
jmp 0x14004a3fb
movabs rdx, 0x7fffffffffffffff
and rdx, qword [rdi + 0x10]
dec rdx
mov r9, qword [rdi + 8]
mov rax, rdx
sub rax, r9
cmp rax, 9
jae 0x14004a3f8
mov r8, r9
sub r8, rdx
add r8, 9
lea rax, str.debug.log
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x30], 9
mov qword [rsp + 0x28], 0
mov rcx, rdi
call fcn.14003f6b6
jmp 0x14004a44a
mov rax, qword [rdi]
lea rcx, [rax + r9*2]
lea rdx, str.debug.log
cmp rcx, rdx
ja 0x14004a41c
lea r8, [rax + r9*2]
add r8, 0x12
cmp r8, rdx
ja 0x14004a5dc
movups xmm0, xmmword [str.debug.log]
movups xmmword [rcx], xmm0
mov word [rcx + 0x10], 0x67
lea rcx, [r9 + 9]
cmp byte [rdi + 0x17], 0
js 0x14004a43e
and cl, 0x7f
mov byte [rdi + 0x17], cl
jmp 0x14004a442
mov qword [rdi + 8], rcx
mov word [rax + r9*2 + 0x12], 0
mov qword [0x1400f52f0], rdi
test byte [0x1400e6478], 1
je 0x14004a5a2
cmp byte [rdi + 0x17], 0
jns 0x14004a467
mov rdi, qword [rdi]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
mov rcx, rdi
mov edx, 4
mov r8d, 3
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [0x1400f5318], rax
inc rax
cmp rax, 1
ja 0x14004a5a2
lea rdi, [rsp + 0x40]
mov r8d, 0x208
mov rcx, rdi
mov dl, 0xaa
call fcn.1400b8e90
mov word [rsp + 0x40], 0
mov ecx, 0x104
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
add eax, 0xfffffefb
cmp eax, 0xfffffefc
jb 0x14004a5a0
mov rcx, qword [0x1400f52f0]
lea rdx, [rsp + 0x40]
call fcn.14003fd2a
mov rcx, qword [0x1400f52f0]
movzx eax, byte [rcx + 0x17]
test al, al
js 0x14004a5bf
test rax, rax
je 0x14004a608
mov rdx, rcx
cmp word [rdx + rax*2 - 2], 0x5c
je 0x14004a536
lea rdx, [0x1400c8a04]
mov r8d, 1
call fcn.14003fd52
mov rcx, qword [0x1400f52f0]
lea rdx, str.debug.log
mov r8d, 9
call fcn.14003fd52
mov rcx, qword [0x1400f52f0]
cmp byte [rcx + 0x17], 0
jns 0x14004a558
mov rcx, qword [rcx]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
mov edx, 4
mov r8d, 3
xor r9d, r9d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [0x1400f5318], rax
inc rax
cmp rax, 1
ja 0x14004a5a2
mov qword [0x1400f5318], 0
xor esi, esi
mov rcx, qword [rsp + 0x248]
xor rcx, rsp
call fcn.140087ae0
mov eax, esi
add rsp, 0x250
pop rbx
pop rdi
pop rsi
ret
mov rax, qword [rcx + 8]
test rax, rax
je 0x14004a608
mov rdx, qword [rcx]
cmp word [rdx + rax*2 - 2], 0x5c
jne 0x14004a51d
jmp 0x14004a536
lea rax, str.char_traits::copy:_source_and_destination_ranges_overlap
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s_n
lea rdx, str....._third_partylibc_srcinclude__stringchar_traits.h
lea r9, str._std::__is_pointer_in_range___s1____s1____n____s2_
mov r8d, 0x138
call fcn.14001c2cc
lea rax, str.string::back__:_string_is_empty
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s_n
lea rdx, str....._third_partylibc_srcinclude_string
lea r9, str._empty__
mov r8d, 0x525
call fcn.14001c2cc
mov rcx, rdi
call fcn.14001b10e
int3