Function at 0x4516de
Capabilities:
Check if file exists
Copy file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x33c
mov eax, dword [0xee37e4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0xef591c]
push ebx
xor ebx, ebx
shr eax, 1
push esi
push edi
inc ebx
mov edi, ecx
mov dword [ebp - 0x2d0], edi
test bl, al
je 0x451f52
call fcn.00462c37
test al, al
je 0x451f52
mov ecx, dword [edi]
mov dword [ebp - 0x2d8], ecx
mov eax, dword [ecx]
call dword [eax + 4]
and dword [ebp - 0x2d4], 0
mov esi, eax
mov ecx, dword [0xefc718]
mov dword [ebp - 0x2dc], eax
test ecx, ecx
je 0x45176a
call fcn.005b2f74
push 0
mov dword [ebp - 0x2d4], eax
call fcn.00702f96
mov eax, dword [ebp - 0x2d4]
mov esi, str.filename
test eax, eax
pop ecx
cmovne esi, eax
mov dword [ebp - 0x2dc], esi
test esi, esi
sete cl
call fcn.00420997
test esi, esi
je 0x451f46
mov ecx, edi
call fcn.00462c67
test eax, eax
je 0x4517d1
mov esi, dword [eax + 0x1c]
mov edi, esi
test esi, esi
je 0x4517d5
lea eax, [esi + 0x18]
cmp byte [eax], 0
mov dword [ebp - 0x2bc], eax
jne 0x4517d5
mov eax, dword [ebp - 0x2d0]
add eax, 0x58
mov dword [ebp - 0x2c0], eax
mov ecx, dword [eax]
call fcn.0045a8ad
cmp eax, str.engineTxt
je 0x4517d5
mov ecx, dword [ebp - 0x2c0]
mov esi, ecx
mov byte [ebp - 0x2b3], bl
mov dword [ebp - 0x2c4], ecx
jmp 0x4517fa
xor edi, edi
xor esi, esi
mov ecx, dword [ebp - 0x2d0]
lea eax, [esi + 0x18]
add ecx, 0x58
mov dword [ebp - 0x2bc], eax
mov dword [ebp - 0x2c4], ecx
mov esi, ecx
mov byte [ebp - 0x2b3], 0
test edi, edi
je 0x45182f
mov ecx, dword [ecx]
call fcn.0045a8ad
cmp eax, str.enginePdf
je 0x45182f
mov ecx, dword [ebp - 0x2c4]
mov byte [ebp - 0x2b2], bl
mov ecx, dword [ecx]
call fcn.0045a8ad
cmp eax, str.enginePostScript
mov eax, dword [ebp - 0x2bc]
je 0x45183c
cmp byte [eax], 0
jne 0x45183c
jmp 0x451835
mov eax, dword [ebp - 0x2bc]
mov byte [ebp - 0x2b2], 0
cmp byte [ebp - 0x2b3], 0
je 0x451860
test edi, edi
je 0x45185c
cmp byte [eax], 0
jne 0x45185c
mov ecx, dword [esi]
call fcn.0045a8ad
cmp eax, str.engineTxt
jne 0x451860
mov cl, bl
jmp 0x451862
xor cl, cl
call fcn.00420997
cmp byte [ebp - 0x2b2], 0
je 0x451886
test edi, edi
je 0x451882
mov ecx, dword [esi]
call fcn.0045a8ad
cmp eax, str.enginePdf
jne 0x451886
mov cl, bl
jmp 0x451888
xor cl, cl
call fcn.00420997
mov ecx, dword [ebp - 0x2d8]
mov eax, dword [ecx]
call dword [eax + 8]
push ecx
mov esi, eax
lea ecx, [ebp - 0x260]
push 0x100
mov dword [ebp - 0x2bc], esi
call fcn.005b1f4f
mov ecx, dword [ebp - 0x2d8]
lea edx, [ebp - 0x260]
call fcn.004515a9
test al, al
je 0x4518db
push esi
lea eax, [ebp - 0x260]
push 0xe7d8d4
push eax
call fcn.005b213f
add esp, 0xc
cmp byte [ebp - 0x2b3], 0
je 0x451910
push 0xffffffffffffffff
push ecx
mov ecx, str.Text_documents
call fcn.00460e8f
pop ecx
push eax
lea ecx, [ebp - 0x260]
call fcn.005b1ffd
push 0xffffffffffffffff
push 0xe7d8e0
lea ecx, [ebp - 0x260]
call fcn.005b1ffd
cmp byte [ebp - 0x2b2], 0
je 0x451945
push 0xffffffffffffffff
push ecx
mov ecx, str.PDF_documents
call fcn.00460e8f
pop ecx
push eax
lea ecx, [ebp - 0x260]
call fcn.005b1ffd
push 0xffffffffffffffff
push 0xe7d6dc
lea ecx, [ebp - 0x260]
call fcn.005b1ffd
push 0xffffffffffffffff
push ecx
mov ecx, str.All_files
call fcn.00460e8f
pop ecx
push eax
lea ecx, [ebp - 0x260]
call fcn.005b1ffd
push 0xffffffffffffffff
push 0xe7d6ec
lea ecx, [ebp - 0x260]
call fcn.005b1ffd
mov ecx, dword [ebp - 0x25c]
mov edx, 0xe7d6fc
push 0xe7d6f8
call fcn.005b2572
pop ecx
mov ecx, dword [ebp - 0x2dc]
call fcn.005b4922
push eax
mov edx, 0x104
lea ecx, [ebp - 0x210]
call fcn.005b26f2
pop ecx
lea eax, [ebp - 0x210]
push 0x3a
push eax
call fcn.006f5212
pop ecx
pop ecx
test eax, eax
je 0x451b86
lea eax, [ebp - 0x210]
push 0x3a
push eax
call fcn.006f5212
push 0xe7d8fc
mov edx, 0xe7d900
mov dword [ebp - 0x2c4], eax
mov ecx, eax
call fcn.005b2572
mov eax, dword [ebp - 0x2c4]
lea ecx, [ebp - 0x210]
add esp, 0xc
mov esi, eax
cmp eax, ecx
jbe 0x451a0b
push 0x2e
pop edx
cmp word [esi], dx
je 0x451a16
sub esi, 2
lea ecx, [ebp - 0x210]
cmp esi, ecx
ja 0x4519f9
lea ecx, [ebp - 0x210]
cmp esi, ecx
cmove esi, eax
mov ecx, eax
call fcn.005b0bf2
lea eax, [eax*2 + 2]
push eax
mov eax, dword [ebp - 0x2c4]
push eax
push esi
call fcn.006f6760
add esp, 0xc
mov esi, dword [ebp - 0x2bc]
push 0x58
lea eax, [ebp - 0x338]
push 0
push eax
call fcn.006f59b0
mov eax, dword [ebp - 0x2d0]
add esp, 0xc
mov ecx, esi
mov dword [ebp - 0x338], 0x58
mov dword [ebp - 0x318], 0x104
mov dword [ebp - 0x320], ebx
mov eax, dword [eax + 0x5c]
mov dword [ebp - 0x334], eax
lea eax, [ebp - 0x210]
mov dword [ebp - 0x31c], eax
mov eax, dword [ebp - 0x25c]
mov dword [ebp - 0x32c], eax
call fcn.005b0bf2
test eax, eax
je 0x451aab
push 0x2e
pop eax
cmp word [esi], ax
jne 0x451aab
add esi, 2
mov dword [ebp - 0x2bc], esi
lea eax, [ebp - 0x338]
mov dword [ebp - 0x2fc], esi
push eax
mov dword [ebp - 0x304], 0x806
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
test eax, eax
setne byte [ebp - 0x2b1]
test eax, eax
je 0x451f3b
cmp byte [ebp - 0x2b3], 0
lea esi, [ebp - 0x210]
mov dword [ebp - 0x2c0], esi
je 0x451b04
mov edx, 0xe7d904
mov ecx, esi
call fcn.005b2383
mov byte [ebp - 0x2b4], bl
test al, al
jne 0x451b0b
mov byte [ebp - 0x2b4], 0
cmp byte [ebp - 0x2b2], 0
je 0x451b2e
mov edx, 0xe7a2a4
lea ecx, [ebp - 0x210]
call fcn.005b2383
mov byte [ebp - 0x2b5], bl
test al, al
jne 0x451b35
mov byte [ebp - 0x2b5], 0
mov edx, dword [ebp - 0x2bc]
lea ecx, [ebp - 0x210]
call fcn.005b2383
test al, al
jne 0x451c14
cmp byte [ebp - 0x2b4], al
jne 0x451c14
cmp byte [ebp - 0x2b5], al
jne 0x451c14
mov al, byte [ebp - 0x2b3]
test al, al
je 0x451bcd
cmp dword [ebp - 0x320], 2
jne 0x451bcd
mov eax, 0xe7d904
mov byte [ebp - 0x2b4], bl
jmp 0x451bf7
mov edx, esi
lea ecx, [ebp - 0x210]
call fcn.005b2383
test al, al
je 0x451a3b
mov ecx, esi
call fcn.005b0bf2
lea ecx, [ebp - 0x210]
mov esi, eax
call fcn.005b0bf2
sub eax, esi
add eax, eax
cmp eax, 0x208
jae 0x451f61
xor ecx, ecx
mov word [ebp + eax - 0x210], cx
jmp 0x451a35
cmp byte [ebp - 0x2b2], 0
je 0x451bf1
movzx eax, al
add eax, 2
cmp eax, dword [ebp - 0x320]
jne 0x451bf1
mov eax, 0xe7a2a4
mov byte [ebp - 0x2b5], bl
jmp 0x451bf7
mov eax, dword [ebp - 0x2bc]
push eax
lea eax, [ebp - 0x210]
push eax
push 0xe7d910
call fcn.005b24d2
add esp, 0xc
mov dword [ebp - 0x2c0], eax
mov esi, eax
push 0xffffffffffffffff
mov edx, esi
lea ecx, [ebp - 0x2c8]
call fcn.005b471e
xor eax, eax
pop ecx
mov dword [ebp - 0x2bc], eax
cmp byte [ebp - 0x2b4], al
je 0x451d41
push ecx
push 0x400
lea ecx, [ebp - 0x2b0]
call fcn.005b1f4f
mov esi, dword [ebp - 0x2d8]
mov ecx, esi
mov eax, dword [esi]
call dword [eax + 0xc]
cmp eax, ebx
jl 0x451cca
mov eax, dword [edi]
lea ecx, [ebp - 0x2cc]
push ebx
push ecx
mov ecx, edi
call dword [eax + 0x24]
mov eax, dword [ebp - 0x2cc]
test eax, eax
je 0x451c97
push 0xe76934
mov edx, 0xe7c6b0
mov ecx, eax
call fcn.005b25b6
pop ecx
push eax
lea ecx, [ebp - 0x2b0]
call fcn.005b2158
mov eax, dword [ebp - 0x2cc]
push eax
call fcn.00702f96
pop ecx
push dword [ebp - 0x2c8]
call fcn.00702f96
xor eax, eax
inc ebx
mov dword [ebp - 0x2cc], eax
mov dword [ebp - 0x2c8], eax
mov dword [ebp - 0x2c4], eax
mov eax, dword [esi]
pop ecx
mov ecx, esi
call dword [eax + 0xc]
cmp ebx, eax
jle 0x451c5a
mov edx, dword [ebp - 0x2ac]
lea ecx, [ebp - 0x2c8]
push 0xffffffffffffffff
call fcn.005b471e
mov edx, dword [ebp - 0x2c8]
pop ecx
push 0
push 0
mov ecx, 0xe7d91c
call fcn.005b0f7a
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x2c8]
call fcn.0042784f
mov eax, dword [ebp - 0x2c4]
mov esi, dword [ebp - 0x2c8]
mov edi, dword [ebp - 0x2c0]
push ecx
push ecx
mov ecx, esp
mov dword [ecx], esi
mov dword [ecx + 4], eax
mov ecx, edi
call fcn.005b541f
push esi
mov byte [ebp - 0x2b1], al
call fcn.00702f96
add esp, 0xc
lea ecx, [ebp - 0x2b0]
call fcn.005b1b6b
jmp 0x451e97
cmp byte [ebp - 0x2b5], al
je 0x451db7
push 0xe78b98
push 0xe7753c
mov edx, 0xe736e0
lea ecx, [ebp - 0x2e0]
call fcn.005b46e5
pop ecx
pop ecx
mov ecx, dword [0xefe3d8]
mov esi, dword [eax]
mov edx, esi
call fcn.005b21dd
test al, al
jne 0x451d83
push esi
mov ecx, 0xefe3d8
call fcn.004278a9
mov eax, dword [edi]
mov ecx, edi
push dword [ebp - 0x2c8]
mov eax, dword [eax + 0x20]
call eax
test al, al
jne 0x451ed3
cmp byte [0xefc711], al
je 0x451ea3
push ecx
mov ecx, dword [ebp - 0x2c8]
mov edx, edi
call fcn.004852a7
pop ecx
jmp 0x451de6
mov ebx, dword [ebp - 0x2dc]
mov ecx, ebx
call fcn.005b5305
test al, al
jne 0x451dcc
test edi, edi
jne 0x451dd7
mov ecx, edi
call fcn.004700b3
test al, al
je 0x451df1
mov eax, dword [edi]
mov ecx, edi
push dword [ebp - 0x2c8]
mov eax, dword [eax + 0x1c]
call eax
mov edi, dword [ebp - 0x2c0]
jmp 0x451e9d
mov edx, esi
mov ecx, ebx
call fcn.005b4d60
test al, al
jne 0x451e91
push 0
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
setne byte [ebp - 0x2b1]
test eax, eax
je 0x451e36
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x451e91
test al, 7
je 0x451e91
and eax, 0xfffffff8
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x451e91
xor ebx, ebx
lea eax, [ebp - 0x2c4]
push ebx
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
je 0x451e91
mov esi, dword [ebp - 0x2c4]
mov ecx, str.Failed_to_save_a_file
call fcn.00460e8f
push esi
push eax
push str._s_n_n_s
call fcn.005b24d2
add esp, 0xc
mov dword [ebp - 0x2bc], eax
push ebx
call fcn.00702f96
pop ecx
push dword [ebp - 0x2c4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [ebp - 0x2c0]
mov al, byte [ebp - 0x2b1]
test al, al
jne 0x451ed9
jmp 0x451ea9
mov edi, dword [ebp - 0x2c0]
mov ecx, str.Failed_to_save_a_file
call fcn.00460e8f
mov ebx, dword [ebp - 0x2bc]
test ebx, ebx
push 0
cmovne eax, ebx
mov edx, eax
mov eax, dword [ebp - 0x2d0]
mov ecx, dword [eax + 0x5c]
call fcn.0044e079
pop ecx
jmp 0x451f23
mov edi, dword [ebp - 0x2c0]
mov eax, dword [ebp - 0x2d0]
mov esi, dword [0xefc718]
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, esi
mov ecx, eax
call fcn.004229eb
test al, al
je 0x451f1d
cmp byte [ebp - 0x2b4], 0
jne 0x451f1d
push 0xffffffffffffffff
mov edx, edi
lea ecx, [ebp - 0x2e0]
call fcn.005b471e
pop ecx
mov ecx, dword [ebp - 0x2e0]
call fcn.005b56c6
mov ebx, dword [ebp - 0x2bc]
lea eax, [ebp - 0x210]
cmp edi, eax
je 0x451f34
push edi
call fcn.00702f96
pop ecx
push ebx
call fcn.00702f96
pop ecx
lea ecx, [ebp - 0x260]
call fcn.005b1b6b
push dword [ebp - 0x2d4]
call fcn.00702f96
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006f3e28
leave
ret
call fcn.006f420f
int3