Function at 0x4074a0
Capabilities:
Check if file exists
Delete file
Delete registry key
Delete registry value
Get common file path
Move file
Query or enumerate registry value
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46faf5
mov eax, dword fs:[0]
push eax
sub esp, 0xf00
mov eax, dword [0x496534]
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
mov edi, edx
mov byte [ebp - 0xec5], cl
push 0x208
lea eax, [ebp - 0x218]
mov dword [ebp - 0xec4], 0
push 0
push eax
mov esi, 1
mov dword [ebp - 0xed0], 0
mov dword [ebp - 0xed4], 0
call fcn.0044f210
add esp, 0xc
call fcn.004350f7
push 0x208
push 0
mov ebx, dword [eax + 4]
lea eax, [ebp - 0xe48]
push eax
mov dword [ebp - 0xeec], ebx
mov dword [ebp - 0xedc], 0
call fcn.0044f210
add esp, 0xc
call fcn.004339ad
mov ecx, eax
test ecx, ecx
jne 0x407552
push 0x80004005
call fcn.00401e60
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xee0], eax
cmp byte [ebp - 0xec5], 0
mov dword [ebp - 4], 0
je 0x4075b0
cmp dword [edi + 0x14], 8
jb 0x407578
mov edi, dword [edi]
test edi, edi
jne 0x40758d
xor ecx, ecx
push ecx
push edi
lea ecx, [ebp - 0xee0]
call fcn.00401eb0
jmp 0x4075c2
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x407592
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0xee0]
call fcn.00401eb0
jmp 0x4075c2
lea eax, [ebx + 0xd4]
push eax
lea ecx, [ebp - 0xee0]
call fcn.00402a50
mov eax, dword fs:[0x2c]
mov ebx, 1
mov dword [ebp - 0xf0c], 0xf003f
mov dword [ebp - 0xf08], 0xf013f
mov ecx, dword [eax]
mov eax, dword [0x49ca60]
cmp eax, dword [ecx + 4]
jle 0x407629
push 0x49ca60
call fcn.0044b33a
add esp, 4
cmp dword [0x49ca60], 0xffffffff
jne 0x407629
mov byte [ebp - 4], bl
call fcn.004197d0
push 0x473f90
call fcn.0044b6ae
push 0x49ca60
mov byte [ebp - 4], 0
call fcn.0044b2fb
add esp, 8
mov eax, dword [0x49ca68]
mov ecx, 0x49ca68
call dword [eax + 8]
test eax, eax
mov ecx, 2
cmovne ebx, ecx
mov dword [ebp - 0xf04], ebx
mov ebx, dword [ebp - 0xee0]
cmp dword [ebx - 0xc], 0
je 0x407da4
xor edi, edi
mov dword [ebp - 0xef8], edi
nop
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0044f210
mov edi, dword [ebp + edi*4 - 0xf0c]
lea eax, [ebp - 0xec4]
add esp, 0xc
push eax
push edi
push 0
push str.SOFTWARECanonPrnUninst
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x407f9d
lea eax, [ebp - 0xed0]
mov dword [ebp - 0xed0], 0x208
push eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0xed4], 1
push eax
lea eax, [ebp - 0xed4]
push eax
push 0
push ebx
push dword [ebp - 0xec4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push ebx
push dword [ebp - 0xec4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
lea eax, [ebp - 0xedc]
push eax
push edi
push 0
push ebx
push dword [ebp - 0xec4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x407710
push dword [ebp - 0xec4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x407f9d
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0xed0]
push eax
lea eax, [ebp - 0x218]
mov dword [ebp - 0xed0], 0x208
push eax
lea eax, [ebp - 0xed4]
mov dword [ebp - 0xed4], 1
push eax
push 0
push str.exePath
push dword [ebp - 0xedc]
call esi
lea eax, [ebp - 0xed0]
mov dword [ebp - 0xed0], 0x208
push eax
lea eax, [ebp - 0xe48]
mov dword [ebp - 0xed4], 1
push eax
lea eax, [ebp - 0xed4]
push eax
push 0
push str.IcnPath
push dword [ebp - 0xedc]
call esi
mov ecx, dword [ebp - 0xec4]
mov edx, ebx
call fcn.00409af0
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push ebx
push dword [ebp - 0xec4]
call esi
lea eax, [ebp - 0xed8]
mov dword [ebp - 0xed8], 0
push eax
push edi
push 0
push str.SOFTWARE
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x407810
mov ecx, dword [ebp - 0xed8]
mov edx, str.CanonPrnUninst
call fcn.00409c50
test eax, eax
je 0x407810
push str.CanonPrnUninst
push dword [ebp - 0xed8]
call esi
test eax, eax
jne 0x407810
mov ecx, dword [ebp - 0xed8]
mov edx, str.Canon
call fcn.00409c50
test eax, eax
je 0x407810
push str.Canon
push dword [ebp - 0xed8]
call esi
push dword [ebp - 0xedc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push dword [ebp - 0xed8]
call esi
push dword [ebp - 0xec4]
call esi
cmp byte [ebp - 0xec5], 0
jne 0x407957
push 0x208
lea eax, [ebp - 0x830]
push 0
push eax
call fcn.0044f210
mov esi, dword [ebp - 0xeec]
lea eax, [ebp - 0x830]
mov dword [ebp - 0xec4], 0
push dword [esi + 0xd4]
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push str._sUninstall_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x1c
lea eax, [ebp - 0xec4]
push eax
push edi
push 0
lea eax, [ebp - 0x830]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x407957
push str.Publisher
push dword [ebp - 0xec4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push str.DisplayName
push dword [ebp - 0xec4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push str.DisplayVersion
push dword [ebp - 0xec4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push str.DisplayIcon
push dword [ebp - 0xec4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push str.UninstallString
push dword [ebp - 0xec4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push dword [ebp - 0xec4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.SOFTWAREMicrosoftWindowsCurrentVersion
lea eax, [ebp - 0x830]
push str._sUninstall
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0xec4]
push eax
push edi
push 0
lea eax, [ebp - 0x830]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push dword [esi + 0xd4]
push dword [ebp - 0xec4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
push dword [ebp - 0xec4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x208
lea eax, [ebp - 0x628]
push 0
push eax
call fcn.0044f210
push 0x208
lea eax, [ebp - 0xa38]
push 0
push eax
call fcn.0044f210
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.0044f210
push 0x208
lea eax, [ebp - 0xc40]
push 0
push eax
call fcn.0044f210
add esp, 0x30
mov dword [ebp - 0xe4c], 7
xor eax, eax
mov dword [ebp - 0xe50], 0
lea ecx, [ebp - 0xe60]
mov word [ebp - 0xe60], ax
push eax
push 0x486438
call fcn.004037c0
push 0x104
lea eax, [ebp - 0xc40]
mov byte [ebp - 4], 2
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp byte [ebp - 0xec5], 0
mov dword [ebp - 0xef0], eax
je 0x407c44
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0xecc]
call fcn.00401ff0
mov byte [ebp - 4], 3
call fcn.004339ad
test eax, eax
je 0x407548
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0xee8], esi
mov byte [ebp - 4], 4
call fcn.004339ad
test eax, eax
je 0x407548
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0xee4], edi
mov byte [ebp - 4], 5
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x100
or eax, ecx
jge 0x407a81
push 0x100
lea ecx, [ebp - 0xee4]
call fcn.00401cb0
mov edi, dword [ebp - 0xee4]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 3
or eax, ecx
jge 0x407aa6
push 3
lea ecx, [ebp - 0xee8]
call fcn.00401cb0
mov esi, dword [ebp - 0xee8]
push 0
push 0
push 0
push 0
push 0x100
push edi
push 3
push esi
push dword [ebp - 0xecc]
call fcn.004563a3
push dword [esi - 8]
push esi
call fcn.00451f0d
add esp, 0x2c
test eax, eax
js 0x407fbb
cmp eax, dword [esi - 8]
jg 0x407fbb
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
push dword [edi - 8]
push edi
call fcn.00451f0d
add esp, 8
test eax, eax
js 0x407fbb
cmp eax, dword [edi - 8]
jg 0x407fbb
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
lea eax, [ebp - 0xee4]
push eax
lea eax, [ebp - 0xee8]
push eax
lea eax, [ebp - 0xefc]
push eax
call fcn.00408c90
add esp, 0xc
push eax
lea ecx, [ebp - 0xecc]
mov byte [ebp - 4], 6
call fcn.00402a50
mov byte [ebp - 4], 5
or eax, 0xffffffff
mov edx, dword [ebp - 0xefc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407b5d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0xecc]
mov edx, dword [eax - 0xc]
lea ecx, [edx - 1]
test ecx, ecx
js 0x407fbb
cmp ecx, edx
jg 0x407fbb
cmp word [eax + ecx*2], 0x5c
jne 0x407bce
lea eax, [edx - 1]
push eax
lea eax, [ebp - 0xf00]
push eax
lea ecx, [ebp - 0xecc]
call fcn.00408d40
push eax
lea ecx, [ebp - 0xecc]
mov byte [ebp - 4], 7
call fcn.00402a50
mov byte [ebp - 4], 5
or eax, 0xffffffff
mov edx, dword [ebp - 0xf00]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407bc8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0xecc]
push eax
lea eax, [ebp - 0x218]
push 0x104
push eax
call fcn.00451ea9
add esp, 0xc
mov byte [ebp - 4], 4
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x407bff
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
or edi, 0xffffffff
mov byte [ebp - 4], 3
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x407c1d
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 2
mov eax, edi
mov edx, dword [ebp - 0xecc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407c3e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0xef0]
mov edi, dword [ebp - 0xeec]
test eax, eax
je 0x407c92
cmp dword [edi + 0x380], 0
jne 0x407c92
lea eax, [ebp - 0xc40]
push 0x5c
push eax
call fcn.0044e876
mov esi, eax
add esp, 8
lea eax, [ebp - 0x218]
test esi, esi
je 0x407c98
push esi
push eax
lea eax, [ebp - 0x628]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
xor eax, eax
mov word [esi], ax
jmp 0x407cb3
lea eax, [ebp - 0x218]
push 0x486100
push eax
lea eax, [ebp - 0x628]
push 0x485f30
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push str.UNINSTAL.ini
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0xa38]
push 0x485f30
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov esi, dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x420]
add esp, 0x10
push 0x104
push eax
call esi
push 0x104
lea eax, [ebp - 0x420]
push eax
call esi
test eax, eax
je 0x407d69
push str.UNINSTAL.tmp
lea eax, [ebp - 0x420]
push eax
push 0x485f30
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x420]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x420]
push eax
call esi
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407e12
cmp dword [edi + 0x380], 0
je 0x407de3
lea eax, [ebp - 0x628]
push eax
call esi
test eax, eax
jne 0x407e12
mov eax, dword [ebp - 0xe4c]
cmp eax, 8
jb 0x407d87
inc eax
lea ecx, [ebp - 0xe60]
push eax
push dword [ebp - 0xe60]
call fcn.004038d0
xor eax, eax
mov dword [ebp - 0xe4c], 7
mov dword [ebp - 0xe50], 0
mov word [ebp - 0xe60], ax
xor esi, esi
mov dword [ebp - 4], 0xffffffff
add ebx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x407dc5
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
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.0044ae75
mov esp, ebp
pop ebp
ret
push 2
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
je 0x407d69
push 4
push 0
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
lea eax, [ebp - 0xa38]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407e30
lea eax, [ebp - 0xa38]
push eax
call esi
mov esi, eax
jmp 0x407e35
mov esi, 1
test esi, esi
je 0x407f0d
push str.InsCmn.dll
lea ecx, [ebp - 0xec0]
call fcn.00402f20
mov esi, eax
push 0x4857e0
lea ecx, [ebp - 0xea8]
mov byte [ebp - 4], 8
call fcn.00402f20
push eax
lea edx, [ebp - 0x218]
mov byte [ebp - 4], 9
lea ecx, [ebp - 0xe90]
call fcn.00408e10
push esi
mov edx, eax
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0xe78]
call fcn.00408e70
add esp, 8
lea ecx, [ebp - 0xe60]
push eax
call fcn.00408c10
lea ecx, [ebp - 0xe78]
call fcn.004039d0
lea ecx, [ebp - 0xe90]
call fcn.004039d0
lea ecx, [ebp - 0xea8]
call fcn.004039d0
lea ecx, [ebp - 0xec0]
mov byte [ebp - 4], 2
call fcn.004039d0
cmp dword [ebp - 0xe4c], 8
lea eax, [ebp - 0xe60]
cmovae eax, dword [ebp - 0xe60]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x407f08
cmp dword [ebp - 0xe4c], 8
lea eax, [ebp - 0xe60]
cmovae eax, dword [ebp - 0xe60]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
jmp 0x407f0d
mov esi, 1
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0xef4]
call fcn.00401ff0
lea eax, [ebp - 0xef4]
mov byte [ebp - 4], 0xb
lea ecx, [edi + 0xdc]
push eax
call fcn.00402a50
mov byte [ebp - 4], 2
or eax, 0xffffffff
mov edx, dword [ebp - 0xef4]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407f57
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp esi, 1
jne 0x407f8a
push dword [edi + 0x5cc]
lea eax, [ebp - 0x218]
push eax
push 0x485f30
lea eax, [edi + 0x178]
push 0x104
push eax
call fcn.00409370
add esp, 0x14
mov dword [edi + 0x174], esi
jmp 0x407f8e
test esi, esi
je 0x407fc5
lea ecx, [ebp - 0xe60]
mov byte [ebp - 4], 0
call fcn.004039d0
mov edi, dword [ebp - 0xef8]
inc edi
mov dword [ebp - 0xef8], edi
cmp edi, dword [ebp - 0xf04]
jl 0x407660
jmp 0x407da6
push 0x80070057
call fcn.00401e60
lea ecx, [ebp - 0xe60]
call fcn.004039d0
jmp 0x407da6