Function at 0x1400501b0
Capabilities:
Get common file path

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0x250
mov rax, qword [0x140105c88]
xor rax, rsp
mov qword [rsp + 0x248], rax
mov sil, 1
cmp qword [0x14010a8b8], 0
jne 0x140050478
mov rdi, qword [0x14010a890]
test rdi, rdi
je 0x1400501fb
test byte [0x1401072a8], 1
jne 0x140050317
jmp 0x140050478
mov ecx, 0x18
call fcn.1400a4cb4
mov rdi, rax
lea rbx, [rsp + 0x40]
mov r8d, 0x208
mov rcx, rbx
mov dl, 0xaa
call fcn.1400a8280
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.140001888
movzx r8d, byte [rdi]
mov rdx, r8
shr rdx, 1
lea rax, [rdi + 2]
test r8b, 1
mov r9, qword [rdi + 8]
mov rcx, qword [rdi + 0x10]
mov r10, r9
cmove r10, rdx
mov r11, rcx
cmove r11, rax
test r10, r10
je 0x1400502ee
add r10, r10
nop word cs:[rax + rax]
test r10, r10
je 0x1400502ee
lea rbx, [r10 - 2]
cmp word [r11 + r10 - 2], 0x5c
mov r10, rbx
jne 0x140050290
cmp rbx, 0xfffffffffffffffe
je 0x1400502ee
mov r10, rbx
sar r10, 1
lea r11, [r10 + 1]
test r8b, 1
jne 0x1400502d9
cmp r10, rdx
jae 0x1400504ed
cmp rbx, 0x14
jae 0x1400504c1
add r11b, r11b
mov byte [rdi], r11b
mov rcx, rax
jmp 0x1400502e6
cmp r9, r10
jbe 0x1400504ed
mov qword [rdi + 8], r11
mov word [rcx + r10*2 + 2], 0
lea rdx, str.debug.log
mov r8d, 9
mov rcx, rdi
call fcn.14002834e
mov qword [0x14010a890], rdi
test byte [0x1401072a8], 1
je 0x140050478
test byte [rdi], 1
jne 0x140050322
add rdi, 2
jmp 0x140050326
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 [0x14010a8b8], rax
inc rax
cmp rax, 1
ja 0x140050478
lea rdi, [rsp + 0x40]
mov r8d, 0x208
mov rcx, rdi
mov dl, 0xaa
call fcn.1400a8280
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 0x140050476
mov rcx, qword [0x14010a890]
lea rdx, [rsp + 0x40]
call fcn.140051a90
mov rcx, qword [0x14010a890]
movzx eax, byte [rcx]
test al, 1
jne 0x1400503d4
cmp al, 2
jb 0x140050495
lea rdx, [rcx + 2]
shr rax, 1
jmp 0x1400503e5
mov rax, qword [rcx + 8]
test rax, rax
je 0x140050495
mov rdx, qword [rcx + 0x10]
cmp word [rdx + rax*2 - 2], 0x5c
je 0x140050406
lea rdx, [0x1400df27c]
mov r8d, 1
call fcn.14002834e
mov rcx, qword [0x14010a890]
lea rdx, str.debug.log
mov r8d, 9
call fcn.14002834e
mov rcx, qword [0x14010a890]
test byte [rcx], 1
jne 0x14005042a
add rcx, 2
jmp 0x14005042e
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 [0x14010a8b8], rax
inc rax
cmp rax, 1
ja 0x140050478
mov qword [0x14010a8b8], 0
xor esi, esi
mov rcx, qword [rsp + 0x248]
xor rcx, rsp
call fcn.1400a5060
mov eax, esi
add rsp, 0x250
pop rbx
pop rdi
pop rsi
ret
lea rax, str.string::back__:_string_is_empty
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s
lea rdx, str.E:_nw77_win64_node_webkit_srcoutst_nw...._buildtools_third_partylibc_trunkinclude_string
lea r9, str._empty__
mov r8d, 0x501
call fcn.140005584
lea rax, str.__s_should_never_be_greater_than_or_equal_to_the_short_string_capacity
mov qword [rsp + 0x20], rax
lea rcx, str._s:_d:_assertion__s_failed:__s
lea rdx, str.E:_nw77_win64_node_webkit_srcoutst_nw...._buildtools_third_partylibc_trunkinclude_string
lea r9, str.__s_____min_cap
mov r8d, 0x6c6
call fcn.140005584
mov rcx, rdi
call fcn.14000806c
int3