Function at 0x140006508
Capabilities:
Get common file path

Disassembly:
mov r11, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x3b0
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [r11 + 0x18], rbx
mov rax, qword [0x14002d148]
xor rax, rsp
mov qword [rsp + 0x3a0], rax
mov r13, rdx
mov rdi, rcx
lea rcx, [r11 - 0x158]
mov rax, qword [0x140002940]
mov qword [rcx], rax
mov rax, qword [0x140002948]
mov qword [rcx + 8], rax
mov rax, qword [0x140002950]
mov qword [rcx + 0x10], rax
mov eax, dword [0x140002958]
mov dword [rcx + 0x18], eax
movzx eax, word [0x14000295c]
mov word [rcx + 0x1c], ax
mov al, byte [0x14000295e]
mov byte [rcx + 0x1e], al
xor edx, edx
mov r8d, 0xe5
lea rcx, [r11 - 0x139]
call sub.msvcrt.dll_memset
xor r14d, r14d
mov byte [rsp + 0x70], r14b
mov ebx, 0x103
mov r8, rbx
xor edx, edx
lea rcx, [rsp + 0x71]
call sub.msvcrt.dll_memset
mov byte [rsp + 0x180], r14b
mov r8, rbx
xor edx, edx
lea rcx, [rsp + 0x181]
call sub.msvcrt.dll_memset
lea r11, [rsp + 0x180]
mov qword [rsp + 0x28], r11
lea rax, [rsp + 0x290]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea r15d, [r14 + 0x1c]
mov edx, r15d
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirA]
cmp eax, r14d
jge 0x140006619
lea rdx, [rsp + 0x180]
lea rcx, [rsp + 0x290]
call fcn.140006464
cmp eax, r14d
jl 0x140006aec
lea rcx, [rsp + 0x180]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
cmp rax, r14
jne 0x14000663f
mov eax, 0x800700ce
jmp 0x140006aec
mov ebx, 0x104
mov rdx, rbx
lea rsi, [rdi + 0x34]
mov rcx, rsi
mov r8d, r14d
lea r9, [rsp + 0x180]
sub r9, rsi
mov ebp, 1
lea rax, [rdx + 0x7ffffefa]
cmp rax, r14
je 0x140006680
mov al, byte [r9 + rcx]
cmp al, r14b
je 0x140006680
mov byte [rcx], al
add rcx, rbp
sub rdx, rbp
jne 0x140006661
mov r12d, 0x8007007a
cmp rdx, r14
jne 0x140006691
sub rcx, rbp
mov r8d, r12d
mov byte [rcx], r14b
cmp r8d, r14d
jge 0x1400066a1
mov eax, r8d
jmp 0x140006aec
lea rdx, str.inkStore.mdb
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
cmp eax, r14d
jne 0x1400066c0
mov eax, 0x800700ce
jmp 0x140006aec
lea r9, [rdi + 0x138]
mov rcx, r9
mov edx, r14d
lea r8, [rsp + 0x180]
sub r8, r9
lea rax, [rbx + 0x7ffffefa]
cmp rax, r14
je 0x1400066f7
mov al, byte [r8 + rcx]
cmp al, r14b
je 0x1400066f7
mov byte [rcx], al
add rcx, rbp
sub rbx, rbp
jne 0x1400066d8
cmp rbx, r14
jne 0x140006702
sub rcx, rbp
mov edx, r12d
mov byte [rcx], r14b
cmp edx, r14d
jge 0x140006711
mov eax, edx
jmp 0x140006aec
lea rdx, str.inkStore.mdb.converted
mov rcx, r9
call qword [sym.imp.SHLWAPI.dll_PathAppendA]
cmp eax, r14d
jne 0x140006730
mov eax, 0x800700ce
jmp 0x140006aec
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x290]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, r15d
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirA]
cmp eax, r14d
jge 0x14000676f
lea rdx, [rsp + 0x70]
lea rcx, [rsp + 0x290]
call fcn.140006464
cmp eax, r14d
jl 0x140006aec
lea rcx, [rsp + 0x70]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
cmp rax, r14
jne 0x140006792
mov eax, 0x800700ce
jmp 0x140006aec
lea rdx, [0x140002960]
mov rcx, rdi
call sub.ESENT.dll_JetCreateInstanceA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
mov qword [rsp + 0x20], r14
mov r9, rbp
xor edx, edx
lea r8d, [rdx + 0x11]
mov rcx, rdi
call sub.ESENT.dll_JetSetSystemParameterA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call sub.ESENT.dll_JetSetSystemParameterA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8d, ebp
xor edx, edx
mov rcx, rdi
call sub.ESENT.dll_JetSetSystemParameterA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 2]
mov rcx, rdi
call sub.ESENT.dll_JetSetSystemParameterA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
mov rcx, rdi
call sub.ESENT.dll_JetInit
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
lea r9, [0x14002e149]
lea r8, [0x14002e148]
lea rdx, [rdi + 8]
mov rcx, qword [rdi]
call sub.ESENT.dll_JetBeginSessionA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
xor r8d, r8d
mov rdx, rsi
mov rcx, qword [rdi + 8]
call sub.ESENT.dll_JetAttachDatabaseA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
mov dword [rsp + 0x20], r14d
lea r9, [rdi + 0x10]
lea r8, [0x140002788]
mov rdx, rsi
mov rcx, qword [rdi + 8]
call sub.ESENT.dll_JetOpenDatabaseA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
lea rbp, [rdi + 0x18]
mov qword [rsp + 0x30], rbp
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r14d
xor r9d, r9d
lea r8, [0x14002d320]
mov edx, dword [rdi + 0x10]
mov rcx, qword [rdi + 8]
call sub.ESENT.dll_JetOpenTableA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r15d
lea r9, [rsp + 0x40]
lea r8, [0x14002d324]
mov rdx, qword [rbp]
mov rcx, qword [rdi + 8]
call sub.ESENT.dll_JetGetTableColumnInfoA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
mov eax, dword [rsp + 0x44]
mov dword [rdi + 0x20], eax
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r15d
lea r9, [rsp + 0x40]
lea r8, str.CollectionDate
mov rdx, qword [rbp]
mov rcx, qword [rdi + 8]
call sub.ESENT.dll_JetGetTableColumnInfoA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
mov eax, dword [rsp + 0x44]
mov dword [rdi + 0x24], eax
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r15d
lea r9, [rsp + 0x40]
lea r8, str.CollectionLang
mov rdx, qword [rbp]
mov rcx, qword [rdi + 8]
call sub.ESENT.dll_JetGetTableColumnInfoA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
mov eax, dword [rsp + 0x44]
mov dword [rdi + 0x28], eax
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r15d
lea r9, [rsp + 0x40]
lea r8, str.InkType
mov rdx, qword [rbp]
mov rcx, qword [rdi + 8]
call sub.ESENT.dll_JetGetTableColumnInfoA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
mov eax, dword [rsp + 0x44]
mov dword [rdi + 0x2c], eax
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], r15d
lea r9, [rsp + 0x40]
lea r8, str.InkData
mov rdx, qword [rbp]
mov rcx, qword [rdi + 8]
call sub.ESENT.dll_JetGetTableColumnInfoA
mov r11d, eax
cmp eax, r14d
jl 0x140006a02
mov eax, dword [rsp + 0x44]
mov dword [rdi + 0x30], eax
cmp r11d, r14d
jne 0x140006a02
xor eax, eax
jmp 0x140006aec
cmp r11d, 0xfffffb49
je 0x140006a2a
cmp r11d, 0xfffffb4e
je 0x140006a2a
cmp r11d, 0xfffffbf8
je 0x140006a2a
cmp r11d, 0xfffffdda
jne 0x140006adf
cmp r13, r14
je 0x140006adf
cmp rsi, r14
je 0x140006ab0
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
or r12d, 0xffffffff
mov r9d, r12d
mov r8, rsi
xor edx, edx
lea r15d, [r12 + 4]
mov ecx, r15d
call qword [sym.imp.API_MS_Win_Core_String_L1_1_0.dll_MultiByteToWideChar]
mov ebp, eax
lea edx, [rax - 1]
xor ecx, ecx
call qword [sym.imp.OLEAUT32.dll_SysReAllocStringLen]
mov rbx, rax
cmp rax, r14
je 0x140006a9b
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], rax
mov r9d, r12d
mov r8, rsi
xor edx, edx
mov ecx, r15d
call qword [sym.imp.API_MS_Win_Core_String_L1_1_0.dll_MultiByteToWideChar]
cmp eax, ebp
je 0x140006a9b
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rbx, r14
mov qword [rsp + 0x60], rbx
cmp rbx, r14
jne 0x140006ab8
mov ecx, 0x8007000e
call fcn.1400057b8
int3
mov rbx, r14
mov qword [rsp + 0x60], rbx
mov rax, qword [r13]
mov qword [rsp + 0x20], r14
mov r9, rbx
mov edx, 0x8000006c
mov r8d, 4
mov rcx, r13
call qword [rax + 0x18]
nop
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov rcx, rdi
call fcn.140006b20
mov eax, 0x80004005
mov rcx, qword [rsp + 0x3a0]
xor rcx, rsp
call fcn.140022620
mov rbx, qword [rsp + 0x400]
add rsp, 0x3b0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret