Function at 0x4f2440
Capabilities:
Check if file exists
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5aa15c
mov eax, dword fs:[0]
push eax
mov eax, 0x148c
call fcn.0056e430
mov eax, dword [0x608554]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push ecx
push str.CBaseInfoPrinterEx::RemoveBackUpDir
lea ecx, [ebp - 0x1490]
call fcn.0040a480
mov dword [ebp - 4], 0
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x4f24c9
test byte [ecx + 0x1c], 1
je 0x4f24c9
cmp dword [0x608f68], 8
mov eax, 0x608f54
mov edx, 0x5daec4
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x8a
call fcn.00401840
add esp, 0xc
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00571c00
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.00571c00
push 0x800
lea eax, [ebp - 0xc20]
push 0
push eax
call fcn.00571c00
add esp, 0x24
lea ecx, [ebp - 0x1494]
call fcn.0046a2f0
mov byte [ebp - 4], 1
mov eax, dword [0x6184f0]
push ecx
push str.CBaseInfoCustomDrv::DeleteUPDBackupFolder
lea ecx, [ebp - 0x1458]
mov esi, dword [eax + 0x30]
call fcn.0040a480
mov byte [ebp - 4], 2
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x4f2571
test byte [ecx + 0x1c], 1
je 0x4f2571
cmp dword [0x608f68], 8
mov eax, 0x608f54
mov edx, 0x5d9bd8
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x37
call fcn.00401840
add esp, 0xc
lea ecx, [ebp - 0x1498]
call fcn.0046a2f0
lea eax, [esi + 0x64]
mov byte [ebp - 4], 3
cmp dword [eax + 0x14], 8
jb 0x4f258b
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x1498]
call fcn.0046f570
mov byte [ebp - 0x1454], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x4f25e0
test byte [ecx + 0x1c], 1
je 0x4f25e0
cmp dword [0x608f68], 8
mov eax, 0x608f54
push 0
cmovae eax, dword [0x608f54]
mov edx, 0x5d9bd8
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x38
call fcn.004018a0
add esp, 0x10
lea ecx, [ebp - 0x1498]
call fcn.0046a3c0
lea ecx, [ebp - 0x1458]
mov byte [ebp - 4], 1
call fcn.0040a570
push 0x800
lea eax, [ebp - 0x1420]
push 0
push eax
call fcn.00571c00
mov ecx, dword [0x6184f0]
lea eax, [ebp - 0x1420]
add esp, 0xc
mov ecx, dword [ecx + 0x1c]
push eax
push str.ProgramFilesFolder
call fcn.004f65f0
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x1420]
push eax
lea eax, [ebp - 0x218]
push eax
call edi
mov esi, dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x218]
push eax
call esi
push str.Canon_
lea eax, [ebp - 0x218]
push eax
call edi
lea eax, [ebp - 0x218]
push eax
call esi
push str.InstRestore
lea eax, [ebp - 0x218]
push eax
call edi
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [0x6184f0]
mov eax, dword [eax + 8]
add eax, 0x8bc
cmp dword [eax + 0x14], 8
jb 0x4f26a6
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x218]
push eax
call edi
mov ecx, dword [0x6184f0]
lea eax, [ebp - 0xc20]
push eax
push str.RESTORE_COLOR_FOLDER
mov ecx, dword [ecx + 0x1c]
call fcn.004f65f0
mov edi, dword [ebp + 8]
lea eax, [ebp - 0xc20]
mov esi, dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
push eax
test edi, edi
je 0x4f26eb
lea ecx, [ebp - 0x1494]
call fcn.0046f570
jmp 0x4f26ed
call esi
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x4f2734
test byte [ecx + 0x1c], 4
je 0x4f2734
cmp dword [0x608f68], 8
lea edx, [ebp - 0x218]
push edx
mov eax, 0x608f54
mov edx, 0x5daec4
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x8b
call fcn.00405920
add esp, 0x10
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4f275f
lea eax, [ebp - 0x218]
push eax
test edi, edi
je 0x4f275d
lea ecx, [ebp - 0x1494]
call fcn.0046f570
jmp 0x4f275f
call esi
lea eax, [ebp - 0x420]
push eax
lea ecx, [ebp - 0x1494]
call fcn.0046ff70
test eax, eax
jne 0x4f278f
lea eax, [ebp - 0x420]
push eax
test edi, edi
je 0x4f278d
lea ecx, [ebp - 0x1494]
call fcn.0046f570
jmp 0x4f278f
call esi
mov byte [ebp - 0x148c], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x4f27d8
test byte [ecx + 0x1c], 1
je 0x4f27d8
cmp dword [0x608f68], 8
mov eax, 0x608f54
push 0
cmovae eax, dword [0x608f54]
mov edx, 0x5daec4
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x8c
call fcn.004018a0
add esp, 0x10
lea ecx, [ebp - 0x1494]
call fcn.0046a3c0
lea ecx, [ebp - 0x1490]
call fcn.0040a570
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0056d977
mov esp, ebp
pop ebp
ret 4