Function at 0x40808d
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
and dword [ebp - 0x28], 0
push ebx
push esi
push edi
and dword [ebp - 0x18], 0
xor eax, eax
lea edi, [ebp - 0x24]
mov esi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea ecx, [ebp - 0x33c]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x20], 0xf000c
call fcn.0040b57a
lea ecx, [ebp - 0x238]
call fcn.0040b57a
lea ecx, [ebp - 0x134]
call fcn.0040b57a
mov eax, dword [esi + 8]
mov eax, dword [eax + 0xa98]
mov dword [ebp - 0x1c], eax
mov ebx, dword [eax]
cmp ebx, eax
je 0x4084fd
sub esp, 0x104
lea esi, [ebx + 8]
push 0x41
pop ecx
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x238]
call fcn.0040b599
xor edi, edi
cmp dword [ebx + 0x420], edi
jne 0x4083ed
cmp dword [ebx + 0x424], edi
jne 0x4083ed
cmp dword [ebx + 0x428], edi
jne 0x4083ed
lea ecx, [ebx + 0x314]
call fcn.0040b634
test eax, eax
je 0x4083c0
lea eax, [ebp - 0x28]
lea ecx, [ebx + 8]
push eax
lea eax, [ebp - 8]
push eax
mov dword [ebp - 8], edi
call fcn.0040b596
push eax
call sub.ZSPOOL.dll_OpenPrinterA
test eax, eax
je 0x408218
cmp dword [ebp - 8], edi
je 0x408222
lea eax, [ebp - 0x10]
mov dword [ebp - 4], edi
push eax
lea eax, [ebp - 4]
push eax
push edi
push edi
push 1
pop esi
mov dword [ebp - 0x10], edi
push esi
push 0x64
push edi
push dword [ebp - 8]
call sub.ZSPOOL.dll_EnumJobsA
mov eax, dword [ebp - 4]
cmp eax, edi
je 0x4081f1
add eax, 3
and al, 0xfc
call fcn.0040d320
mov esi, esp
cmp esi, edi
je 0x4081ee
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push esi
push 1
push 0x64
push edi
push dword [ebp - 8]
call sub.ZSPOOL.dll_EnumJobsA
test eax, eax
je 0x4081ee
cmp dword [ebp - 0x10], edi
mov dword [ebp - 0x14], edi
jbe 0x4081ee
push 3
push edi
push edi
push dword [esi]
push dword [ebp - 8]
call sub.ZSPOOL.dll_SetJobA
push 5
push edi
push edi
push dword [esi]
push dword [ebp - 8]
call sub.ZSPOOL.dll_SetJobA
inc dword [ebp - 0x14]
add esi, 0x40
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x10]
jb 0x4081c4
push 1
pop esi
push dword [ebp - 8]
call sub.ZSPOOL.dll_DeletePrinter
test eax, eax
je 0x40820e
cmp dword [ebx + 0x41c], edi
je 0x408208
mov dword [ebp - 0x18], esi
mov dword [ebx + 0x428], esi
push dword [ebp - 8]
call sub.ZSPOOL.dll_ClosePrinter
jmp 0x408222
mov dword [ebx + 0x428], 1
mov eax, dword [ebp - 0xc]
lea ecx, [eax + 0x134]
call fcn.0040728e
test eax, eax
je 0x4082fe
lea eax, [ebp - 4]
mov esi, 0x80000001
push eax
mov dword [ebp - 4], edi
mov edi, dword [sym.imp.ZSPOOL.dll_RegOpenKeyA]
push str.PrintersDevModes2
push esi
call edi
test eax, eax
jne 0x408274
lea ecx, [ebp - 0x238]
call fcn.0040b596
push eax
push dword [ebp - 4]
call dword [sym.imp.ZSPOOL.dll_RegDeleteValueA]
push dword [ebp - 4]
call dword [sym.imp.ZSPOOL.dll_RegCloseKey]
lea eax, [ebp - 4]
push eax
push str.PrintersSettings
push esi
call edi
test eax, eax
jne 0x4082a2
lea ecx, [ebp - 0x238]
call fcn.0040b596
push eax
push dword [ebp - 4]
call dword [sym.imp.ZSPOOL.dll_RegDeleteValueA]
push dword [ebp - 4]
call dword [sym.imp.ZSPOOL.dll_RegCloseKey]
lea eax, [ebp - 4]
push eax
push str.SoftwareMicrosoftWindows_NTCurrentVersionDevices
push esi
call edi
test eax, eax
jne 0x4082d0
lea ecx, [ebp - 0x238]
call fcn.0040b596
push eax
push dword [ebp - 4]
call dword [sym.imp.ZSPOOL.dll_RegDeleteValueA]
push dword [ebp - 4]
call dword [sym.imp.ZSPOOL.dll_RegCloseKey]
lea eax, [ebp - 4]
push eax
push str.SoftwareMicrosoftWindows_NTCurrentVersionPrinterPorts
push esi
call edi
test eax, eax
jne 0x4082fe
lea ecx, [ebp - 0x238]
call fcn.0040b596
push eax
push dword [ebp - 4]
call dword [sym.imp.ZSPOOL.dll_RegDeleteValueA]
push dword [ebp - 4]
call dword [sym.imp.ZSPOOL.dll_RegCloseKey]
mov esi, dword [ebp - 0xc]
lea ecx, [esi + 0x134]
call fcn.00407281
test eax, eax
je 0x40840b
push str.HKLM__SystemCurrentControlSetcontrolPrintPrinters_
lea ecx, [ebp - 0x134]
call fcn.0040b5a6
lea eax, [ebp - 0x238]
lea ecx, [ebp - 0x134]
push eax
call fcn.0040b5e9
push str.PrinterDriverData
lea ecx, [ebp - 0x134]
call fcn.0040b5fd
mov edi, 0x4197cc
lea ecx, [ebp - 0x134]
push edi
call fcn.0040b5fd
mov ecx, dword [esi + 8]
mov esi, 0xa88
add ecx, esi
lea edx, [ebp - 0x134]
push edx
mov eax, dword [ecx]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.00405880
push str.HKLM__SystemCurrentControlSetcontrolPrintPrinters_
lea ecx, [ebp - 0x134]
call fcn.0040b5a6
lea eax, [ebp - 0x238]
lea ecx, [ebp - 0x134]
push eax
call fcn.0040b5e9
push edi
lea ecx, [ebp - 0x134]
call fcn.0040b5fd
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 0x134]
push edx
mov ecx, dword [eax + 8]
mov eax, dword [ecx + esi]
add ecx, esi
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.00405880
jmp 0x40840b
lea ecx, [ebx + 8]
call fcn.0040b591
push eax
call sub.ZSPOOL.dll_DeletePrinterConnectionA
test eax, eax
je 0x40840b
cmp dword [ebx + 0x41c], edi
je 0x4083e1
mov dword [ebp - 0x18], 1
mov dword [ebx + 0x428], 1
jmp 0x40840b
sub esp, 0x104
lea esi, [ebp - 0x238]
push 0x41
pop ecx
mov edi, esp
rep movsd dword es:[edi], dword [esi]
lea ecx, [ebp - 0x33c]
call fcn.0040b599
mov ebx, dword [ebx]
cmp ebx, dword [ebp - 0x1c]
jne 0x4080eb
cmp dword [ebp - 0x18], 1
jne 0x4084fd
lea ecx, [ebp - 0x33c]
call fcn.0040b634
test eax, eax
je 0x40845c
mov edi, dword [ebp - 0xc]
push 0
push 0xa1
lea esi, [edi + 0x1d0]
mov ecx, esi
call fcn.0040a539
push eax
push 0x9f
mov ecx, esi
call fcn.0040a539
push eax
push dword [edi + 4]
jmp 0x4084f7
lea ecx, [ebp - 0x33c]
call fcn.0040b591
mov ebx, dword [ebp - 0xc]
push eax
mov ecx, ebx
call fcn.004096a8
test eax, eax
je 0x4084af
mov eax, dword [ebx + 8]
mov edi, dword [eax + 0xa98]
mov esi, dword [edi]
cmp esi, edi
je 0x4084af
lea eax, [ebp - 0x33c]
lea ecx, [esi + 8]
push eax
call fcn.0040b5d5
test eax, eax
je 0x4084a4
mov dword [esi + 0x41c], 1
jmp 0x4084ab
and dword [esi + 0x41c], 0
mov esi, dword [esi]
jmp 0x408481
lea ecx, [ebp - 0x33c]
lea esi, [ebx + 0x1d0]
call fcn.0040b596
push eax
push 0xa0
mov ecx, esi
call fcn.0040a539
push eax
lea eax, [ebp - 0x43c]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, esi
push 0
push 0xa1
call fcn.0040a539
push eax
lea eax, [ebp - 0x43c]
push eax
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_MessageBoxA]
lea esp, [ebp - 0x448]
pop edi
pop esi
pop ebx
leave
ret