Function at 0x140051c30
Capabilities:
Get common file path

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x250
mov rax, qword [0x1401c2c08]
xor rax, rsp
mov qword [rsp + 0x248], rax
mov sil, 1
cmp qword [0x1401c6430], 0
jne 0x140051f85
mov rdi, qword [0x1401c6408]
test rdi, rdi
je 0x140051c7b
test byte [0x1401c2be8], 1
jne 0x140051e24
jmp 0x140051f85
mov ecx, 0x18
call fcn.140143888
mov rdi, rax
lea rbx, [rsp + 0x40]
mov r8d, 0x208
mov rcx, rbx
mov dl, 0xaa
call fcn.140146ec0
xor ecx, ecx
mov rdx, rbx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
movaps xmm0, xmmword [section..rdata]
movups xmmword [rdi], xmm0
movabs rax, 0xaaaaaaaaaaaaaaaa
mov qword [rdi + 0x10], rax
mov rcx, rdi
mov rdx, rbx
call fcn.140001b3c
movzx ecx, byte [rdi]
mov r8d, ecx
shr r8d, 1
lea rax, [rdi + 2]
test cl, 1
mov r10, qword [rdi + 8]
mov rdx, qword [rdi + 0x10]
mov r11, r10
cmove r11, r8
mov rbx, rdx
cmove rbx, rax
test r11, r11
je 0x140051d53
add r11, r11
nop
test r11, r11
je 0x140051d53
lea r9, [r11 - 2]
cmp word [rbx + r11 - 2], 0x5c
mov r11, r9
jne 0x140051d00
cmp r9, 0xfffffffffffffffe
je 0x140051d53
sar r9, 1
lea r11, [r9 + 1]
test cl, 1
jne 0x140051d3b
cmp r9, r8
jae 0x140051fc8
add r11b, r11b
mov byte [rdi], r11b
mov rdx, rax
jmp 0x140051d48
cmp r10, r9
jbe 0x140051fc8
mov qword [rdi + 8], r11
mov word [rdx + r9*2 + 2], 0
movzx ecx, byte [rdi]
test cl, 1
jne 0x140051d6f
shr cl, 1
movzx r9d, cl
lea rcx, [r9 - 2]
mov edx, 0xa
cmp rcx, 9
jb 0x140051d89
jmp 0x140051dc4
mov rdx, qword [rdi]
mov r9, qword [rdi + 8]
and rdx, 0xfffffffffffffffe
dec rdx
mov rax, rdx
sub rax, r9
cmp rax, 9
jae 0x140051dc0
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.14002b2ea
jmp 0x140051e10
mov rax, qword [rdi + 0x10]
lea rcx, [rax + r9*2]
lea rdx, str.debug.log
cmp rcx, rdx
ja 0x140051de5
lea r8, [rax + r9*2]
add r8, 0x12
cmp r8, rdx
ja 0x140051fa2
movups xmm0, xmmword [str.debug.log]
movups xmmword [rcx], xmm0
mov word [rcx + 0x10], 0x67
lea rcx, [r9 + 9]
test byte [rdi], 1
jne 0x140051e04
add cl, cl
mov byte [rdi], cl
jmp 0x140051e08
mov qword [rdi + 8], rcx
mov word [rax + r9*2 + 0x12], 0
mov qword [0x1401c6408], rdi
test byte [0x1401c2be8], 1
je 0x140051f85
test byte [rdi], 1
jne 0x140051e2f
add rdi, 2
jmp 0x140051e33
mov rdi, qword [rdi + 0x10]
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 [0x1401c6430], rax
inc rax
cmp rax, 1
ja 0x140051f85
lea rdi, [rsp + 0x40]
mov r8d, 0x208
mov rcx, rdi
mov dl, 0xaa
call fcn.140146ec0
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 0x140051f83
mov rcx, qword [0x1401c6408]
lea rdx, [rsp + 0x40]
call fcn.14002c028
mov rcx, qword [0x1401c6408]
movzx eax, byte [rcx]
test al, 1
jne 0x140051ee1
test rax, rax
je 0x140051fb5
lea rdx, [rcx + 2]
shr eax, 1
jmp 0x140051ef2
mov rax, qword [rcx + 8]
test rax, rax
je 0x140051fb5
mov rdx, qword [rcx + 0x10]
cmp word [rdx + rax*2 - 2], 0x5c
je 0x140051f13
lea rdx, [0x140184448]
mov r8d, 1
call fcn.14002b8a8
mov rcx, qword [0x1401c6408]
lea rdx, str.debug.log
mov r8d, 9
call fcn.14002b8a8
mov rcx, qword [0x1401c6408]
test byte [rcx], 1
jne 0x140051f37
add rcx, 2
jmp 0x140051f3b
mov rcx, qword [rcx + 0x10]
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 [0x1401c6430], rax
inc rax
cmp rax, 1
ja 0x140051f85
mov qword [0x1401c6430], 0
xor esi, esi
mov rcx, qword [rsp + 0x248]
xor rcx, rsp
call fcn.140143c30
mov eax, esi
add rsp, 0x250
pop rbx
pop rdi
pop rsi
ret
lea rcx, [0x140180113]
lea rdx, str....._third_partylibc_srcinclude__stringchar_traits.h:322:_assertion__std::__is_pointer_in_range___s1____s1____n____s2__failed:_char_traits::copy:_source_and_destination_ranges_overlap_n
call fcn.140005804
lea rcx, [0x140180113]
lea rdx, str....._third_partylibc_srcinclude_string:1339:_assertion__empty___failed:_string::back__:_string_is_empty_n
call fcn.140005804
mov rcx, rdi
call fcn.140007f2c
int3