Function at 0x403bf0
Capabilities:
Delete directory
Delete registry value
Enumerate files on windows
Get installed programs
Persist via run registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41e08c
mov eax, dword fs:[0]
push eax
sub esp, 0xa7c
mov eax, dword [0x4251d4]
xor eax, ebp
mov dword [ebp - 0x20], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.00403950
push 0
push 0
lea ecx, [ebp - 0xcc]
call fcn.004077c0
mov eax, dword [0x41ff6c]
push eax
push 0
push 0x4365b8
lea ecx, [ebp - 0xcc]
call fcn.00407220
mov dword [ebp - 4], 0
mov ecx, dword [0x41ff6c]
mov dword [ebp - 0x7f4], ecx
push 0x41f450
call fcn.00411130
add esp, 4
mov dword [ebp - 0x7f0], eax
mov edx, dword [ebp - 0x7f0]
push edx
mov eax, dword [ebp - 0x7f4]
push eax
push 0x41f450
lea ecx, [ebp - 0xcc]
call fcn.00407610
mov dword [ebp - 0x7f8], eax
mov ecx, dword [ebp - 0x7f8]
push ecx
push 0
lea edx, [ebp - 0x60c]
push edx
lea ecx, [ebp - 0xcc]
call fcn.004065d0
mov dword [ebp - 0xa44], eax
mov eax, dword [ebp - 0xa44]
mov dword [ebp - 0x7fc], eax
mov byte [ebp - 4], 1
mov ecx, dword [0x41ff6c]
push ecx
push 0
mov edx, dword [ebp - 0x7fc]
push edx
lea ecx, [ebp - 0xcc]
call fcn.00407220
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x60c]
call fcn.004077c0
push str._n_____DIAS_installation_folder___
lea ecx, [ebp - 0x628]
call fcn.00406560
mov byte [ebp - 4], 2
lea eax, [ebp - 0x628]
push eax
call fcn.00401580
add esp, 4
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x628]
call fcn.004077c0
lea ecx, [ebp - 0xcc]
push ecx
call fcn.00405040
add esp, 4
mov dword [ebp - 0x14], eax
push 0
push 0
lea ecx, [ebp - 0xb0]
call fcn.004077c0
mov edx, dword [0x41ff6c]
push edx
push 0
lea eax, [ebp - 0xcc]
push eax
lea ecx, [ebp - 0xb0]
call fcn.00407220
mov byte [ebp - 4], 3
mov ecx, dword [0x41ff6c]
mov dword [ebp - 0x814], ecx
push 0x41f450
call fcn.00411130
add esp, 4
mov dword [ebp - 0x810], eax
mov edx, dword [ebp - 0x810]
push edx
mov eax, dword [ebp - 0x814]
push eax
push 0x41f450
lea ecx, [ebp - 0xb0]
call fcn.00407610
mov dword [ebp - 0x818], eax
mov ecx, dword [ebp - 0x818]
push ecx
push 0
lea edx, [ebp - 0x644]
push edx
lea ecx, [ebp - 0xb0]
call fcn.004065d0
mov dword [ebp - 0xa48], eax
mov eax, dword [ebp - 0xa48]
mov dword [ebp - 0x81c], eax
mov byte [ebp - 4], 4
mov ecx, dword [0x41ff6c]
push ecx
push 0
mov edx, dword [ebp - 0x81c]
push edx
lea ecx, [ebp - 0xb0]
call fcn.00407220
mov byte [ebp - 4], 3
push 0
push 1
lea ecx, [ebp - 0x644]
call fcn.004077c0
push str._n_____Canon_folder___
lea ecx, [ebp - 0x660]
call fcn.00406560
mov byte [ebp - 4], 5
lea eax, [ebp - 0x660]
push eax
call fcn.00401580
add esp, 4
mov byte [ebp - 4], 3
push 0
push 1
lea ecx, [ebp - 0x660]
call fcn.004077c0
lea ecx, [ebp - 0xb0]
push ecx
push str.__del_dir_:
lea edx, [ebp - 0x67c]
push edx
call fcn.0040a7c0
add esp, 0xc
mov dword [ebp - 0xa4c], eax
mov eax, dword [ebp - 0xa4c]
mov dword [ebp - 0xa50], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0xa50]
push ecx
call fcn.00401580
add esp, 4
mov byte [ebp - 4], 3
push 0
push 1
lea ecx, [ebp - 0x67c]
call fcn.004077c0
mov dword [ebp - 0x20c], 0
push 0x13c
push 0
lea edx, [ebp - 0x208]
push edx
call fcn.004114d0
add esp, 0xc
push 0x41fb0c
lea eax, [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x5c]
push ecx
call fcn.0040a870
add esp, 0xc
mov byte [ebp - 4], 7
mov byte [ebp - 0xd], 0
cmp dword [ebp - 0x44], 0x10
jb 0x403ee2
mov edx, dword [ebp - 0x58]
mov dword [ebp - 0xa54], edx
jmp 0x403eeb
lea eax, [ebp - 0x58]
mov dword [ebp - 0xa54], eax
lea ecx, [ebp - 0x20c]
push ecx
mov edx, dword [ebp - 0xa54]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x24c], eax
cmp dword [ebp - 0x24c], 0
je 0x403fa4
push 0x41fb08
lea eax, [ebp - 0x1e0]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x403f75
push 0x41fb04
lea ecx, [ebp - 0x1e0]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x403f75
mov edx, dword [ebp - 0x20c]
and edx, 0x10
je 0x403f6f
push 4
lea eax, [ebp - 0x1e0]
push eax
push str.DIAS
call fcn.004117d2
add esp, 0xc
test eax, eax
jne 0x403f67
jmp 0x403f75
mov byte [ebp - 0xd], 1
jmp 0x403f8d
mov byte [ebp - 0xd], 1
jmp 0x403f8d
lea ecx, [ebp - 0x20c]
push ecx
mov edx, dword [ebp - 0x24c]
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x403f12
mov eax, dword [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [ebp - 0x24c], 0
movzx ecx, byte [ebp - 0xd]
test ecx, ecx
je 0x403fe4
push str.____not_empty._skipped_deletion.
lea ecx, [ebp - 0x698]
call fcn.00406560
mov byte [ebp - 4], 8
lea edx, [ebp - 0x698]
push edx
call fcn.00401580
add esp, 4
mov byte [ebp - 4], 7
push 0
push 1
lea ecx, [ebp - 0x698]
call fcn.004077c0
jmp 0x404027
cmp dword [ebp - 0x98], 0x10
jb 0x403ffb
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0xa58], eax
jmp 0x404007
lea ecx, [ebp - 0xac]
mov dword [ebp - 0xa58], ecx
mov edx, dword [ebp - 0xa58]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x404027
lea eax, [ebp - 0xb0]
push eax
call fcn.004058e0
add esp, 4
call fcn.00403920
movzx ecx, al
test ecx, ecx
jne 0x404188
push 0x436628
lea ecx, [ebp - 0x264]
call fcn.00406710
mov byte [ebp - 4], 9
lea edx, [ebp - 0x845]
mov dword [ebp - 0x844], edx
push 0
push 0
lea ecx, [ebp - 0x280]
call fcn.004077c0
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x254]
sub eax, dword [ebp - 0x258]
cdq
mov ecx, 0x1c
idiv ecx
neg eax
sbb eax, eax
add eax, 1
movzx edx, al
test edx, edx
jne 0x404157
push 0x41f450
push 0x4365f0
lea eax, [ebp - 0x6b4]
push eax
call fcn.0040a870
add esp, 0xc
mov dword [ebp - 0xa5c], eax
mov ecx, dword [ebp - 0xa5c]
mov dword [ebp - 0xa60], ecx
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x264]
call fcn.004069f0
push eax
mov edx, dword [ebp - 0xa60]
push edx
lea eax, [ebp - 0x6d0]
push eax
call fcn.0040a940
add esp, 0xc
mov dword [ebp - 0xa64], eax
mov ecx, dword [ebp - 0xa64]
mov dword [ebp - 0x868], ecx
mov byte [ebp - 4], 0xc
mov edx, dword [0x41ff6c]
push edx
push 0
mov eax, dword [ebp - 0x868]
push eax
lea ecx, [ebp - 0x280]
call fcn.00407220
mov byte [ebp - 4], 0xb
push 0
push 1
lea ecx, [ebp - 0x6d0]
call fcn.004077c0
mov byte [ebp - 4], 0xa
push 0
push 1
lea ecx, [ebp - 0x6b4]
call fcn.004077c0
lea ecx, [ebp - 0x280]
push ecx
call fcn.00404ea0
add esp, 4
lea ecx, [ebp - 0x264]
call fcn.00406b80
jmp 0x40406a
mov byte [ebp - 4], 9
push 0
push 1
lea ecx, [ebp - 0x280]
call fcn.004077c0
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x264]
call fcn.00407a70
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x264]
call fcn.0040eab0
push str._n_____registry_entries____
lea ecx, [ebp - 0x6ec]
call fcn.00406560
mov byte [ebp - 4], 0xe
lea edx, [ebp - 0x6ec]
push edx
call fcn.00401580
add esp, 4
mov byte [ebp - 4], 7
push 0
push 1
lea ecx, [ebp - 0x6ec]
call fcn.004077c0
lea eax, [ebp - 0x40]
push eax
push 0x2001f
push 0
push str.SOFTWARECanonCBTSETUPCBTUser
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40430c
push str.SOFTWARECanonCBTSETUPCBTUser
lea ecx, [ebp - 0x29c]
call fcn.00406560
mov byte [ebp - 4], 0xf
push str.DIAS
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov dword [ebp - 0x210], eax
lea edx, [ebp - 0x29c]
push edx
push 0x41fad0
lea eax, [ebp - 0x708]
push eax
call fcn.0040a7c0
add esp, 0xc
mov dword [ebp - 0xa68], eax
mov ecx, dword [ebp - 0xa68]
mov dword [ebp - 0xa6c], ecx
mov byte [ebp - 4], 0x10
push str.__Value:
mov edx, dword [ebp - 0xa6c]
push edx
lea eax, [ebp - 0x724]
push eax
call fcn.0040a870
add esp, 0xc
mov dword [ebp - 0xa70], eax
mov ecx, dword [ebp - 0xa70]
mov dword [ebp - 0xa74], ecx
mov byte [ebp - 4], 0x11
push str.DIAS
mov edx, dword [ebp - 0xa74]
push edx
lea eax, [ebp - 0x740]
push eax
call fcn.0040a870
add esp, 0xc
mov dword [ebp - 0xa78], eax
mov ecx, dword [ebp - 0xa78]
mov dword [ebp - 0xa7c], ecx
mov byte [ebp - 4], 0x12
mov edx, dword [ebp - 0xa7c]
push edx
call fcn.00401580
add esp, 4
mov byte [ebp - 4], 0x11
push 0
push 1
lea ecx, [ebp - 0x740]
call fcn.004077c0
mov byte [ebp - 4], 0x10
push 0
push 1
lea ecx, [ebp - 0x724]
call fcn.004077c0
mov byte [ebp - 4], 0xf
push 0
push 1
lea ecx, [ebp - 0x708]
call fcn.004077c0
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 7
push 0
push 1
lea ecx, [ebp - 0x29c]
call fcn.004077c0
call fcn.00403920
movzx edx, al
test edx, edx
jne 0x40438e
push str.SOFTWARECanonCBT
lea ecx, [ebp - 0x75c]
call fcn.00406560
mov byte [ebp - 4], 0x13
lea eax, [ebp - 0x75c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00404a70
add esp, 8
mov byte [ebp - 4], 7
push 0
push 1
lea ecx, [ebp - 0x75c]
call fcn.004077c0
push str.SOFTWARECanonCBT
lea ecx, [ebp - 0x778]
call fcn.00406560
mov byte [ebp - 4], 0x14
lea ecx, [ebp - 0x778]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004048a0
add esp, 8
mov byte [ebp - 4], 7
push 0
push 1
lea ecx, [ebp - 0x778]
call fcn.004077c0
push str.SOFTWARECanonDIAS
lea ecx, [ebp - 0x78]
call fcn.00406560
mov byte [ebp - 4], 0x15
lea edx, [ebp - 0x78]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00404a70
add esp, 8
lea eax, [ebp - 0x78]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004048a0
add esp, 8
push str.SOFTWARECanonDIAS
lea ecx, [ebp - 0x3c]
call fcn.00406560
mov byte [ebp - 4], 0x16
mov ecx, dword [0x41ff6c]
mov dword [ebp - 0x8ec], ecx
push 0x41f450
call fcn.00411130
add esp, 4
mov dword [ebp - 0x8e8], eax
mov edx, dword [ebp - 0x8e8]
push edx
mov eax, dword [ebp - 0x8ec]
push eax
push 0x41f450
lea ecx, [ebp - 0x3c]
call fcn.00407610
mov dword [ebp - 0x8f0], eax
mov ecx, dword [ebp - 0x8f0]
push ecx
push 0
lea edx, [ebp - 0x794]
push edx
lea ecx, [ebp - 0x3c]
call fcn.004065d0
mov dword [ebp - 0xa80], eax
mov eax, dword [ebp - 0xa80]
mov dword [ebp - 0x8f4], eax
mov byte [ebp - 4], 0x17
mov ecx, dword [0x41ff6c]
push ecx
push 0
mov edx, dword [ebp - 0x8f4]
push edx
lea ecx, [ebp - 0x3c]
call fcn.00407220
mov byte [ebp - 4], 0x16
push 0
push 1
lea ecx, [ebp - 0x794]
call fcn.004077c0
cmp dword [ebp - 0x24], 0x10
jb 0x40447c
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0xa84], eax
jmp 0x404485
lea ecx, [ebp - 0x38]
mov dword [ebp - 0xa84], ecx
lea edx, [ebp - 0x40]
push edx
push 0x2001f
push 0
mov eax, dword [ebp - 0xa84]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404570
mov dword [ebp - 0x3bc], 0
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x3b0], 0x104
mov ecx, 1
test ecx, ecx
je 0x40454c
lea edx, [ebp - 0x3b8]
push edx
push 0
push 0
push 0
lea eax, [ebp - 0x3b0]
push eax
lea ecx, [ebp - 0x3ac]
push ecx
mov edx, dword [ebp - 0x3bc]
push edx
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0x103
jne 0x404511
jmp 0x40454c
lea ecx, [ebp - 0x3ac]
test ecx, ecx
jne 0x40452e
lea edx, [ebp - 0x3ac]
push edx
call fcn.00411130
add esp, 4
test eax, eax
je 0x404538
mov dword [ebp - 0x2a0], 1
mov eax, dword [ebp - 0x3bc]
add eax, 1
mov dword [ebp - 0x3bc], eax
jmp 0x4044c8
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x2a0], 0
jne 0x404570
lea edx, [ebp - 0x3c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004048a0
add esp, 8
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstallDIAS
lea ecx, [ebp - 0x94]
call fcn.00406560
mov byte [ebp - 4], 0x18
push str._n____registry_the_installer_might_have_set___
lea ecx, [ebp - 0x7b0]
call fcn.00406560
mov byte [ebp - 4], 0x19
lea eax, [ebp - 0x7b0]
push eax
call fcn.00401580
add esp, 4
mov byte [ebp - 4], 0x18
push 0
push 1
lea ecx, [ebp - 0x7b0]
call fcn.004077c0
lea ecx, [ebp - 0x94]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00404a70
add esp, 8
lea edx, [ebp - 0x94]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.004048a0
add esp, 8
mov eax, 1
test eax, eax
je 0x404763
push str.SOFTWAREMicrosoftWindowsCurrentVersionRunonce
lea ecx, [ebp - 0x4e4]
call fcn.00406560
mov byte [ebp - 4], 0x1a
push str._n____registry_for_the_startup_progs___obsolete_for_the_current_DIAS_____
lea ecx, [ebp - 0x7cc]
call fcn.00406560
mov byte [ebp - 4], 0x1b
lea ecx, [ebp - 0x7cc]
push ecx
call fcn.00401580
add esp, 4
mov byte [ebp - 4], 0x1a
push 0
push 1
lea ecx, [ebp - 0x7cc]
call fcn.004077c0
cmp dword [ebp - 0x4cc], 0x10
jb 0x404650
mov edx, dword [ebp - 0x4e0]
mov dword [ebp - 0xa88], edx
jmp 0x40465c
lea eax, [ebp - 0x4e0]
mov dword [ebp - 0xa88], eax
lea ecx, [ebp - 0x40]
push ecx
push 0x20006
push 0
mov edx, dword [ebp - 0xa88]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x404695
mov byte [ebp - 4], 0x18
push 0
push 1
lea ecx, [ebp - 0x4e4]
call fcn.004077c0
jmp 0x404763
mov dword [ebp - 0x5f0], 0
jmp 0x4046b0
mov eax, dword [ebp - 0x5f0]
add eax, 1
mov dword [ebp - 0x5f0], eax
mov ecx, 1
test ecx, ecx
je 0x40473f
mov dword [ebp - 0x1c], 0x104
mov dword [ebp - 0x4c8], 0x104
lea edx, [ebp - 0x4c8]
push edx
lea eax, [ebp - 0x4c4]
push eax
lea ecx, [ebp - 0x18]
push ecx
push 0
lea edx, [ebp - 0x1c]
push edx
lea eax, [ebp - 0x5ec]
push eax
mov ecx, dword [ebp - 0x5f0]
push ecx
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x210], 0
je 0x40470f
jmp 0x40473f
push 8
push str.DiasCmd
lea eax, [ebp - 0x5ec]
push eax
call fcn.0041154a
add esp, 0xc
test eax, eax
jne 0x40473a
lea ecx, [ebp - 0x5ec]
push ecx
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
jmp 0x4046a1
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 0x18
push 0
push 1
lea ecx, [ebp - 0x4e4]
call fcn.004077c0
jmp 0x404763
push str.SOFTWAREMicrosoftWindowsCurrentVersionRunServices
lea ecx, [ebp - 0x22c]
call fcn.00406560
mov byte [ebp - 4], 0x1c
push str.CanonDIAS
lea ecx, [ebp - 0x248]
call fcn.00406560
mov byte [ebp - 4], 0x1d
push str._n____registry_for_the_startup_Win9x_progs___obsolete_for_the_current_DIAS_____
lea ecx, [ebp - 0x7e8]
call fcn.00406560
mov byte [ebp - 4], 0x1e
lea ecx, [ebp - 0x7e8]
push ecx
call fcn.00401580
add esp, 4
mov byte [ebp - 4], 0x1d
push 0
push 1
lea ecx, [ebp - 0x7e8]
call fcn.004077c0
lea edx, [ebp - 0x248]
push edx
lea eax, [ebp - 0x22c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00404c40
add esp, 0xc
mov dword [ebp - 0x7ec], 1
mov byte [ebp - 4], 0x1c
push 0
push 1
lea ecx, [ebp - 0x248]
call fcn.004077c0
mov byte [ebp - 4], 0x18
push 0
push 1
lea ecx, [ebp - 0x22c]
call fcn.004077c0
mov byte [ebp - 4], 0x16
push 0
push 1
lea ecx, [ebp - 0x94]
call fcn.004077c0
mov byte [ebp - 4], 0x15
push 0
push 1
lea ecx, [ebp - 0x3c]
call fcn.004077c0
mov byte [ebp - 4], 7
push 0
push 1
lea ecx, [ebp - 0x78]
call fcn.004077c0
mov byte [ebp - 4], 3
push 0
push 1
lea ecx, [ebp - 0x5c]
call fcn.004077c0
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0xb0]
call fcn.004077c0
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0xcc]
call fcn.004077c0
mov eax, dword [ebp - 0x7ec]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x20]
xor ecx, ebp
call fcn.00411116
mov esp, ebp
pop ebp
ret