Function at 0x40a9c0
Capabilities:
Delete directory
Delete file
Delete registry key
Enumerate files on windows
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x456ee6
mov eax, dword fs:[0]
push eax
sub esp, 0x360
mov eax, dword [0x46be4c]
xor eax, esp
mov dword [esp + 0x35c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x46be4c]
xor eax, esp
push eax
lea eax, [esp + 0x374]
mov dword fs:[0], eax
push 0x104
lea eax, [esp + 0x270]
push 0
push eax
call fcn.004413c0
push 0x104
lea ecx, [esp + 0x178]
push 0
push ecx
call fcn.004413c0
add esp, 0x18
lea edx, [esp + 0x18]
push edx
push 0x20019
push 0
push str.SOFTWARECanonGetDev
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x40aa50
mov eax, 1
jmp 0x40ac41
lea eax, [esp + 0x24]
push eax
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x270]
push ecx
lea edx, [esp + 0x24]
push edx
push 0
push str.Path
push eax
mov dword [esp + 0x3c], 0x104
mov dword [esp + 0x34], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x40aa9a
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x40ac41
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push str.SOFTWARECanonGetDev
push 0x80000002
call esi
push str.SOFTWARECANON_
push 0x80000002
call fcn.0040cf30
add esp, 8
cmp eax, 1
jne 0x40aada
push str.SOFTWARECANON_
push 0x80000002
call esi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x26c]
push eax
lea ecx, [esp + 0x16c]
push str._s.
push ecx
call edi
add esp, 0xc
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x16c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40ab70
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileA]
push 0x104
lea ecx, [esp + 0x16c]
push 0
push ecx
call fcn.004413c0
lea edx, [esp + 0x60]
push edx
lea eax, [esp + 0x27c]
push eax
lea ecx, [esp + 0x17c]
push 0x45ce28
push ecx
call edi
add esp, 0x1c
lea edx, [esp + 0x168]
push edx
call ebp
lea eax, [esp + 0x28]
push eax
push esi
call ebx
test eax, eax
jne 0x40ab20
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
lea ecx, [esp + 0x26c]
push ecx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call edi
lea edx, [esp + 0x26c]
push edx
lea ecx, [esp + 0x18]
call fcn.004027b0
mov eax, dword [esp + 0x14]
push 0x5c
push eax
mov dword [esp + 0x384], 0
call fcn.00440e55
add esp, 8
test eax, eax
jne 0x40abbe
or eax, 0xffffffff
jmp 0x40abc2
sub eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00407350
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x380], 1
call fcn.00402020
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x37c], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ac0b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
push ecx
call esi
call edi
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov dword [esp + 0x37c], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ac3f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
mov ecx, dword [esp + 0x374]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x35c]
xor ecx, esp
call fcn.0044027a
add esp, 0x36c
ret