Function at 0x4040e0
Capabilities:
Check if file exists
Copy file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1638
call fcn.0040b450
mov eax, dword [0x427120]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
xor ebx, ebx
push 0x206
mov dword [ebp - 0x15a4], ecx
lea edx, [ebp - 0x67e]
xor ecx, ecx
push ebx
push edx
mov dword [ebp - 0x15b8], eax
mov dword [ebp - 0x15ac], ebx
mov word [ebp - 0x680], cx
call fcn.0040ae90
push 0x206
lea ecx, [ebp - 0xd9a]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0xd9c], ax
call fcn.0040ae90
push 0x206
lea eax, [ebp - 0xb92]
xor edx, edx
push ebx
push eax
mov word [ebp - 0xb94], dx
call fcn.0040ae90
add esp, 0x24
push 0x104
lea ecx, [ebp - 0x680]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4041f4
push ebx
push ebx
lea edx, [ebp - 0xb94]
push edx
lea eax, [ebp - 0xd9c]
push eax
lea ecx, [ebp - 0x680]
push ecx
call fcn.0040bcc0
add esp, 0x14
xor eax, eax
lea ecx, [ecx]
movzx ecx, word [ebp + eax - 0xd9c]
mov word [ebp + eax - 0x680], cx
add eax, 2
cmp cx, bx
jne 0x4041a0
lea eax, [ebp - 0xb94]
mov edx, eax
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4041c0
lea edi, [ebp - 0x680]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x4041d6
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x404217
xor eax, eax
jmp 0x404200
movzx ecx, word [eax + 0x420748]
mov word [ebp + eax - 0x680], cx
add eax, 2
cmp cx, bx
jne 0x404200
mov eax, dword [str.dopdfui7.dll]
mov edx, dword [str.dopdfpr7.dll]
mov ecx, dword [str.dopdfmn7.dll]
push 0x64
mov dword [ebp - 0x1634], eax
mov dword [ebp - 0x1638], edx
mov edx, dword [str.dopdfmi7.dll]
lea eax, [ebp - 0x161c]
push ebx
push eax
mov dword [ebp - 0x1630], str.dopdf7.chm
mov dword [ebp - 0x162c], 0x41e91c
mov dword [ebp - 0x1628], ecx
mov dword [ebp - 0x1624], edx
mov dword [ebp - 0x1620], ebx
call fcn.0040ae90
mov ecx, str.dopdfcl7.exe
mov eax, ecx
add esp, 0xc
mov edi, 6
lea esi, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x404281
sub eax, esi
sar eax, 1
je 0x4042d1
cmp edi, 0x1f
jge 0x4042d1
mov eax, ecx
mov dword [ebp + edi*4 - 0x1638], ecx
lea esi, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x4042a3
sub eax, esi
sar eax, 1
lea ecx, [ecx + eax*2 + 2]
mov eax, ecx
inc edi
lea esi, [eax + 2]
lea esp, [esp]
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x4042c0
sub eax, esi
sar eax, 1
jne 0x404292
lea ecx, [ebp - 0x1638]
mov dword [ebp - 0x15b4], ecx
mov dword [ebp - 0x15a8], ebx
mov byte [ebp - 0x159d], bl
cmp dword [ebp - 0x1638], ebx
je 0x404723
xor eax, eax
jmp 0x404300
movzx ecx, word [ebp + eax - 0x680]
mov word [ebp + eax - 0x478], cx
add eax, 2
test cx, cx
jne 0x404300
mov edx, dword [ebp - 0x15b4]
mov ebx, dword [edx]
mov eax, ebx
mov edx, ebx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404324
lea edi, [ebp - 0x478]
sub eax, edx
add edi, 0xfffffffe
lea ebx, [ebx]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x404340
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0x15a4]
and ecx, 3
cmp dword [eax + 0x354], 8
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
jb 0x404375
mov ecx, dword [ecx + 0x340]
jmp 0x40437b
add ecx, 0x340
lea edx, [ebp - 0x20c]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x404381
mov eax, ebx
mov edx, ebx
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404396
lea edi, [ebp - 0x20c]
sub eax, edx
add edi, 0xfffffffe
lea esp, [esp]
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x4043b0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x41e91c
mov eax, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4043f9
test dx, dx
je 0x4043f5
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4043f9
add eax, 4
add ecx, 4
test dx, dx
jne 0x4043d3
xor eax, eax
jmp 0x4043fe
sbb eax, eax
sbb eax, 0xffffffff
mov ecx, dword [str.dopdfmn7.dll]
test eax, eax
sete byte [ebp - 0x15ad]
mov eax, ebx
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x404436
test dx, dx
je 0x404432
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x404436
add eax, 4
add ecx, 4
test dx, dx
jne 0x404410
xor eax, eax
jmp 0x40443b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4044b8
mov ecx, dword [str.dopdfmi7.dll]
mov eax, ebx
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40446d
test dx, dx
je 0x404469
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40446d
add eax, 4
add ecx, 4
test dx, dx
jne 0x404447
xor eax, eax
jmp 0x404472
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4044b8
mov ecx, 0x41e91c
mov eax, ebx
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4044a6
test dx, dx
je 0x4044a2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4044a6
add eax, 4
add ecx, 4
test dx, dx
jne 0x404480
xor eax, eax
jmp 0x4044ab
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x404522
cmp dword [ebp - 0x15a8], 5
jle 0x404522
push 0x104
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea edi, [ebp - 0x20c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4044d3
mov eax, dword [0x420744]
mov dword [edi], eax
mov eax, ebx
mov edx, ebx
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4044f0
lea edi, [ebp - 0x20c]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x404506
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x478]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x404575
inc dword [ebp - 0x15a8]
call fcn.004065d0
test eax, eax
je 0x4046ee
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x478]
push ecx
push str.Copied:___s__to:___s_
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0x10
jmp 0x4046ee
cmp byte [ebp - 0x15ad], 0
je 0x404609
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x15ac], eax
cmp eax, 2
jne 0x404609
call fcn.004065d0
test eax, eax
je 0x4045b6
lea edx, [ebp - 0x478]
push edx
push str.File:___s__does_NOT_exist.
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
mov edi, dword [ebp - 0x15a4]
mov esi, dword [edi + 0x334]
sub esi, 0xb
cmp esi, dword [edi + 0x334]
jbe 0x4045d2
call fcn.0040ba95
cmp dword [edi + 0x338], 8
jb 0x4045f2
mov eax, dword [edi + 0x324]
xor ecx, ecx
mov word [eax + esi*2], cx
mov dword [ebp - 0x15ac], ecx
jmp 0x4046ee
xor ecx, ecx
lea eax, [edi + 0x324]
mov word [eax + esi*2], cx
mov dword [ebp - 0x15ac], ecx
jmp 0x4046ee
cmp byte [ebp - 0x159d], 0
jne 0x404629
mov ecx, dword [ebp - 0x15a4]
call fcn.00402830
mov byte [ebp - 0x159d], 1
jmp 0x4046f5
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
mov esi, eax
mov dword [ebp - 0x15ac], esi
call fcn.004065d0
test eax, eax
je 0x40465c
lea edx, [ebp - 0x478]
push edx
push str.PdfsInstaller.CopyFiles__FAILED_to_copy_file:___s__to:
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
call fcn.004065d0
test eax, eax
je 0x40467f
lea eax, [ebp - 0x20c]
push eax
push 0x41e6ec
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
cmp esi, 0x20
jne 0x4046ea
push 4
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x478]
push edx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
call fcn.004065d0
test eax, eax
je 0x4046bd
lea eax, [ebp - 0x478]
push eax
push str.PdfsInstaller.CopyFiles_WARNING_file:___s__will_be_copied_at_the_next_system_boot:
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
call fcn.004065d0
test eax, eax
je 0x4046e0
lea ecx, [ebp - 0x20c]
push ecx
push str.to:__s
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
call edi
mov esi, eax
mov dword [ebp - 0x15ac], eax
test esi, esi
jne 0x404706
add dword [ebp - 0x15b4], 4
mov edx, dword [ebp - 0x15b4]
cmp dword [edx], 0
jne 0x4042f5
jmp 0x404723
call fcn.004065d0
test eax, eax
je 0x404723
push esi
push str.Error___d
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
mov eax, dword [0x427020]
lea edx, [ebp - 0x270]
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x404730
lea eax, [ebp - 0x270]
push eax
call fcn.00408530
mov ebx, 1
add esp, 4
cmp eax, ebx
mov dword [ebp - 0x15b4], eax
mov dword [ebp - 0x15a8], 0
jl 0x4049a7
jmp 0x404770
lea ecx, [ebp - 0x784]
push ecx
lea edx, [ebp - 0x270]
push ebx
push edx
call fcn.004085c0
add esp, 0xc
lea eax, [ebp - 0x784]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
cmp esi, 0x3fffffff
jg 0x4047ce
lea eax, [esi + esi]
call fcn.0040ae60
mov edi, esp
test edi, edi
je 0x4047ce
push esi
push edi
push 0xffffffffffffffff
lea edx, [ebp - 0x784]
xor ecx, ecx
push edx
push ecx
push 3
mov word [edi], cx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
neg eax
sbb eax, eax
and eax, edi
jmp 0x4047d0
xor eax, eax
lea edx, [ebp - 0x98c]
movzx ecx, word [eax]
mov word [edx], cx
add eax, 2
add edx, 2
test cx, cx
jne 0x4047d6
xor eax, eax
lea esp, [esp]
movzx ecx, word [ebp + eax - 0x680]
mov word [ebp + eax - 0x478], cx
add eax, 2
test cx, cx
jne 0x4047f0
lea eax, [ebp - 0x98c]
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404810
lea edi, [ebp - 0x478]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x404826
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0x15a4]
and ecx, 3
cmp dword [eax + 0x354], 8
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
jb 0x40485b
mov ecx, dword [ecx + 0x340]
jmp 0x404861
add ecx, 0x340
lea edx, [ebp - 0x20c]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x404867
lea eax, [ebp - 0x98c]
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404880
lea edi, [ebp - 0x20c]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x404896
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
push 0
mov ecx, eax
lea edx, [ebp - 0x20c]
push edx
lea eax, [ebp - 0x478]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x404964
call fcn.004065d0
test eax, eax
je 0x4048fa
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x478]
push edx
push str.Copied:___s__to:___s_
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0x10
lea eax, [ebp - 0x98c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404903
mov esi, dword [ebp - 0x15a8]
sub eax, edx
sar eax, 1
add eax, eax
push eax
lea ecx, [ebp - 0x98c]
push ecx
lea edx, [ebp + esi*2 - 0x159c]
push edx
call fcn.0040bd10
lea eax, [ebp - 0x98c]
add esp, 0xc
lea edx, [eax + 2]
jmp 0x404940
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404940
sub eax, edx
sar eax, 1
add esi, eax
xor eax, eax
mov word [ebp + esi*2 - 0x159c], ax
inc esi
mov dword [ebp - 0x15a8], esi
jmp 0x40499a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x15ac], eax
call fcn.004065d0
test eax, eax
je 0x40499a
lea ecx, [ebp - 0x20c]
push ecx
lea edx, [ebp - 0x478]
push edx
push str.PdfsInstaller.CopyFiles__FAILED_to_copy_file:___s__to:__s
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0x10
inc ebx
cmp ebx, dword [ebp - 0x15b4]
jle 0x404770
mov eax, dword [ebp - 0x15b8]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4049b0
sub eax, edx
sar eax, 1
je 0x404aa4
mov ecx, dword [ebp - 0x15a4]
cmp dword [ecx + 0x354], 8
jb 0x4049dc
mov ecx, dword [ecx + 0x340]
jmp 0x4049e2
add ecx, 0x340
lea edx, [ebp - 0x20c]
jmp 0x4049f0
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x4049f0
mov eax, 0x41e934
mov edx, eax
jmp 0x404a10
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404a10
lea edi, [ebp - 0x20c]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x404a26
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0
lea eax, [ebp - 0x20c]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x15b8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x404a74
call fcn.004065d0
test eax, eax
je 0x404aa4
lea ecx, [ebp - 0x20c]
push ecx
push esi
push str.Copied:___s__to:___s_
jmp 0x404a96
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x15ac], eax
call fcn.004065d0
test eax, eax
je 0x404aa4
lea edx, [ebp - 0x20c]
push edx
push esi
push str.PdfsInstaller.CopyFiles__FAILED_to_copy_file:___s__to:__s
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0x10
mov eax, dword [ebp - 0x15a8]
test eax, eax
je 0x404ac7
mov ecx, dword [ebp - 0x15a4]
push eax
lea eax, [ebp - 0x159c]
push eax
add ecx, 0x320
call fcn.00403eb0
call fcn.00402c30
cmp eax, 0x600
jb 0x404ade
mov ecx, dword [ebp - 0x15a4]
call fcn.00403740
mov eax, dword [ebp - 0x15ac]
lea esp, [ebp - 0x1644]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040ae4c
mov esp, ebp
pop ebp
ret 0xc