Function at 0x51aec0
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5acc88
mov eax, dword fs:[0]
push eax
mov eax, 0x2298
call fcn.0056e430
mov eax, dword [0x608554]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push ecx
push str.CBaseSeqFinish::FinishInstaller
lea ecx, [ebp - 0x2250]
call fcn.0040a480
mov dword [ebp - 4], 0
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x51af4a
test byte [ecx + 0x1c], 1
je 0x51af4a
cmp dword [0x608f68], 8
mov eax, 0x608f54
mov edx, 0x5de540
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x1a
call fcn.00401840
add esp, 0xc
push 0x800
lea eax, [ebp - 0xa18]
push 0
push eax
call fcn.00571c00
add esp, 0xc
call fcn.00550b4e
mov ecx, eax
test ecx, ecx
je 0x51b626
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x22a4], eax
push 1
lea ecx, [ebp - 0x22a4]
mov byte [ebp - 4], 1
call fcn.00403020
push ecx
push str.OperateTempFolder::DeleteTempFolder
lea ecx, [ebp - 0x2288]
call fcn.0040a480
mov byte [ebp - 4], 2
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x51afe3
test byte [ecx + 0x1c], 1
je 0x51afe3
cmp dword [0x608f68], 8
mov eax, 0x608f54
mov edx, 0x5cf920
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x26
call fcn.00401840
add esp, 0xc
push 0x800
lea eax, [ebp - 0x1218]
push 0
push eax
call fcn.00571c00
add esp, 0xc
lea ecx, [ebp - 0x2290]
call fcn.0046a2f0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x1218]
mov ecx, dword [0x6184f0]
push eax
push str.TEMPPATH
mov ecx, dword [ecx + 0x1c]
call fcn.004f65f0
lea eax, [ebp - 0x1218]
push eax
lea ecx, [ebp - 0x2290]
call fcn.0046f570
mov edx, eax
mov byte [ebp - 0x2284], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x51b07e
test byte [ecx + 0x1c], 1
je 0x51b07e
cmp dword [0x608f68], 8
mov eax, 0x608f54
push edx
cmovae eax, dword [0x608f54]
mov edx, 0x5cf920
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x27
call fcn.004018a0
add esp, 0x10
lea ecx, [ebp - 0x2290]
call fcn.0046a3c0
lea ecx, [ebp - 0x2288]
mov byte [ebp - 4], 1
call fcn.0040a570
push 0x800
lea eax, [ebp - 0x1a18]
mov dword [ebp - 0x2294], 0
push 0
push eax
mov dword [ebp - 0x229c], 0
call fcn.00571c00
mov ecx, dword [0x6184f0]
lea eax, [ebp - 0x1a18]
add esp, 0xc
mov ecx, dword [ecx + 0x1c]
push eax
push str.ISFINISH
call fcn.004f65f0
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x51b123
test byte [ecx + 0x1c], 4
je 0x51b123
cmp dword [0x608f68], 8
lea edx, [ebp - 0x1a18]
push edx
mov eax, 0x608f54
mov edx, 0x5de540
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x1b
call fcn.00405920
add esp, 0x10
mov ecx, dword [0x6184f0]
lea eax, [ebp - 0xa18]
push eax
push str.RebootYesNo
mov ecx, dword [ecx + 0x1c]
call fcn.004f65f0
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x51b184
test byte [ecx + 0x1c], 4
je 0x51b184
cmp dword [0x608f68], 8
lea edx, [ebp - 0xa18]
push edx
mov eax, 0x608f54
mov edx, 0x5de540
cmovae eax, dword [0x608f54]
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x1c
call fcn.00405920
add esp, 0x10
lea ecx, [ebp - 0x228c]
call fcn.00470b20
mov byte [ebp - 4], 4
or edi, 0xffffffff
cmp word [ebp - 0x1a18], 0x31
jne 0x51b1ae
cmp word [ebp - 0xa18], 0x59
je 0x51b411
push 1
lea ecx, [ebp - 0x228c]
call fcn.004710a0
push 2
lea ecx, [ebp - 0x228c]
call fcn.004710a0
push 4
lea ecx, [ebp - 0x228c]
call fcn.004710a0
push 5
lea ecx, [ebp - 0x228c]
call fcn.004710a0
push 6
lea ecx, [ebp - 0x228c]
call fcn.004710a0
mov ecx, dword [0x6184f0]
lea eax, [ebp - 0xa18]
push eax
push str.INTEGRATEDINSTALLER
mov ecx, dword [ecx + 0x1c]
call fcn.004f65f0
push 0x5c5de4
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x51b411
lea ecx, [ebp - 0x2290]
call fcn.00475e00
lea eax, [ebp - 0xa18]
mov byte [ebp - 4], 5
push eax
lea eax, [ebp - 0x229c]
push eax
push 1
lea ecx, [ebp - 0x2290]
call fcn.00475fd0
mov eax, dword [0x6184f0]
mov eax, dword [eax + 4]
mov eax, dword [eax + 4]
add eax, 0x4814
push eax
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0xa18]
push eax
lea eax, [ebp - 0x2294]
push eax
push 0
lea ecx, [ebp - 0x2290]
call fcn.00475fd0
mov edx, dword [ebp - 0x2294]
test edx, edx
je 0x51b356
mov eax, dword [0x6184f0]
mov eax, dword [eax + 8]
cmp dword [eax + 0x7f8], 2
jne 0x51b617
call fcn.00550b4e
mov ecx, eax
test ecx, ecx
je 0x51b630
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x2298], esi
mov byte [ebp - 4], 6
mov ecx, 1
mov eax, dword [0x6184f0]
sub ecx, dword [esi - 4]
mov ebx, dword [eax + 0x1c]
mov eax, dword [esi - 8]
sub eax, 0x400
or eax, ecx
jge 0x51b2fc
push 0x400
lea ecx, [ebp - 0x2298]
call fcn.00403b50
mov esi, dword [ebp - 0x2298]
push esi
push str.InvalidUpdatePrinterNameSilentIni
mov ecx, ebx
call fcn.004f65f0
push ecx
lea ecx, [ebp - 0x2298]
call fcn.00405fa0
push 0x5c7da0
push esi
call fcn.00574f99
xor ecx, ecx
mov byte [ebp - 4], 5
add esp, 8
mov edx, 0x74
test eax, eax
mov eax, edi
cmove ecx, edx
add esi, 0xfffffff0
mov dword [0x6183ec], ecx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x51b350
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x2294]
mov esi, dword [0x6183ec]
mov ecx, dword [0x608f30]
mov ebx, dword [ebp - 0x229c]
cmp ecx, 0x608f30
je 0x51b39c
test byte [ecx + 0x1c], 4
je 0x51b39c
cmp dword [0x608f68], 8
mov eax, 0x608f54
push esi
cmovae eax, dword [0x608f54]
push edx
push ecx
push ebx
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.0051a0f0
add esp, 0x1c
push esi
push dword [ebp - 0x2294]
push 0x401
push ebx
call dword [sym.imp.USER32.dll_PostMessageW]
test eax, eax
jne 0x51b402
mov eax, dword [0x608f30]
cmp eax, 0x608f30
je 0x51b402
test byte [eax + 0x1c], 2
je 0x51b402
cmp dword [0x608f68], 8
lea ecx, [ebp - 0x2250]
mov esi, 0x608f54
cmovae esi, dword [0x608f54]
call fcn.0040a830
push eax
mov eax, dword [0x608f30]
mov edx, 0x5de540
push esi
mov ecx, 0x1e
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.00405920
add esp, 0x10
lea ecx, [ebp - 0x2290]
mov byte [ebp - 4], 4
call fcn.00475ed0
mov ecx, dword [0x6184f0]
push 0
mov ecx, dword [ecx + 4]
call fcn.004ff5e0
mov ecx, dword [0x6184f0]
push 3
mov ecx, dword [ecx + 4]
call fcn.004ff5e0
mov ecx, dword [0x6184f0]
mov ecx, dword [ecx + 4]
call fcn.004fd910
mov ecx, dword [0x6184f0]
push 0
mov ecx, dword [ecx + 0x28]
call fcn.004e8340
push 0
call fcn.004f2440
lea ecx, [ebp - 0x22a0]
call fcn.0046a2f0
mov byte [ebp - 4], 7
mov esi, dword [0x6184f0]
mov eax, dword [esi + 8]
cmp dword [eax + 0x3a4], 0
jne 0x51b570
push 0x208
lea eax, [ebp - 0xc20]
push 0
push eax
call fcn.00571c00
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.00571c00
push 0x800
lea eax, [ebp - 0x2218]
push 0
push eax
call fcn.00571c00
mov ecx, dword [esi + 0x1c]
lea eax, [ebp - 0x2218]
add esp, 0x24
push eax
push str.ProgramFilesFolder
call fcn.004f65f0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x2218]
push eax
lea eax, [ebp - 0x218]
push eax
call ebx
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 ebx
lea eax, [ebp - 0x218]
push eax
call esi
push str.InstRestore
lea eax, [ebp - 0x218]
push eax
call ebx
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0xc20]
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 0x51b547
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x218]
push eax
call ebx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x22a0]
call fcn.0046f570
lea eax, [ebp - 0xc20]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov byte [ebp - 0x224c], 1
mov ecx, dword [0x608f30]
cmp ecx, 0x608f30
je 0x51b5b9
test byte [ecx + 0x1c], 1
je 0x51b5b9
cmp dword [0x608f68], 8
mov eax, 0x608f54
push 0
cmovae eax, dword [0x608f54]
mov edx, 0x5de540
push eax
push dword [ecx + 0x14]
push dword [ecx + 0x10]
mov ecx, 0x1f
call fcn.004018a0
add esp, 0x10
lea ecx, [ebp - 0x22a0]
call fcn.0046a3c0
lea ecx, [ebp - 0x228c]
call fcn.00470bf0
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x22a4]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x51b5ee
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x2250]
call fcn.0040a570
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0056d977
mov esp, ebp
pop ebp
ret
mov dword [0x6183ec], 0
jmp 0x51b356
push 0x80004005
call fcn.004013a0
push 0x80004005
call fcn.004013a0
int3