Function at 0x418580
Capabilities:
Delete registry key

Disassembly:
push 0xffffffffffffffff
push 0x457e23
mov eax, dword fs:[0]
push eax
mov eax, 0x1ea4
call fcn.00441390
mov eax, dword [0x46be4c]
xor eax, esp
mov dword [esp + 0x1ea0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x46be4c]
xor eax, esp
push eax
lea eax, [esp + 0x1eb8]
mov dword fs:[0], eax
mov eax, dword [esp + 0x1ecc]
mov ebx, dword [esp + 0x1ec8]
mov dword [esp + 0x40], eax
call fcn.004316f5
mov ecx, dword [eax + 4]
call fcn.00437e68
xor ebp, ebp
mov esi, 1
mov dword [esp + 0x1ec0], ebp
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
call fcn.004316f5
mov ecx, dword [eax + 4]
push ebp
push ebp
push esi
push ebx
mov dword [esp + 0x28], ecx
call fcn.0040d520
add esp, 0x10
cmp eax, esi
jne 0x418639
cmp dword [esp + 0x1ed0], ebp
jne 0x418639
lea ecx, [esp + 0x17]
mov dword [esp + 0x1ec0], 0xffffffff
call fcn.00407ac0
lea eax, [ebp + 3]
jmp 0x418ff4
push ebx
call fcn.0040d780
push 0x208
lea edx, [esp + 0x64]
push ebp
push edx
mov dword [esp + 0x68], eax
call fcn.004413c0
add esp, 0x10
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x2c]
push ecx
push ebp
push ebp
push 2
push ebp
push 4
call sub.WINSPOOL.DRV_EnumPrintersA
test eax, eax
jne 0x418696
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x418696
lea ecx, [esp + 0x17]
mov dword [esp + 0x1ec0], 0xffffffff
call fcn.00407ac0
mov eax, esi
jmp 0x418ff4
mov edx, dword [esp + 0x28]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
cmp edi, ebp
je 0x41867b
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x2c]
push ecx
push edx
push edi
push 2
push ebp
push 4
call sub.WINSPOOL.DRV_EnumPrintersA
test eax, eax
je 0x41870b
cmp dword [esp + 0x24], ebp
mov dword [esp + 0x1c], ebp
jbe 0x41870b
lea esi, [edi + 4]
mov eax, dword [esi]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4186f4
add ebp, 1
add esi, 0x54
cmp ebp, dword [esp + 0x24]
jb 0x4186d4
mov dword [esp + 0x1c], ebp
jmp 0x41870b
mov dword [esp + 0x1c], ebp
imul ebp, ebp, 0x54
mov ecx, dword [edi + ebp + 0x10]
push ecx
lea edx, [esp + 0x60]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0x410
lea eax, [esp + 0x678]
push 0
push eax
call fcn.004413c0
push 0x410
lea ecx, [esp + 0x684]
push ecx
push ebx
call fcn.004044e0
add esp, 0x18
push ebx
mov edi, eax
call sub.WINSPOOL.DRV_DeletePrinterConnectionA
mov esi, eax
test esi, esi
jne 0x418775
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
mov dword [esp + 0x1ec0], 0xffffffff
lea ecx, [esp + 0x17]
jne 0x418b88
call fcn.00407ac0
lea eax, [esi + 4]
jmp 0x418ff4
call fcn.004316f5
mov ecx, dword [eax + 4]
call fcn.00437e92
cmp dword [esp + 0x1ed4], 1
jne 0x4187bb
push esi
push ebx
lea edx, [esp + 0xebc]
push str.Tool_DeleteNetworkPrinter__s__RET__ld_
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0
push str.AddPrinter
lea eax, [esp + 0xebc]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
test edi, edi
je 0x4187d0
lea ecx, [esp + 0x674]
push ecx
push ebx
call fcn.00417080
add esp, 8
call fcn.004317f7
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4187ea
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x30], eax
lea ecx, [esp + 0x30]
push ecx
push ecx
lea edx, [esp + 0x64]
mov ecx, esp
mov dword [esp + 0x40], esp
push edx
mov byte [esp + 0x1ecc], 1
call fcn.004027b0
call fcn.00410300
add esp, 8
call fcn.004317f7
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41883a
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x1ec0], 2
call fcn.004317f7
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x41886c
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x3c], edi
push ebx
lea ecx, [esp + 0x30]
mov byte [esp + 0x1ec4], 3
call fcn.004027b0
mov ecx, dword [esp + 0x40]
push ecx
lea ecx, [esp + 0x48]
mov byte [esp + 0x1ec4], 4
call fcn.004027b0
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 0x3c4]
push 0x45dcd8
push eax
mov byte [esp + 0x1ec8], 5
mov dword [esp + 0x48], 0
call fcn.00442f25
add esp, 8
test eax, eax
sete al
test al, al
je 0x4188e7
push ebx
call fcn.00415170
add esp, 4
mov dword [esp + 0x40], eax
jmp 0x418a85
mov edx, dword [esp + 0x2c]
mov eax, dword [edx - 0xc]
add eax, 0xffffffff
push eax
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x34]
call fcn.004072d0
push eax
add esi, 0xe4
lea ecx, [esp + 0x38]
push esi
push ecx
mov byte [esp + 0x1ecc], 6
call fcn.0040ef70
add esp, 0xc
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x1ec4], 7
call fcn.00402020
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0x1ec0], 6
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x418957
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
mov byte [esp + 0x1ec0], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41897f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
lea ecx, [esp + 0x40]
call fcn.00402020
mov edi, dword [esp + 0x20]
push edi
push 0x80000001
call fcn.0040ce00
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
add esp, 8
push edi
push 0x80000001
call esi
push ebx
lea ecx, [esp + 0x3c]
call fcn.004027b0
push 0x5c
push edi
mov byte [esp + 0x1ec8], 8
call fcn.00440e55
add esp, 8
test eax, eax
jne 0x4189cf
or eax, 0xffffffff
jmp 0x4189d1
sub eax, edi
push eax
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x28]
call fcn.00407350
mov ebp, dword [esp + 0x48]
push ebp
push 0x80000001
call fcn.0040cf30
add esp, 8
cmp eax, 1
jne 0x4189ff
push ebp
push 0x80000001
call esi
mov edi, dword [esp + 0x3c]
push edi
push 0x80000001
call fcn.0040cf30
add esp, 8
cmp eax, 1
jne 0x418a41
push edi
push 0x80000001
call esi
push str.SOFTWARECANON_
push 0x80000001
call fcn.0040cf30
add esp, 8
cmp eax, 1
jne 0x418a41
push str.SOFTWARECANON_
push 0x80000001
call esi
lea eax, [ebp - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x418a5d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
mov byte [esp + 0x1ec0], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418a85
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x2c]
push edx
push 0
push 0
push 3
push 0
push 0
call sub.WINSPOOL.DRV_EnumPrinterDriversA
test eax, eax
jne 0x418b97
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x418b97
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
mov byte [esp + 0x1ec0], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418add
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x1ec0], 3
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418b05
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x1ec0], 2
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418b29
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x1ec0], 1
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418b51
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x1ec0], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418b79
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x1ec0], 0xffffffff
lea ecx, [esp + 0x17]
call fcn.00407ac0
mov eax, 1
jmp 0x418ff4
mov ecx, dword [esp + 0x28]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
mov dword [esp + 0x34], esi
jne 0x418bcf
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
mov byte [esp + 0x1ec0], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x418ad1
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x2c]
push edx
push eax
push esi
push 3
push 0
push 0
call sub.WINSPOOL.DRV_EnumPrinterDriversA
test eax, eax
je 0x418c21
xor edi, edi
cmp dword [esp + 0x24], edi
mov dword [esp + 0x1c], edi
jbe 0x418c21
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
add esi, 4
mov edx, dword [esi]
lea ecx, [esp + 0x5c]
push ecx
push edx
call ebp
test eax, eax
je 0x418c1d
add edi, 1
add esi, 0x28
cmp edi, dword [esp + 0x24]
jb 0x418c03
mov dword [esp + 0x1c], edi
call fcn.004048c0
mov ebp, eax
cmp ebp, 6
je 0x418d4e
cmp ebp, 0xa
je 0x418d4e
cmp ebp, 5
jne 0x418c64
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
lea eax, [eax + eax*4]
mov edx, dword [ecx + eax*8 + 4]
lea edi, [ecx + eax*8 + 4]
push ebx
push edx
call fcn.0040cc30
add esp, 8
test eax, eax
je 0x418e43
mov ebp, 1
xor ebx, ebx
mov edx, dword [esp + 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [esp + 0x4c], ebx
je 0x418c93
push str.SPOOLER
call fcn.00404f90
push str.SPOOLER
call fcn.0040c410
add esp, 8
mov edi, dword [esp + 0x30]
push ecx
add edi, 0xfffffff0
mov dword [esp + 0x3c], esp
mov esi, esp
push edi
call fcn.004015c0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.0040fc70
add esp, 4
cmp dword [esp + 0x58], 1
jne 0x418ce6
lea eax, [esp + 0xa84]
push eax
call fcn.0040d910
add esp, 4
cmp eax, 1
jne 0x418ce6
push 0
push eax
lea ecx, [esp + 0xa8c]
push ecx
call fcn.0040d320
add esp, 0xc
cmp dword [esp + 0x50], 0
je 0x418f1a
test ebp, ebp
je 0x418f1a
cmp dword [esp + 0x54], 0
je 0x418f1a
lea ecx, [esp + 0x44]
call fcn.00401660
lea ecx, [esp + 0x2c]
call fcn.00401660
lea ecx, [esp + 0x3c]
call fcn.00401660
lea ecx, [esp + 0x20]
call fcn.00401660
lea ecx, [esp + 0x30]
call fcn.00401660
lea ecx, [esp + 0x17]
mov dword [esp + 0x1ec0], 0xffffffff
call fcn.00407ac0
mov eax, dword [esp + 0x40]
jmp 0x418ff4
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
lea eax, [eax + eax*4]
lea edi, [ecx + eax*8]
mov edx, dword [edi + 4]
mov dword [esp + 0x1c], edi
add edi, 4
push ebx
push edx
call fcn.0040cc30
add esp, 8
test eax, eax
jne 0x418c64
mov ebx, dword [esp + 0x1c]
lea eax, [esp + 0x264]
push eax
call fcn.004119c0
add esp, 4
push 0x45dcc8
mov dword [esp + 0x3c], eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x418e43
mov ecx, dword [esp + 0x18]
cmp dword [ecx + 0x4f0], esi
je 0x418dd4
push str.SPOOLER
call fcn.00404f90
push str.SPOOLER
call fcn.0040c410
mov edx, dword [esp + 0x20]
add esp, 8
mov dword [edx + 0x4f0], esi
push str.DeletePrinterDriverExA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x418e12
mov ecx, dword [edi]
push 3
push 3
push ecx
push 0
push 0
call eax
cmp ebp, 0xa
mov esi, eax
mov dword [esp + 0x50], esi
jne 0x418e12
test esi, esi
je 0x418e12
mov edx, dword [edi]
mov ecx, dword [esp + 0x18]
push edx
add ecx, 0x14c
call fcn.0040ca80
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp esi, 1
jne 0x418e43
cmp dword [esp + 0x38], 0
jne 0x418e43
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x20]
push 0
push ecx
lea edx, [esp + 0x26c]
push edx
call fcn.0040d010
add esp, 0xc
mov dword [esp + 0x4c], esi
mov eax, dword [edi]
xor ebx, ebx
push ebx
push eax
mov ebp, 1
call fcn.00408150
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
add esp, 8
test eax, eax
je 0x418e93
call fcn.00409470
lea ecx, [esp + 0x18]
push ecx
push 0x2001f
push ebx
push str.SOFTWARECanonVDCSETUPVDCUser
push 0x80000002
mov dword [esp + 0x2c], ebx
call esi
test eax, eax
jne 0x418e93
mov edx, dword [esp + 0x18]
push edx
xor ebp, ebp
call edi
call fcn.004087e0
test eax, eax
je 0x418c6b
call fcn.0040b180
push 0x30b
lea eax, [esp + 0x36d]
push ebx
push eax
mov dword [esp + 0x24], ebx
mov byte [esp + 0x374], 0
call fcn.004413c0
push str.DIASUser
push str.SOFTWARECanonDIASSETUP
lea ecx, [esp + 0x37c]
push 0x45ce28
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
lea edx, [esp + 0x18]
push edx
push 0x2001f
push ebx
lea eax, [esp + 0x374]
push eax
push 0x80000002
call esi
test eax, eax
jne 0x418c6b
mov ecx, dword [esp + 0x18]
push ecx
mov dword [esp + 0x58], ebx
call edi
mov dword [esp + 0x18], ebx
jmp 0x418c6b
mov eax, dword [esp + 0x44]
add eax, 0xfffffff0
mov byte [esp + 0x1ec0], 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x418f42
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x1ec0], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418f6a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
mov byte [esp + 0x1ec0], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418f92
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x1ec0], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418fba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x1ec0], 0
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418fdb
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
lea ecx, [esp + 0x17]
mov dword [esp + 0x1ec0], 0xffffffff
call fcn.00407ac0
mov eax, 5
mov ecx, dword [esp + 0x1eb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1ea0]
xor ecx, esp
call fcn.0044027a
add esp, 0x1eb0
ret