Function at 0x407b50
Capabilities:
Check if file exists
Delete directory
Delete file
Delete registry key
Delete registry value
Get common file path
Move file
Persist via lnk shortcut
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x447e56
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa74
push ebx
push ebp
push esi
push edi
call fcn.0044608e
mov ebp, dword [eax + 4]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x248]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
push 0xf003f
xor esi, esi
push esi
push str.SOFTWARECanonPrnUninst
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], esi
call ebx
test eax, eax
jne 0x4081be
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x24c]
push edx
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x24]
push ecx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [esp + 0x30], 0x104
mov dword [esp + 0x2c], 1
mov eax, dword [ebp + 0xd0]
push eax
push edx
call esi
mov eax, dword [ebp + 0xd0]
push eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
xor eax, eax
push eax
push eax
push eax
push eax
mov ecx, 0x40
lea edi, [esp + 0x888]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x88c]
push edx
push eax
mov eax, dword [esp + 0x34]
push eax
mov dword [esp + 0x54], 0x100
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
mov edi, 1
je 0x407c4a
mov edi, dword [esp + 0x28]
mov eax, dword [ebp + 0xd0]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x2c]
push ecx
push 0xf003f
push 0
push eax
push edx
call ebx
test eax, eax
je 0x407c78
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4081be
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x30]
lea edx, [esp + 0x24c]
push edx
lea eax, [esp + 0x24]
push eax
push 0
push str.exePath
mov ebx, 0x104
push ecx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], 1
call esi
lea edx, [esp + 0x20]
push edx
mov edx, dword [esp + 0x30]
lea eax, [esp + 0x97c]
push eax
lea ecx, [esp + 0x24]
push ecx
push 0
push str.IcnPath
push edx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], 1
call esi
mov eax, dword [ebp + 0xd0]
push eax
mov eax, dword [esp + 0x1c]
push eax
call fcn.0040a010
mov eax, dword [ebp + 0xd0]
mov ecx, dword [esp + 0x20]
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
add esp, 8
push eax
push ecx
call esi
push str.SOFTWARECanonPrnUninst
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040a110
add esp, 8
test eax, eax
je 0x407d4a
cmp edi, 1
jne 0x407d4a
push str.SOFTWARECanonPrnUninst
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
jne 0x407d4a
push str.SOFTWARECANON_
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040a110
add esp, 8
test eax, eax
je 0x407d4a
push str.SOFTWARECANON_
push reloc.OLEAUT32.dll_SysReAllocString
call esi
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.00404100
cmp eax, 5
mov dword [esp + 0x30], eax
je 0x407d72
cmp eax, 6
je 0x407d72
cmp eax, 0xa
mov edx, 2
jne 0x407d77
mov edx, 0x17
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x140]
push edx
rep stosd dword es:[edi], eax
call fcn.00404690
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov esi, eax
push str.Canon_Printer_Uninstaller
push esi
push 0x44bbe8
push esi
call ebx
add esp, 0x14
test esi, esi
je 0x407e05
mov eax, dword [ebp + 0xd0]
push str..LNK
push str.Uninstaller
push eax
push esi
lea ecx, [esp + 0x150]
push str._s_s__s_s
push ecx
call ebx
add esp, 0x18
lea edx, [esp + 0x140]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
je 0x407dfb
lea eax, [esp + 0x140]
push eax
call ebp
test eax, eax
je 0x407e0b
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov dword [esp + 0x24], 1
jmp 0x407e0b
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x140]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x560]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x978]
push ecx
lea edx, [esp + 0x144]
push edx
call esi
lea eax, [esp + 0x140]
push eax
lea ecx, [esp + 0x18]
call fcn.00402470
mov ecx, dword [esp + 0x14]
push 0x5c
push ecx
mov dword [esp + 0xa94], 0
call fcn.0042dfa2
add esp, 8
test eax, eax
jne 0x407e7c
or eax, 0xffffffff
jmp 0x407e80
sub eax, dword [esp + 0x14]
push eax
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x1c]
call fcn.00403670
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0xa90], 1
call fcn.00401e30
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0xa8c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x407ec7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x564]
push ecx
call esi
mov al, byte [esp + 0x140]
test al, al
je 0x407f0b
lea edx, [esp + 0x140]
push edx
call ebp
test eax, eax
je 0x407eff
lea eax, [esp + 0x560]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x407f0b
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4080d5
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x350]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x458]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x38]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x668]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x770]
rep stosd dword es:[edi], eax
push 0x104
lea ecx, [esp + 0x774]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x407f9d
lea edx, [esp + 0x770]
push 0x5c
push edx
call fcn.0042f860
mov esi, eax
add esp, 8
test esi, esi
lea ecx, [esp + 0x350]
lea eax, [esp + 0x248]
je 0x407fab
push esi
push eax
push 0x44bbd0
push ecx
call ebx
mov byte [esi], 0
jmp 0x407fbb
lea eax, [esp + 0x248]
lea ecx, [esp + 0x350]
mov edx, dword [0x466df4]
push edx
push eax
push 0x44bbe8
push ecx
call ebx
mov edx, dword [0x466df8]
add esp, 0x10
push edx
lea eax, [esp + 0x24c]
push eax
lea ecx, [esp + 0x460]
push 0x44bbe8
push ecx
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
add esp, 0x10
push 0x104
lea edx, [esp + 0x3c]
push edx
call esi
push 0x104
lea eax, [esp + 0x3c]
push eax
call esi
test eax, eax
jne 0x408042
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0xa8c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40802a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
xor eax, eax
mov ecx, dword [esp + 0xa84]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x30]
cmp eax, 5
je 0x4080f6
cmp eax, 6
je 0x4080f6
cmp eax, 0xa
je 0x4080f6
push str.WININIT.INI
lea eax, [esp + 0x3c]
push eax
mov ecx, eax
push 0x44bbe8
push ecx
call ebx
add esp, 0x10
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
lea edx, [esp + 0x50]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x4080d5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x104
lea eax, [esp + 0x66c]
push eax
lea ecx, [esp + 0x358]
push ecx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
lea edx, [esp + 0x668]
push edx
push 0x44bf10
call fcn.004046e0
add esp, 8
test eax, eax
jne 0x408150
lea ecx, [esp + 0x14]
call fcn.00401400
xor eax, eax
mov ecx, dword [esp + 0xa84]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push str.UNINSTAL.tmp
lea eax, [esp + 0x3c]
push eax
mov ecx, eax
push 0x44bbe8
push ecx
call ebx
add esp, 0x10
lea edx, [esp + 0x38]
push edx
call ebp
lea eax, [esp + 0x350]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4081b5
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExA]
push 2
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x358]
push edx
call esi
test eax, eax
je 0x4080d5
push 4
push 0
lea eax, [esp + 0x40]
push eax
call esi
lea ecx, [esp + 0x458]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40818f
lea edx, [esp + 0x458]
push edx
call ebp
lea ecx, [esp + 0x14]
mov esi, eax
call fcn.00401400
mov eax, esi
mov ecx, dword [esp + 0xa84]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x14]
mov esi, 1
call fcn.00401400
mov eax, esi
mov ecx, dword [esp + 0xa84]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x14]
call fcn.00401400
mov ecx, dword [esp + 0xa84]
pop edi
mov eax, 1
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret