Function at 0x140046bd8
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x5a8]
sub rsp, 0x6a8
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov rax, qword [0x1400a48d0]
xor rax, rsp
mov qword [rbp + 0x590], rax
mov r14, r9
mov r13d, r8d
mov rsi, rdx
mov r12, rcx
mov rax, qword [rbp + 0x610]
mov qword [rsp + 0x50], rax
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo]
nop dword [rax + rax]
nop
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x380]
call sub.msvcrt.dll_memset
mov edi, 1
lea rcx, [rsp + 0x48]
call qword [sym.imp.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo]
nop dword [rax + rax]
nop
lea rcx, [rsp + 0x58]
call qword [sym.imp.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo]
nop dword [rax + rax]
nop
xor r15d, r15d
mov rcx, qword [rsi + 0x18]
test rcx, rcx
jle 0x140046d48
xor eax, eax
cmp rax, rcx
jge 0x140046c9f
mov rbx, qword [rsi + 8]
test rax, rax
je 0x140046ca1
sub rax, 1
mov rbx, qword [rbx]
jne 0x140046c94
jmp 0x140046ca1
xor ebx, ebx
lea rdx, [rbx + 0x10]
lea rcx, [rsp + 0x60]
call qword [sym.imp.MFC42u.dll_CControlBar::CControlBar]
nop dword [rax + rax]
nop
lea rdx, [rbx + 0x18]
lea rcx, [rsp + 0x68]
call qword [sym.imp.MFC42u.dll_CControlBar::CControlBar]
nop dword [rax + rax]
nop
lea rdx, [rbx + 0x20]
lea rcx, [rsp + 0x70]
call qword [sym.imp.MFC42u.dll_CControlBar::CControlBar]
nop dword [rax + rax]
mov rax, qword [rbx + 0x28]
mov qword [rsp + 0x78], rax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_Ordinal_1284]
nop dword [rax + rax]
nop
lea rcx, [rsp + 0x70]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop dword [rax + rax]
lea rcx, [rsp + 0x68]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop dword [rax + rax]
lea rcx, [rsp + 0x60]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop dword [rax + rax]
inc r15d
mov rcx, qword [rsi + 0x18]
mov eax, r15d
cmp rax, rcx
jl 0x140046c8b
lea rdx, [0x14008a14c]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_Ordinal_1287]
nop dword [rax + rax]
mov rax, qword [rsp + 0x40]
mov edx, dword [rax - 8]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDatabase::GetConnectInfo]
nop dword [rax + rax]
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
xor edx, edx
lea rcx, [rbp - 0x70]
call qword [sym.imp.MFC42u.dll_CGopherConnection::CGopherConnection]
nop dword [rax + rax]
nop
lea rax, [rbp + 0x380]
mov qword [rsp + 0x28], rax
lea rax, str.Scanned_Documents
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 5]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirW]
nop dword [rax + rax]
lea rcx, [rbp + 0x380]
test eax, eax
cmovne rcx, qword [rbp + 0xa0]
mov qword [rbp + 0xa0], rcx
lea eax, [r13 + 1]
mov dword [rbp + 0x7c], eax
mov r15, qword [rsp + 0x50]
lea rcx, [rbp - 0x70]
call qword [sym.imp.MFC42u.dll_CPageSetupDialog::DoModal]
nop dword [rax + rax]
cmp rax, 1
jne 0x140046e9c
mov r9d, dword [rbp + 0x7c]
dec r9d
mov dword [r15], r9d
mov qword [rsp + 0x20], r14
mov r8, rsi
lea rdx, [rbp - 0x70]
call fcn.140046fac
mov ebx, eax
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop dword [rax + rax]
cmp eax, 0xffffffff
jne 0x140046e67
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
lea ecx, [rax - 2]
cmp ecx, 1
jbe 0x140046ea1
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
jmp 0x140046e69
xor ecx, ecx
test ecx, ecx
jne 0x140046ea1
mov r8, qword [r14]
mov edx, 0x6217
lea rcx, [rsp + 0x48]
call qword [sym.imp.MFC42u.dll_CObList::FreeNode]
nop dword [rax + rax]
mov edx, 0x34
mov rcx, qword [rsp + 0x48]
call fcn.1400172c8
cmp eax, 6
jne 0x140046ea3
jmp 0x140046ea1
mov ebx, 9
xor edi, edi
test edi, edi
jne 0x140046df8
lea rcx, [rbp + 0xe0]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop dword [rax + rax]
lea rcx, [rbp - 0x70]
call qword [sym.imp.MFC42u.dll_COleVariant::operator]
nop dword [rax + rax]
nop
lea rcx, [rsp + 0x58]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop dword [rax + rax]
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop dword [rax + rax]
nop
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rbp + 0x590]
xor rcx, rsp
call fcn.14006e550
add rsp, 0x6a8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret