Function at 0x140003750
Capabilities:
Get common file path

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x698
movabs rax, 0x180000000b
mov qword [rsp + 0x48], rax
mov r12, rcx
mov rbp, r8
movabs rax, 0x1600000019
mov qword [rsp + 0x6e8], rdx
mov dword [rsp + 0x44], 0x10
mov qword [rsp + 0x50], rax
test byte [0x140010000], 8
jne 0x140003a48
lea r13, [rsp + 0x270]
xor r9d, r9d
mov edx, 0x104
mov rcx, r12
mov r8, r13
call qword [sym.imp.kernel32.dll_GetFullPathNameW]
sub eax, 1
cmp eax, 0x103
ja 0x140003920
test byte [0x140010000], 8
jne 0x140003940
lea r14, [rsp + 0x60]
mov r8d, 0x104
mov rcx, r13
mov rdx, r14
call qword [sym.imp.kernel32.dll_GetLongPathNameW]
mov esi, eax
lea eax, [rax - 1]
cmp eax, 0x103
ja 0x140003920
lea r15, [rsp + 0x480]
test byte [0x140010000], 8
jne 0x140003c68
mov eax, 0x103
lea rbx, [rsp + 0x40]
lea r13, [rsp + 0x58]
mov r12, qword [sym.imp.shell32.dll_SHGetSpecialFolderPathW]
cmp esi, eax
mov edi, 7
cmova esi, eax
jmp 0x14000384f
add rbx, 4
cmp r13, rbx
je 0x140003920
mov edi, dword [rbx]
xor r9d, r9d
xor ecx, ecx
mov r8d, edi
mov rdx, r15
call r12
test eax, eax
je 0x140003840
cmp word [rsp + 0x480], 0
je 0x140003eb0
mov rax, r15
nop dword [rax + rax]
add rax, 2
cmp word [rax], 0
jne 0x140003878
sub rax, r15
sar rax, 1
mov edx, eax
cmp eax, esi
ja 0x140003840
cmp word [rsp + rdx*2 + 0x60], 0x5c
jne 0x140003840
mov r8d, eax
mov rdx, r15
mov rcx, r14
mov qword [rsp + 0x38], r8
call qword [sym.imp.ucrtbase.dll__wcsnicmp]
test eax, eax
jne 0x140003840
mov r8, qword [rsp + 0x38]
mov rax, qword [rsp + 0x6e8]
lea rbx, [r14 + r8*2 + 2]
mov dword [rax], edi
cmp word [rbx], 0
je 0x140004049
mov rax, rbx
nop
add rax, 2
cmp word [rax], 0
jne 0x1400038d0
sub rax, rbx
sar rax, 1
lea ecx, [rax + 1]
movsxd rcx, ecx
add rcx, rcx
call dbg.xmalloc
xor edx, edx
mov r8, rax
nop dword [rax + rax]
movzx ecx, word [rbx + rdx]
mov word [r8 + rdx], cx
add rdx, 2
test cx, cx
jne 0x1400038f8
mov qword [rbp], r8
mov rcx, r8
call qword [sym.imp.shlwapi.dll_PathRemoveExtensionW]
mov eax, 1
jmp 0x140003922
xor eax, eax
add rsp, 0x698
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, r13
shr rax, 0x10
je 0x140003b78
mov rdx, 0xffffffffffffffff
mov rcx, r13
call qword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov r8d, eax
lea rax, str._invalid_
test r8d, r8d
jne 0x140003b88
movzx eax, word [rsp + 0x270]
test ax, ax
je 0x140004023
xor edx, edx
nop dword [rax + rax]
mov ecx, edx
add rdx, 1
cmp word [r13 + rdx*2], 0
jne 0x140003988
mov r8d, 0x224c
lea rdx, [rsp + 0x482]
lea r11, str.0123456789abcdefwrite_freedesktop_mime_type_entry
mov word [rsp + 0x480], r8w
lea r10, [rsp + 0x5a2]
mov r8, r13
jmp 0x140003a0c
cmp ax, 9
je 0x140003dc0
cmp ax, 0xa
jne 0x140003de1
mov r12d, 0x6e5c
add rdx, 2
mov word [rdx - 2], r12w
nop dword [rax + rax]
lea r9d, [rcx - 1]
test ecx, ecx
jle 0x140003f6a
cmp rdx, r10
ja 0x140003f6a
movzx eax, word [r8]
mov ecx, r9d
add r8, 2
cmp ax, 0xd
je 0x140003e58
jbe 0x1400039c8
cmp ax, 0x22
je 0x140003e40
cmp ax, 0x5c
jne 0x140003dd2
mov r9d, 0x5c5c
add rdx, 2
mov word [rdx - 2], r9w
jmp 0x1400039f0
mov rax, rcx
shr rax, 0x10
je 0x140003b40
mov rdx, 0xffffffffffffffff
call qword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov r8d, eax
lea rax, str._invalid_
test r8d, r8d
jne 0x140003b4f
movzx eax, word [r12]
test ax, ax
je 0x140003fe8
xor edx, edx
nop dword [rax]
mov ecx, edx
add rdx, 1
cmp word [r12 + rdx*2], 0
jne 0x140003a88
mov edx, 0x224c
mov r8, r12
lea r11, str.0123456789abcdefwrite_freedesktop_mime_type_entry
mov word [rsp + 0x480], dx
lea r10, [rsp + 0x5a2]
lea rdx, [rsp + 0x482]
jmp 0x140003b04
cmp ax, 9
je 0x140003bd0
cmp ax, 0xa
jne 0x140003bf1
mov eax, 0x6e5c
add rdx, 2
mov word [rdx - 2], ax
nop dword [rax]
lea r9d, [rcx - 1]
test ecx, ecx
jle 0x140003e70
cmp rdx, r10
ja 0x140003e70
movzx eax, word [r8]
mov ecx, r9d
add r8, 2
cmp ax, 0xd
je 0x140003bb8
jbe 0x140003ac0
cmp ax, 0x22
je 0x140003c50
cmp ax, 0x5c
jne 0x140003be2
mov r14d, 0x5c5c
add rdx, 2
mov word [rdx - 2], r14w
jmp 0x140003ae8
movzx edx, cx
lea rcx, str._04x
call sym.wine_dbg_sprintf.constprop.0
mov qword [rsp + 0x20], rax
lea r9, [0x140011591]
lea r8, str.get_link_location
mov ecx, 3
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x1400037a4
movzx edx, r13w
lea rcx, str._04x
call sym.wine_dbg_sprintf.constprop.0
mov qword [rsp + 0x20], rax
lea r9, [0x140011591]
lea r8, str.get_link_location
mov ecx, 3
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x1400037db
mov eax, 0x725c
add rdx, 2
mov word [rdx - 2], ax
jmp 0x140003ae8
mov eax, 0x745c
add rdx, 2
mov word [rdx - 2], ax
jmp 0x140003ae8
lea r9d, [rax - 0x20]
cmp r9w, 0x5e
jbe 0x140003f9f
mov r9d, eax
mov byte [rdx], 0x5c
add rdx, 5
shr r9w, 0xc
and r9d, 0xf
movzx r9d, byte [r11 + r9]
mov byte [rdx - 4], r9b
mov r9d, eax
shr r9w, 8
and r9d, 0xf
movzx r9d, byte [r11 + r9]
mov byte [rdx - 3], r9b
mov r9d, eax
and eax, 0xf
shr r9w, 4
movzx eax, byte [r11 + rax]
and r9d, 0xf
movzx r9d, byte [r11 + r9]
mov byte [rdx - 1], al
mov byte [rdx - 2], r9b
jmp 0x140003ae8
mov r15d, 0x225c
add rdx, 2
mov word [rdx - 2], r15w
jmp 0x140003ae8
mov rax, r14
shr rax, 0x10
je 0x14000400e
mov rdx, 0xffffffffffffffff
mov rcx, r14
call qword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov r8d, eax
lea rax, str._invalid_
test r8d, r8d
jne 0x140003d91
movzx eax, word [rsp + 0x60]
test ax, ax
je 0x140003fc0
xor edx, edx
nop dword [rax + rax]
mov ecx, edx
add rdx, 1
cmp word [r14 + rdx*2], 0
jne 0x140003cb0
mov r9d, 0x224c
lea rdx, [rsp + 0x482]
mov r8, r14
mov word [rsp + 0x480], r9w
lea r11, str.0123456789abcdefwrite_freedesktop_mime_type_entry
lea r10, [rsp + 0x5a2]
jmp 0x140003d2c
cmp ax, 9
je 0x140003ec0
cmp ax, 0xa
jne 0x140003ee3
mov r15d, 0x6e5c
add rdx, 2
mov word [rdx - 2], r15w
nop dword [rax + rax]
lea r9d, [rcx - 1]
test ecx, ecx
jle 0x140003d5f
cmp rdx, r10
ja 0x140003d5f
movzx eax, word [r8]
mov ecx, r9d
add r8, 2
cmp ax, 0xd
je 0x140003f40
jbe 0x140003cf0
cmp ax, 0x22
je 0x140003f58
cmp ax, 0x5c
jne 0x140003ed4
mov ebx, 0x5c5c
add rdx, 2
mov word [rdx - 2], bx
jmp 0x140003d18
mov byte [rdx], 0x22
test r9d, r9d
jle 0x140003fdf
mov r11d, 0x2e2e
mov byte [rdx + 3], 0x2e
lea rax, [rdx + 4]
mov word [rdx + 1], r11w
mov byte [rax], 0
lea r15, [rsp + 0x480]
mov rcx, r15
call dbg.__wine_dbg_strdup
mov qword [rsp + 0x20], rax
lea r9, [0x140011591]
lea r8, str.get_link_location
mov ecx, 3
lea rdx, [0x140010000]
call sym.wine_dbg_log.constprop.0
jmp 0x140003817
mov esi, 0x745c
add rdx, 2
mov word [rdx - 2], si
jmp 0x1400039f0
lea r9d, [rax - 0x20]
cmp r9w, 0x5e
jbe 0x140003faa
mov r9d, eax
mov byte [rdx], 0x5c
add rdx, 5
shr r9w, 0xc
and r9d, 0xf
movzx r9d, byte [r11 + r9]
mov byte [rdx - 4], r9b
mov r9d, eax
shr r9w, 8
and r9d, 0xf
movzx r9d, byte [r11 + r9]
mov byte [rdx - 3], r9b
mov r9d, eax
and eax, 0xf
shr r9w, 4
movzx eax, byte [r11 + rax]
and r9d, 0xf
movzx r9d, byte [r11 + r9]
mov byte [rdx - 1], al
mov byte [rdx - 2], r9b
jmp 0x1400039f0
mov ebx, 0x225c
add rdx, 2
mov word [rdx - 2], bx
jmp 0x1400039f0
mov edi, 0x725c
add rdx, 2
mov word [rdx - 2], di
jmp 0x1400039f0
mov byte [rdx], 0x22
test r9d, r9d
jle 0x140004005
mov r13d, 0x2e2e
mov byte [rdx + 3], 0x2e
lea rax, [rdx + 4]
mov word [rdx + 1], r13w
mov byte [rax], 0
lea r15, [rsp + 0x480]
mov rcx, r15
call dbg.__wine_dbg_strdup
jmp 0x140003b4f
xor edx, edx
xor eax, eax
jmp 0x14000388e
mov r12d, 0x745c
add rdx, 2
mov word [rdx - 2], r12w
jmp 0x140003d18
lea r9d, [rax - 0x20]
cmp r9w, 0x5e
jbe 0x140003fb5
mov r9d, eax
mov byte [rdx], 0x5c
add rdx, 5
shr r9w, 0xc
and r9d, 0xf
movzx r9d, byte [r11 + r9]
mov byte [rdx - 4], r9b
mov r9d, eax
shr r9w, 8
and r9d, 0xf
movzx r9d, byte [r11 + r9]
mov byte [rdx - 3], r9b
mov r9d, eax
and eax, 0xf
shr r9w, 4
movzx eax, byte [r11 + rax]
and r9d, 0xf
movzx r9d, byte [r11 + r9]
mov byte [rdx - 1], al
mov byte [rdx - 2], r9b
jmp 0x140003d18
mov r13d, 0x725c
add rdx, 2
mov word [rdx - 2], r13w
jmp 0x140003d18
mov edi, 0x225c
add rdx, 2
mov word [rdx - 2], di
jmp 0x140003d18
mov byte [rdx], 0x22
test r9d, r9d
jle 0x140004040
mov ecx, 0x2e2e
mov byte [rdx + 3], 0x2e
lea rax, [rdx + 4]
mov word [rdx + 1], cx
mov byte [rax], 0
lea r15, [rsp + 0x480]
mov rcx, r15
call dbg.__wine_dbg_strdup
jmp 0x140003b88
mov byte [rdx], al
add rdx, 1
jmp 0x140003ae8
mov byte [rdx], al
add rdx, 1
jmp 0x1400039f0
mov byte [rdx], al
add rdx, 1
jmp 0x140003d18
mov r10d, 0x224c
mov byte [rsp + 0x482], 0x22
lea rdx, [rsp + 0x482]
mov word [rsp + 0x480], r10w
lea rax, [rdx + 1]
jmp 0x140003d7e
mov eax, 0x224c
mov byte [rsp + 0x482], 0x22
lea rdx, [rsp + 0x482]
mov word [rsp + 0x480], ax
lea rax, [rdx + 1]
jmp 0x140003e8f
movzx edx, r14w
lea rcx, str._04x
call sym.wine_dbg_sprintf.constprop.0
jmp 0x140003d91
mov ecx, 0x224c
mov byte [rsp + 0x482], 0x22
lea rdx, [rsp + 0x482]
mov word [rsp + 0x480], cx
lea rax, [rdx + 1]
jmp 0x140003f87
mov ecx, 2
jmp 0x1400038e9