Function at 0x14001a470
Capabilities:
Get common file path
Get graphical window text
Set current directory
Write file on windows

Disassembly:
mov qword [rsp + 0x20], r9
mov word [rsp + 0x18], r8w
mov word [rsp + 0x10], dx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x6a0
mov rax, qword [0x1408fa960]
xor rax, rsp
mov qword [rsp + 0x690], rax
lea rax, [rsp + 0x270]
mov rdi, rax
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
lea rdx, [rsp + 0x270]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea rax, [rsp + 0x480]
mov rdi, rax
xor eax, eax
mov ecx, 0x208
rep stosb byte [rdi], al
mov r8d, MsiVerifyPackageW
xor edx, edx
lea rcx, [rsp + 0x130]
call fcn.140223e30
mov dword [rsp + 0x130], MsiVerifyPackageW
mov rax, qword [rsp + 0x6b0]
mov rax, qword [rax + 8]
mov qword [rsp + 0x138], rax
lea rax, str.Rich_Text_Files__.rtf_
mov qword [rsp + 0x148], rax
mov dword [rsp + 0x190], 0x80002
lea rax, [rsp + 0x480]
mov qword [rsp + 0x160], rax
lea rax, str..rtf
mov qword [rsp + 0x198], rax
mov dword [rsp + 0x168], 0x104
mov qword [rsp + 0x48], 0
lea rcx, [rsp + 0x130]
call qword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
test eax, eax
je 0x14001a8a4
mov rdx, qword [rsp + 0x160]
lea rcx, [rsp + 0x1d0]
call fcn.1400179b0
nop
lea rcx, [rsp + 0x1f0]
call fcn.14000a280
nop
cmp dword [rsp + 0x15c], 1
jne 0x14001a5b5
lea rdx, [0x1402ee098]
lea rcx, [rsp + 0x1f0]
call fcn.140015550
jmp 0x14001a5d3
cmp dword [rsp + 0x15c], 2
jb 0x14001a5d3
lea rdx, [0x1402ee0a0]
lea rcx, [rsp + 0x1f0]
call fcn.140015550
lea rcx, [rsp + 0x1f0]
call fcn.1400165c0
movzx eax, al
test eax, eax
jne 0x14001a6cb
movzx eax, word [rsp + 0x196]
mov qword [rsp + 0x78], rax
lea rcx, [rsp + 0x1d0]
call fcn.140016630
mov rcx, qword [rsp + 0x78]
cmp rcx, rax
jne 0x14001a668
lea r8, [rsp + 0x1f0]
lea rdx, [0x1402edafc]
lea rcx, [rsp + 0x230]
call fcn.14001b910
mov qword [rsp + 0x80], rax
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x88], rax
mov rdx, qword [rsp + 0x88]
lea rcx, [rsp + 0x1d0]
call fcn.14001efa0
nop
lea rcx, [rsp + 0x230]
call fcn.14000a800
jmp 0x14001a6cb
movzx eax, word [rsp + 0x196]
test eax, eax
jne 0x14001a6cb
lea rcx, [rsp + 0x1d0]
call fcn.140016630
dec rax
lea r9, [0x1402edb24]
xor r8d, r8d
mov rdx, rax
lea rcx, [rsp + 0x1d0]
call fcn.140020450
test eax, eax
je 0x14001a6b6
lea rdx, [0x1402edb54]
lea rcx, [rsp + 0x1d0]
call fcn.14001efd0
lea rdx, [rsp + 0x1f0]
lea rcx, [rsp + 0x1d0]
call fcn.14001efa0
lea rcx, [rsp + 0x1d0]
call fcn.14000c690
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], MsiSetFeatureStateW
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0xffffffffffffffff
je 0x14001a71e
cmp qword [rsp + 0x48], 0
jne 0x14001a887
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x60], eax
cmp dword [rsp + 0x60], 0
je 0x14001a887
lea rcx, [rsp + 0x210]
call fcn.14000a280
nop
mov edx, dword [rsp + 0x60]
lea rcx, [rsp + 0x250]
call fcn.1400f1950
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x98], rax
mov rcx, qword [rsp + 0x98]
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0x110]
call fcn.14001e490
lea rcx, [rsp + 0x1d0]
call fcn.14000c690
mov rdx, rax
lea rcx, [rsp + 0x120]
call fcn.14001e490
lea r9, [rsp + 0x110]
lea r8, [rsp + 0x120]
lea rdx, str.Unable_to_create_file__S_:__S
lea rcx, [rsp + 0x210]
call fcn.14001d950
nop
lea rcx, [rsp + 0x250]
call fcn.14000a800
mov rax, qword [rsp + 0x6b0]
mov rax, qword [rax + 0x60]
mov qword [rsp + 0xa0], rax
mov eax, 0x7d4
mov word [rsp + 0x50], ax
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0xa8]
mov rcx, qword [rsp + 0xa0]
call fcn.140020650
mov rax, qword [rsp + 0x6b0]
add rax, 8
mov qword [rsp + 0xc0], rax
lea rcx, [rsp + 0xa8]
call fcn.14001e9f0
add rax, 8
mov rcx, rax
call fcn.14000c690
mov qword [rsp + 0xb0], rax
lea rcx, [rsp + 0x210]
call fcn.14000c690
mov qword [rsp + 0xb8], rax
xor r9d, r9d
mov r8, qword [rsp + 0xb0]
mov rdx, qword [rsp + 0xb8]
mov rcx, qword [rsp + 0xc0]
call fcn.140015900
nop
lea rcx, [rsp + 0x210]
call fcn.14000a800
nop
lea rcx, [rsp + 0x1f0]
call fcn.14000a800
nop
lea rcx, [rsp + 0x1d0]
call fcn.14000a800
jmp 0x14001a8b0
call qword [sym.imp.COMDLG32.dll_CommDlgExtendedError]
test eax, eax
jne 0x14001a8b0
jmp 0x14001a8c8
cmp qword [rsp + 0x48], 0
je 0x14001a55b
cmp qword [rsp + 0x48], 0xffffffffffffffff
je 0x14001a55b
cmp qword [rsp + 0x48], 0
je 0x14001aa91
cmp qword [rsp + 0x48], 0xffffffffffffffff
je 0x14001aa91
mov rax, qword [rsp + 0x6b0]
add rax, 8
mov qword [rsp + 0xc8], rax
mov r8d, 0x3f5
lea rdx, [rsp + 0x108]
mov rcx, qword [rsp + 0xc8]
call fcn.140015830
mov rcx, rax
call fcn.140009d90
mov qword [rsp + 0x68], rax
cmp dword [rsp + 0x15c], 1
jne 0x14001a96f
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0xf0], rax
mov dword [rsp + 0xf8], 0
lea rax, [0x14001b610]
mov qword [rsp + 0xfc], rax
lea r9, [rsp + 0xf0]
mov r8d, reloc.msi.dll_MsiDatabaseExportW
mov edx, 0x44a
mov rcx, qword [rsp + 0x68]
call fcn.140015a10
jmp 0x14001aa86
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.USER32.dll_GetWindowTextLengthW]
inc eax
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x58], 0
mov dword [rsp + 0x54], 0
cmp dword [rsp + 0x15c], 2
jne 0x14001a9dc
movsxd rax, dword [rsp + 0x40]
mov rcx, rax
call fcn.140222dcc
mov qword [rsp + 0xd0], rax
mov rax, qword [rsp + 0xd0]
mov qword [rsp + 0x58], rax
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.USER32.dll_GetWindowTextA]
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x54], eax
jmp 0x14001aa41
movsxd rax, dword [rsp + 0x40]
mov qword [rsp + 0xd8], rax
mov eax, 2
mov rcx, qword [rsp + 0xd8]
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.140222dcc
mov qword [rsp + 0xe0], rax
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x58], rax
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.USER32.dll_GetWindowTextW]
mov eax, dword [rsp + 0x40]
shl rax, 1
mov dword [rsp + 0x54], eax
mov dword [rsp + 0x70], 0
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x70]
mov r8d, dword [rsp + 0x54]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0xe8], rax
mov rcx, qword [rsp + 0xe8]
call fcn.140222778
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x270]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor eax, eax
mov rcx, qword [rsp + 0x690]
xor rcx, rsp
call fcn.140222a60
add rsp, 0x6a0
pop rdi
ret