Function at 0x140042fd0
Capabilities:
Copy file
Get common file path
Query environment variable

Disassembly:
push rbp
push rbx
push rsi
push rdi
lea rbp, [rsp - 0x7c8]
sub rsp, 0x8c8
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov rax, qword [0x1400a48d0]
xor rax, rsp
mov qword [rbp + 0x7b0], rax
mov rsi, rcx
mov r11, qword [rbp + 0x810]
mov r10, qword [rbp + 0x818]
mov rax, qword [rbp + 0x828]
mov qword [rsp + 0x38], rax
mov eax, dword [rbp + 0x820]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r10
mov qword [rsp + 0x20], r11
call qword [sym.imp.MFC42u.dll_CListCtrl::CreateDragImage]
nop dword [rax + rax]
mov ebx, eax
cmp qword [rsi + 0xf8], 0
jne 0x1400433e5
test eax, eax
je 0x1400433e5
lea rax, [rbp + reloc.MFC42u.dll_CMapStringToPtr::operator__]
mov qword [rsp + 0x28], rax
lea rdi, str.Scanned_Documents
mov qword [rsp + 0x20], rdi
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 5]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirW]
nop dword [rax + rax]
mov ebx, 0x104
test eax, eax
jns 0x140043323
lea rax, [rbp + reloc.MFC42u.dll_CMapStringToPtr::operator__]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
xor r9d, r9d
xor r8d, r8d
mov edx, 0x8005
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathAndSubDirW]
nop dword [rax + rax]
test eax, eax
js 0x140043403
lea r8, [rbp + reloc.MFC42u.dll_CMapStringToPtr::operator__]
mov edx, ebx
lea rcx, [rbp + 0x180]
call qword [sym.imp.msvcrt.dll_wcscpy_s]
nop dword [rax + rax]
lea r8, str.Documents
mov edx, ebx
lea rcx, [rbp + 0x180]
call qword [sym.imp.msvcrt.dll_wcscat_s]
nop dword [rax + rax]
mov r8d, 0x4e79
lea rdx, str._SystemRoot__system32wfsr.dll
lea rcx, [rbp + reloc.MFC42u.dll_CMapStringToPtr::operator__]
call qword [sym.imp.SHELL32.dll_SHSetLocalizedName]
nop dword [rax + rax]
test eax, eax
js 0x140043403
lea rdx, [rbp + 0x180]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectory]
nop dword [rax + rax]
test eax, eax
jne 0x140043323
movaps xmm0, xmmword [str._PROGRAMDATA_MicrosoftWindows_NTMSScanWelcomeScan.jpg]
movaps xmmword [rsp + 0x70], xmm0
movaps xmm1, xmmword [0x140089fc0]
movaps xmmword [rbp - 0x80], xmm1
movaps xmm0, xmmword [0x140089fd0]
movaps xmmword [rbp - 0x70], xmm0
movaps xmm1, xmmword [0x140089fe0]
movaps xmmword [rbp - 0x60], xmm1
movaps xmm0, xmmword [0x140089ff0]
movaps xmmword [rbp - 0x50], xmm0
movaps xmm1, xmmword [0x14008a000]
movaps xmmword [rbp - 0x40], xmm1
movaps xmm0, xmmword [0x14008a010]
movaps xmmword [rbp - 0x30], xmm0
mov eax, dword [0x14008a020]
mov dword [rbp - 0x20], eax
xor edx, edx
mov r8d, CMiniFrameWnd::CMiniFrameWnd
lea rcx, [rbp - 0x1c]
call sub.msvcrt.dll_memset
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x5a0]
call sub.msvcrt.dll_memset
mov r8d, ebx
lea rdx, [rbp + 0x5a0]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
nop dword [rax + rax]
test eax, eax
je 0x140043323
lea r8, [rbp + reloc.MFC42u.dll_CMapStringToPtr::operator__]
mov edx, ebx
lea rcx, [rbp + 0x180]
call fcn.14000e8c4
test eax, eax
js 0x140043323
lea r8, [0x140084848]
mov edx, ebx
lea rcx, [rbp + 0x180]
call fcn.14000e950
test eax, eax
js 0x140043323
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo]
nop dword [rax + rax]
nop
mov edx, 0x6213
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_CPropertySheet::OnCtlColor]
nop dword [rax + rax]
mov r8, qword [rsp + 0x50]
test r8, r8
je 0x140043312
mov edx, ebx
lea rcx, [rbp + 0x180]
call fcn.14000e950
test eax, eax
js 0x140043312
lea r8, [0x14008a028]
mov edx, ebx
lea rcx, [rbp + 0x180]
call fcn.14000e950
test eax, eax
js 0x140043312
mov edi, 1
mov r8d, edi
lea rdx, [rbp + 0x180]
lea rcx, [rbp + 0x5a0]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
nop dword [rax + rax]
test eax, eax
je 0x140043312
lea rcx, [rsp + 0x48]
call qword [sym.imp.MFC42u.dll_CDaoIndexFieldInfo::CDaoIndexFieldInfo]
nop dword [rax + rax]
nop
mov edx, 0x6214
lea rcx, [rsp + 0x48]
call qword [sym.imp.MFC42u.dll_CPropertySheet::OnCtlColor]
nop dword [rax + rax]
cmp qword [rsp + 0x48], 0
je 0x140043300
lea rdx, [rsp + 0x48]
lea rcx, [rsp + 0x60]
call qword [sym.imp.MFC42u.dll_CControlBar::CControlBar]
nop dword [rax + rax]
mov r8d, edi
mov rdx, rax
lea rcx, [rbp + 0x180]
call fcn.14004de70
nop
lea rcx, [rsp + 0x48]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop dword [rax + rax]
nop
lea rcx, [rsp + 0x50]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop dword [rax + rax]
lea rdx, [rbp + reloc.MFC42u.dll_CMapStringToPtr::operator__]
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDaoException::CDaoException]
nop dword [rax + rax]
nop
mov edx, 0x5c
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CReBar::GetMessageMap]
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 r8, rax
mov rdx, rbx
lea rcx, [rbp + reloc.MFC42u.dll_CMapStringToPtr::operator__]
call qword [sym.imp.msvcrt.dll_wcscpy_s]
nop dword [rax + rax]
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
lea rdi, [rsi + 0xb8]
mov dword [rsp + 0x20], COleDocument::AddItem
mov r9, rsi
lea r8, [rsp + 0x60]
mov edx, 0x5000002d
mov rcx, rdi
call qword [sym.imp.MFC42u.dll_CWnd::CreateDlgIndirect]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x140043407
mov qword [rdi + 0x80], rsi
lea rdx, [rbp + reloc.MFC42u.dll_CMapStringToPtr::operator__]
mov rcx, rdi
call fcn.14004a9e0
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 + 0x7b0]
xor rcx, rsp
call fcn.14006e550
add rsp, 0x8c8
pop rdi
pop rsi
pop rbx
pop rbp
ret
xor eax, eax
jmp 0x1400433e7
lea rcx, [rsp + 0x40]
call qword [sym.imp.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef]
nop dword [rax + rax]
jmp 0x140043403