Function at 0x409c00
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
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x456e41
mov eax, dword fs:[0]
push eax
sub esp, 0xa4c
mov eax, dword [0x46be4c]
xor eax, esp
mov dword [esp + 0xa48], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x46be4c]
xor eax, esp
push eax
lea eax, [esp + 0xa60]
mov dword fs:[0], eax
call fcn.004316f5
mov esi, dword [eax + 4]
xor edi, edi
mov ebp, 0x104
push ebp
lea eax, [esp + 0x244]
push edi
push eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x38], edi
call fcn.004413c0
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
push 0xf003f
push edi
push str.SOFTWARECanonPrnUninst
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x409c8b
lea eax, [edi + 1]
jmp 0x40a4e9
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x244]
push ecx
lea edx, [esp + 0x28]
push edx
mov ebx, 1
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebx
mov eax, dword [esi + 0xd4]
push eax
mov eax, dword [esp + 0x28]
push eax
call edi
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x244]
push edx
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebx
mov eax, dword [esi + 0xd8]
push 0
push eax
push edx
call edi
mov eax, dword [esi + 0xd4]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push eax
mov eax, dword [esp + 0x18]
push eax
call ebp
mov eax, dword [esi + 0xd8]
mov ecx, dword [esp + 0x14]
push eax
push ecx
call ebp
push 0x100
lea edx, [esp + 0x960]
push 0
push edx
mov dword [esp + 0x40], 0x100
call fcn.004413c0
mov edx, dword [esp + 0x20]
add esp, 0xc
push 0
push 0
push 0
push 0
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x970]
push ecx
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, 0x103
jne 0x409d57
mov dword [esp + 0x24], ebx
mov eax, dword [esi + 0xd4]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x28]
push ecx
push 0xf003f
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x409d8b
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
jmp 0x40a4e9
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x244]
push edx
lea eax, [esp + 0x28]
push eax
push 0
push str.exePath
mov ebp, 0x104
push ecx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebx
call edi
lea edx, [esp + 0x1c]
push edx
mov edx, dword [esp + 0x2c]
lea eax, [esp + 0x550]
push eax
lea ecx, [esp + 0x28]
push ecx
push 0
push str.IcnPath
push edx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebx
call edi
mov eax, dword [esi + 0xd4]
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.0040ce00
mov eax, dword [esi + 0xd4]
mov ecx, dword [esp + 0x1c]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
add esp, 8
push eax
push ecx
call ebp
push str.SOFTWARECanonPrnUninst
push 0x80000002
call fcn.0040cf30
add esp, 8
test eax, eax
je 0x409e56
cmp dword [esp + 0x24], ebx
jne 0x409e56
push str.SOFTWARECanonPrnUninst
push 0x80000002
call ebp
test eax, eax
jne 0x409e56
push str.SOFTWARECANON_
push 0x80000002
call fcn.0040cf30
add esp, 8
test eax, eax
je 0x409e56
push str.SOFTWARECANON_
push 0x80000002
call ebp
mov edx, dword [esp + 0x28]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edx
call ebx
mov eax, dword [esi + 0xd8]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x28]
push ecx
push 0xf003f
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x409f61
lea eax, [esp + 0x1c]
push eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x244]
push ecx
lea edx, [esp + 0x28]
push edx
push 0
push str.exePath
push eax
mov dword [esp + 0x34], 0x104
mov dword [esp + 0x38], 1
call edi
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x550]
push edx
lea eax, [esp + 0x28]
push eax
push 0
push str.IcnPath
push ecx
mov dword [esp + 0x34], 0x104
mov dword [esp + 0x38], 1
call edi
mov eax, dword [esi + 0xd8]
mov edx, dword [esp + 0x14]
push eax
push edx
call fcn.0040ce00
mov eax, dword [esi + 0xd8]
add esp, 8
push eax
mov eax, dword [esp + 0x18]
push eax
call ebp
push str.SOFTWARECanonPrnUninst
push 0x80000002
call fcn.0040cf30
add esp, 8
test eax, eax
je 0x409f5a
cmp dword [esp + 0x24], 1
jne 0x409f5a
push str.SOFTWARECanonPrnUninst
push 0x80000002
call ebp
test eax, eax
jne 0x409f5a
push str.SOFTWARECANON_
push 0x80000002
call fcn.0040cf30
add esp, 8
test eax, eax
je 0x409f5a
push str.SOFTWARECANON_
push 0x80000002
call ebp
mov ecx, dword [esp + 0x28]
push ecx
call ebx
mov edx, dword [esp + 0x14]
push edx
call ebx
call fcn.004048c0
cmp eax, 5
mov dword [esp + 0x30], eax
je 0x409f85
cmp eax, 6
je 0x409f85
cmp eax, 0xa
mov edi, 2
jne 0x409f8a
mov edi, 0x17
push 0x104
lea eax, [esp + 0x3c]
push 0
push eax
call fcn.004413c0
push edi
call fcn.004050e0
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
mov edi, eax
push str.Canon_Printer_Uninstaller
push edi
push 0x45ce28
push edi
call ebp
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
add esp, 0x20
test edi, edi
je 0x40a05e
mov ecx, dword [esi + 0xd4]
push str..LNK
push str.Uninstaller
push ecx
push edi
lea edx, [esp + 0x48]
push str._s_s__s_s
push edx
call ebp
add esp, 0x18
lea eax, [esp + 0x38]
push eax
call ebx
test eax, eax
je 0x40a00a
lea ecx, [esp + 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x40a012
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov dword [esp + 0x2c], 1
mov edx, dword [esi + 0xd8]
push str..LNK
push str.Uninstaller
push edx
push edi
lea eax, [esp + 0x48]
push str._s_s__s_s
push eax
call ebp
add esp, 0x18
lea ecx, [esp + 0x38]
push ecx
call ebx
test eax, eax
je 0x40a05e
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x40a056
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x40a05e
mov dword [esp + 0x2c], 0
push edi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push 0x104
lea eax, [esp + 0x3c]
push 0
push eax
call fcn.004413c0
push 0x104
lea ecx, [esp + 0x660]
push 0
push ecx
call fcn.004413c0
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 0x18
lea edx, [esp + 0x54c]
push edx
lea eax, [esp + 0x3c]
push eax
call edi
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x1c]
call fcn.004027b0
mov edx, dword [esp + 0x18]
push 0x5c
push edx
mov dword [esp + 0xa70], 0
call fcn.00440e55
add esp, 8
test eax, eax
jne 0x40a0d3
or eax, 0xffffffff
jmp 0x40a0d7
sub eax, dword [esp + 0x18]
push eax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x20]
call fcn.00407350
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0xa6c], 1
call fcn.00402020
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0xa68], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a120
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x654]
push edx
call edi
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x30], eax
call ebx
test eax, eax
je 0x40a170
cmp byte [esp + 0x38], 0
je 0x40a170
lea edx, [esp + 0x38]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x40a168
lea eax, [esp + 0x650]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x40a170
mov dword [esp + 0x2c], 0
push 0x104
lea ecx, [esp + 0x348]
push 0
push ecx
call fcn.004413c0
push 0x104
lea edx, [esp + 0x458]
push 0
push edx
call fcn.004413c0
push 0x104
lea eax, [esp + 0x158]
push 0
push eax
call fcn.004413c0
push 0x104
lea ecx, [esp + 0x77c]
push 0
push ecx
call fcn.004413c0
push 0x104
lea edx, [esp + 0x88c]
push 0
push edx
call fcn.004413c0
add esp, 0x3c
push 0x104
lea eax, [esp + 0x85c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x40a24a
cmp dword [esi + 0x3bc], 0
jne 0x40a24a
lea ecx, [esp + 0x858]
push 0x5c
push ecx
call fcn.004425e0
mov edi, eax
add esp, 8
test edi, edi
je 0x40a22e
push edi
lea edx, [esp + 0x244]
push edx
lea eax, [esp + 0x34c]
push 0x45ccb8
push eax
call ebp
mov byte [edi], 0
jmp 0x40a266
push str.UNINSTAL.exe
lea ecx, [esp + 0x244]
push ecx
push 0x45ce28
lea edx, [esp + 0x350]
push edx
jmp 0x40a264
push str.UNINSTAL.exe
lea eax, [esp + 0x244]
push eax
push 0x45ce28
lea ecx, [esp + 0x350]
push ecx
call ebp
add esp, 0x10
push str.Uninst.ini
lea edx, [esp + 0x244]
push edx
lea eax, [esp + 0x450]
push 0x45ce28
push eax
call ebp
mov edi, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
add esp, 0x10
push 0x104
lea ecx, [esp + 0x140]
push ecx
call edi
push 0x104
lea edx, [esp + 0x140]
push edx
call edi
test eax, eax
jne 0x40a2e2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0xa68], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a2db
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40a4e9
mov eax, dword [esp + 0x30]
cmp eax, 5
je 0x40a379
cmp eax, 6
je 0x40a379
cmp eax, 0xa
je 0x40a379
push str.WININIT.INI
lea ecx, [esp + 0x140]
push ecx
mov edx, ecx
push 0x45ce28
push edx
call ebp
add esp, 0x10
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
lea eax, [esp + 0x154]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x40a3db
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x104
lea ecx, [esp + 0x758]
push ecx
lea edx, [esp + 0x34c]
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
lea eax, [esp + 0x754]
push eax
push 0x45d280
call fcn.00405180
add esp, 8
jmp 0x40a3d7
push str.UNINSTAL.tmp
lea ecx, [esp + 0x140]
push ecx
mov edx, ecx
push 0x45ce28
push edx
call ebp
add esp, 0x10
push 0x80
lea eax, [esp + 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x13c]
push ecx
call edi
lea edx, [esp + 0x344]
push edx
call ebx
test eax, eax
je 0x40a417
cmp dword [esi + 0x3bc], 0
je 0x40a3eb
lea eax, [esp + 0x344]
push eax
call edi
test eax, eax
jne 0x40a417
lea ecx, [esp + 0x18]
call fcn.00401660
xor eax, eax
jmp 0x40a4e9
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileExA]
push 2
lea ecx, [esp + 0x140]
push ecx
lea edx, [esp + 0x34c]
push edx
call edi
test eax, eax
je 0x40a3db
push 4
push 0
lea eax, [esp + 0x144]
push eax
call edi
lea ecx, [esp + 0x448]
push ecx
call ebx
test eax, eax
je 0x40a437
lea edx, [esp + 0x448]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edi, eax
jmp 0x40a43c
mov edi, 1
lea eax, [esp + 0x240]
push eax
lea ecx, [esp + 0x28]
call fcn.004027b0
lea edx, [esp + 0x24]
lea ecx, [esi + 0x104]
push edx
mov byte [esp + 0xa6c], 2
call fcn.00402020
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0xa68], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a48d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp edi, 1
jne 0x40a4bc
lea ecx, [esi + 0x1b4]
push ecx
lea edx, [esp + 0x244]
push edx
lea eax, [esi + 0x2b8]
push 0x45ce28
push eax
call ebp
mov dword [esi + 0x1b0], edi
mov edi, dword [esp + 0x3c]
add esp, 0x10
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0xa68], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a4e7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0xa60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa48]
xor ecx, esp
call fcn.0044027a
add esp, 0xa58
ret