Function at 0x180009920
Capabilities:
Get common file path
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov rax, qword [0x1800c6d00]
xor rax, rsp
mov qword [rbp + 0x380], rax
movsd xmm0, qword [str.twain_ds]
mov rdi, rcx
movzx eax, byte [0x1800a7228]
lea rcx, [rbp + 0x99]
xor edx, edx
movsd qword [rbp + 0x90], xmm0
mov r8d, 0xfb
mov byte [rbp + 0x98], al
call fcn.1800a24f0
xor edx, edx
mov byte [rbp + 0x270], 0
mov r8d, 0x103
lea rcx, [rbp + 0x271]
call fcn.1800a24f0
call fcn.180005d70
mov rcx, rax
lea r8, [rbp + 0x60]
mov r9d, 0x28
mov edx, 0x1c37
call qword [sym.imp.USER32.dll_LoadStringA]
call fcn.180005d70
mov rcx, rax
lea r8, [rbp + 0x20]
mov r9d, 0x2a
mov edx, 0x1c38
call qword [sym.imp.USER32.dll_LoadStringA]
mov rbx, 0xffffffffffffffff
lea rax, [rbp + 0x20]
mov rcx, rbx
cmp byte [rax + rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1800099e2
movups xmm0, xmmword [str.__.TREE_]
movzx eax, word [0x1800a7218]
lea rdx, [rbp + 0x270]
movups xmmword [rbp + rcx + 0x20], xmm0
mov word [rbp + rcx + 0x30], ax
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
xorps xmm0, xmm0
lea rcx, [rsp + 0x70]
xor eax, eax
mov qword [rbp], rax
lea rax, [rbp + 0x20]
movups xmmword [rbp - 0x30], xmm0
mov dword [rbp - 0x30], 0x80880a
movups xmmword [rbp - 0x60], xmm0
mov dword [rbp - 0x58], 0x104
movups xmmword [rsp + 0x70], xmm0
mov qword [rsp + 0x78], rdi
xor edi, edi
movups xmmword [rbp - 0x40], xmm0
mov dword [rsp + 0x70], 0x98
movups xmmword [rbp - 0x70], xmm0
mov qword [rbp - 0x70], rdi
movups xmmword [rbp - 0x50], xmm0
mov dword [rbp - 0x64], edi
movups xmmword [rbp - 0x80], xmm0
mov qword [rbp - 0x78], rax
lea rax, str.TREE
mov qword [rbp - 0x28], rax
lea rax, [rbp + 0x90]
mov qword [rbp - 0x60], rax
lea rax, [rbp + 0x60]
mov qword [rbp - 0x38], rax
lea rax, [rbp + 0x270]
mov qword [rbp - 0x40], rax
movups xmmword [rbp - 0x20], xmm0
mov qword [rbp - 0x50], rdi
movups xmmword [rbp - 0x10], xmm0
mov dword [rbp - 0x48], edi
call qword [sym.imp.COMDLG32.dll_GetSaveFileNameA]
test eax, eax
je 0x180009c11
mov qword [rsp + 0x30], rdi
lea rcx, [rbp + 0x90]
mov dword [rsp + 0x28], 0x8000080
xor r9d, r9d
mov edx, 0xc0000000
mov dword [rsp + 0x20], 2
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [rsp + 0x58], rax
cmp rax, rbx
je 0x180009c11
lea r8, [0x18000aef0]
mov dword [rsp + 0x60], edi
xor edx, edx
lea rcx, [rsp + 0x58]
call fcn.18002a410
mov rax, qword [case.0x180030475.0]
test rax, rax
je 0x180009b25
lea r8, [0x18000aef0]
xor edx, edx
lea rcx, [rsp + 0x58]
call rax
mov rax, qword [0x1800c5500]
test rax, rax
je 0x180009b41
lea r8, [0x18000aef0]
xor edx, edx
lea rcx, [rsp + 0x58]
call rax
lea rcx, [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx ecx, word [rbp + 0x1a]
movzx edx, word [rbp + 0x18]
movzx r8d, word [rbp + 0x10]
movzx eax, word [rbp + 0x1c]
movzx r10d, word [rbp + 0x12]
movzx r9d, word [rbp + 0x16]
mov dword [rsp + 0x40], eax
mov dword [rsp + 0x38], ecx
lea rcx, [rbp + 0x1a0]
mov dword [rsp + 0x30], edx
mov edx, 0xc8
mov dword [rsp + 0x28], r8d
lea r8, str.Diagnose_made__u._u._u__02u:_02u:_02u.
mov dword [rsp + 0x20], r10d
call fcn.180004550
movzx eax, word [0x1800a71fc]
mov r8, rbx
mov word [rsp + 0x50], ax
movzx eax, byte [0x1800a71fe]
mov byte [rsp + 0x52], al
lea rax, [rbp + 0x1a0]
inc r8
cmp byte [rax + r8], dil
jne 0x180009bb5
mov rcx, qword [rsp + 0x58]
lea r9, [rsp + 0x54]
lea rdx, [rbp + 0x1a0]
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
lea rax, [rsp + 0x50]
nop
inc rbx
cmp byte [rax + rbx], dil
jne 0x180009be0
mov rcx, qword [rsp + 0x58]
lea r9, [rsp + 0x54]
mov r8, rbx
mov qword [rsp + 0x20], rdi
lea rdx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.180032180
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret