Function at 0x407580
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
mov eax, dword [0x42f060]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x344], ecx
mov eax, dword [ebp - 0x344]
cmp dword [eax + 0x107c], 0
je 0x407643
mov ecx, dword [ebp - 0x344]
mov edx, dword [ecx + 0x107c]
mov eax, dword [ebp - 0x344]
mov ecx, dword [eax + 0x107c]
mov edx, dword [edx]
mov eax, dword [edx + 0x20]
call eax
mov dword [ebp - 0x348], eax
mov ecx, dword [ebp - 0x348]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x348]
mov eax, dword [edx + 0xd0]
call eax
movzx ecx, al
test ecx, ecx
je 0x407643
mov edx, dword [ebp - 0x344]
movzx eax, byte [edx + 0x105e]
test eax, eax
jne 0x407643
mov ecx, dword [ebp - 0x344]
mov edx, dword [ecx + 0x107c]
mov eax, dword [ebp - 0x344]
mov ecx, dword [eax + 0x107c]
mov edx, dword [edx]
mov eax, dword [edx + 0x20]
call eax
mov dword [ebp - 0x34c], eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x34c]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x34c]
mov edx, dword [eax + 0x208]
call edx
jmp 0x407a05
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
push str.KCPROFKXP::RemoveRegValue____s___s_n
call fcn.00413880
add esp, 0xc
cmp dword [ebp + 8], 0
je 0x4076d1
mov edx, dword [ebp - 0x344]
movzx eax, byte [edx + 0x218]
test eax, eax
je 0x4076a3
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0x344]
add edx, 0xc3e
push edx
push 0x429ff8
push 0x42a028
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
jmp 0x4076cf
push str.PrinterDriverData
mov ecx, dword [ebp - 0x344]
add ecx, 0x42e
push ecx
push str.SYSTEMCurrentControlSetControlPrintPrinters
push str._s_s_s
lea edx, [ebp - 0x320]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x407732
mov eax, dword [ebp - 0x344]
movzx ecx, byte [eax + 0x218]
test ecx, ecx
je 0x40770b
mov edx, dword [ebp - 0x344]
add edx, 0xc3e
push edx
push 0x429ff8
push 0x4297ac
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
jmp 0x407732
mov ecx, dword [ebp - 0x344]
add ecx, 0x42e
push ecx
push 0x429ff8
push 0x428d14
lea edx, [ebp - 0x320]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov eax, dword [ebp - 0x344]
movzx ecx, byte [eax + 0x218]
test ecx, ecx
je 0x407759
lea edx, [ebp - 0x110]
push edx
push 0x42a0cc
call fcn.00413880
add esp, 8
jmp 0x40776d
lea eax, [ebp - 0x320]
push eax
push str.Reg_Key___s_n
call fcn.004139d0
add esp, 8
mov ecx, dword [ebp - 0x344]
movzx edx, byte [ecx + 0x218]
test edx, edx
je 0x4077b0
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x114]
push ecx
push 0
push 2
push 0
push 0x429b6c
push 0
lea edx, [ebp - 0x110]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov dword [ebp - 0x324], eax
jmp 0x4077e0
lea eax, [ebp - 4]
push eax
lea ecx, [ebp - 0x114]
push ecx
push 0
push 2
push 0
push 0x4295b4
push 0
lea edx, [ebp - 0x320]
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov dword [ebp - 0x324], eax
cmp dword [ebp - 0x324], 0
je 0x4079e5
mov ecx, dword [ebp - 0x344]
call fcn.0040c970
movzx eax, al
test eax, eax
je 0x4079df
mov dword [ebp - 0x334], 0xffffffff
mov dword [ebp - 0x340], 0
mov byte [ebp - 0x339], 0
push 0xc
push 0
lea ecx, [ebp - 0x330]
push ecx
call fcn.00416110
add esp, 0xc
mov dword [ebp - 0x328], 4
mov edx, dword [ebp - 0x344]
cmp dword [edx + 0x220], 0xffffffff
je 0x407872
mov eax, dword [ebp - 0x344]
mov ecx, dword [eax + 0x220]
mov dword [ebp - 0x334], ecx
mov dword [ebp - 0x340], 1
mov byte [ebp - 0x339], 1
jmp 0x40791f
mov edx, dword [ebp - 0x344]
cmp dword [edx + 0x107c], 0
je 0x4078f9
mov eax, dword [ebp - 0x344]
mov ecx, dword [eax + 0x107c]
mov edx, dword [ebp - 0x344]
mov eax, dword [edx + 0x107c]
mov edx, dword [ecx]
mov ecx, eax
mov eax, dword [edx + 0x20]
call eax
mov dword [ebp - 0x350], eax
mov ecx, dword [ebp - 0x350]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x350]
mov eax, dword [edx + 0xd0]
call eax
movzx ecx, al
test ecx, ecx
je 0x4078f9
mov edx, dword [ebp - 0x344]
movzx eax, byte [edx + 0x105e]
test eax, eax
jne 0x4078f9
push 0
lea ecx, [ebp - 0x334]
push ecx
mov edx, dword [ebp - 0x344]
add edx, 0x226
push edx
call sub.WINSPOOL.DRV_OpenPrinterW
mov dword [ebp - 0x340], eax
jmp 0x40791f
lea eax, [ebp - 0x330]
push eax
lea ecx, [ebp - 0x334]
push ecx
mov edx, dword [ebp - 0x344]
add edx, 0x226
push edx
call sub.WINSPOOL.DRV_OpenPrinterW
mov dword [ebp - 0x340], eax
cmp dword [ebp - 0x340], 0
jne 0x407986
mov eax, dword [ebp - 0x344]
cmp dword [eax + 0x107c], 0
je 0x407986
mov ecx, dword [ebp - 0x344]
mov edx, dword [ecx + 0x107c]
mov eax, dword [ebp - 0x344]
mov ecx, dword [eax + 0x107c]
mov edx, dword [edx]
mov eax, dword [edx + 0x20]
call eax
mov dword [ebp - 0x354], eax
mov ecx, dword [ebp - 0x354]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x354]
mov eax, dword [edx + 0x1c]
call eax
mov dword [ebp - 0x334], eax
mov dword [ebp - 0x340], 1
mov byte [ebp - 0x339], 1
cmp dword [ebp - 0x340], 0
jne 0x407993
xor al, al
jmp 0x407a05
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x334]
push edx
call sub.WINSPOOL.DRV_DeletePrinterDataA
mov dword [ebp - 0x338], eax
cmp dword [ebp - 0x338], 0
je 0x4079c6
mov eax, dword [ebp - 0x338]
push eax
push str.KCPROFKXP::DeletePrinterData___Errro__ld_n
call fcn.00413880
add esp, 8
movzx ecx, byte [ebp - 0x339]
test ecx, ecx
jne 0x4079dd
mov edx, dword [ebp - 0x334]
push edx
call sub.WINSPOOL.DRV_ClosePrinter
jmp 0x4079e3
xor al, al
jmp 0x407a05
jmp 0x407a03
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x114]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00415aa8
mov esp, ebp
pop ebp
ret 8