Function at 0x140053bd0
Capabilities:
Get common file path

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x250
mov rax, qword [0x140165040]
xor rax, rsp
mov qword [rsp + 0x248], rax
mov sil, 1
cmp qword [0x140176430], 0
jne 0x140053f12
mov rdi, qword [0x140176408]
test rdi, rdi
je 0x140053c1b
test byte [0x140167020], 1
jne 0x140053dce
jmp 0x140053f12
mov ecx, 0x18
call fcn.1400fa620
mov rdi, rax
lea rbx, [rsp + 0x40]
mov r8d, 0x208
mov rcx, rbx
mov dl, 0xaa
call fcn.14012e050
xor ecx, ecx
mov rdx, rbx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
movaps xmm0, xmmword [0x14013ab10]
movups xmmword [rdi], xmm0
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rdi + 0x10], rax
mov rcx, rdi
mov rdx, rbx
call fcn.14001ca0c
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 0x140053cf4
add r10, r10
nop dword [rax + rax]
test r10, r10
je 0x140053cf4
lea rdx, [r10 - 2]
cmp word [r11 + r10 - 2], 0x5c
mov r10, rdx
jne 0x140053ca0
cmp rdx, 0xfffffffffffffffe
je 0x140053cf4
sar rdx, 1
lea r10, [rdx + 1]
test al, al
js 0x140053cdc
cmp rdx, r9
jae 0x140053fa4
and r10b, 0x7f
mov byte [rdi + 0x17], r10b
mov rcx, rdi
jmp 0x140053ce9
cmp r8, rdx
jbe 0x140053fa4
mov qword [rdi + 8], r10
mov word [rcx + rdx*2 + 2], 0
movzx eax, byte [rdi + 0x17]
test al, al
js 0x140053d10
movzx r9d, al
lea rcx, [r9 - 2]
mov edx, 0xa
mov rax, rdi
cmp rcx, 9
jb 0x140053d31
jmp 0x140053d6b
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 0x140053d68
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.1400473c8
jmp 0x140053dba
mov rax, qword [rdi]
lea rcx, [rax + r9*2]
lea rdx, str.debug.log
cmp rcx, rdx
ja 0x140053d8c
lea r8, [rax + r9*2]
add r8, 0x12
cmp r8, rdx
ja 0x140053f4c
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 0x140053dae
and cl, 0x7f
mov byte [rdi + 0x17], cl
jmp 0x140053db2
mov qword [rdi + 8], rcx
mov word [rax + r9*2 + 0x12], 0
mov qword [0x140176408], rdi
test byte [0x140167020], 1
je 0x140053f12
cmp byte [rdi + 0x17], 0
jns 0x140053dd7
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 [0x140176430], rax
inc rax
cmp rax, 1
ja 0x140053f12
lea rdi, [rsp + 0x40]
mov r8d, 0x208
mov rcx, rdi
mov dl, 0xaa
call fcn.14012e050
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 0x140053f10
mov rcx, qword [0x140176408]
lea rdx, [rsp + 0x40]
call fcn.140047936
mov rcx, qword [0x140176408]
movzx eax, byte [rcx + 0x17]
test al, al
js 0x140053f2f
test rax, rax
je 0x140053f78
mov rdx, rcx
cmp word [rdx + rax*2 - 2], 0x5c
je 0x140053ea6
lea rdx, [0x14013f4cc]
mov r8d, 1
call fcn.14004795e
mov rcx, qword [0x140176408]
lea rdx, str.debug.log
mov r8d, 9
call fcn.14004795e
mov rcx, qword [0x140176408]
cmp byte [rcx + 0x17], 0
jns 0x140053ec8
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 [0x140176430], rax
inc rax
cmp rax, 1
ja 0x140053f12
mov qword [0x140176430], 0
xor esi, esi
mov rcx, qword [rsp + 0x248]
xor rcx, rsp
call fcn.1400fb950
mov eax, esi
add rsp, 0x250
pop rbx
pop rdi
pop rsi
ret
mov rax, qword [rcx + 8]
test rax, rax
je 0x140053f78
mov rdx, qword [rcx]
cmp word [rdx + rax*2 - 2], 0x5c
jne 0x140053e8d
jmp 0x140053ea6
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.140021ffc
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.140021ffc
mov rcx, rdi
call fcn.14001b028
int3