Function at 0x412fd0
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x448655
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa10
push ebx
push esi
xor ebx, ebx
push edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x50], ebx
call fcn.0044608e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 4]
push ebx
push 1
push edi
call fcn.0040a6e0
add esp, 0xc
cmp eax, 1
jne 0x41303d
cmp dword [ebp + 0x10], ebx
jne 0x41303d
mov eax, 3
mov ecx, dword [esp + 0xa1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call fcn.0040a940
add esp, 4
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x14]
push ecx
push edi
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], 0xf000c
call sub.WINSPOOL.DRV_OpenPrinterA
test eax, eax
jne 0x413096
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 5
neg eax
sbb eax, eax
and eax, 0xfffffffd
add eax, 4
mov ecx, dword [esp + 0xa1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00404100
cmp eax, 2
mov dword [esp + 0x2c], eax
je 0x4130b9
cmp eax, 3
je 0x4130b9
lea edx, [esp + 0x3e0]
push edx
push edi
call fcn.0040e220
jmp 0x4130cb
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x3e0]
push eax
push ecx
call fcn.0040afc0
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
je 0x4131d1
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x30]
push eax
push ebx
push ebx
push 3
push ebx
push ecx
mov dword [esp + 0x48], ebx
call sub.WINSPOOL.DRV_GetPrinterDriverA
test eax, eax
jne 0x413106
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x4131d1
mov eax, dword [esp + 0x30]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [esp + 0x10]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x28], ebx
jne 0x413141
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
mov eax, 1
mov ecx, dword [esp + 0xa1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x30]
push edx
push eax
push ebx
push 3
push 0
push ecx
call sub.WINSPOOL.DRV_GetPrinterDriverA
test eax, eax
je 0x4131ca
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0x1c]
push 0
push 0
push eax
push edi
push ecx
call fcn.00406e20
add esp, 0x14
cmp eax, 1
jne 0x4131b0
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edx, dword [esp + 0x10]
push edx
call sub.WINSPOOL.DRV_ClosePrinter
push 2
push 0
push 0x466dcc
call fcn.00427ac0
add esp, 0xc
mov eax, 2
mov ecx, dword [esp + 0xa1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 0xc]
push 1
lea eax, [esp + 0x8c]
push eax
push ecx
call fcn.004041b0
add esp, 0xc
test eax, eax
jne 0x4131f5
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edx, dword [esp + 0x10]
push edx
call sub.WINSPOOL.DRV_ClosePrinter
mov eax, 1
mov ecx, dword [esp + 0xa1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x3e0]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x413200
sub eax, edx
mov dword [esp + 0x58], eax
je 0x41325d
test byte [esp + 0x24], 8
je 0x41325d
lea eax, [esp + 0x3e0]
push eax
push 0
call fcn.00409ca0
add esp, 8
test eax, eax
jne 0x41325d
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x10]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, 1
mov ecx, dword [esp + 0xa1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0x44]
xor edx, edx
push eax
mov dword [esp + 0x48], edx
push ecx
mov byte [esp + 0x50], dl
call fcn.00403350
mov dword [esp + 0x20], eax
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0xd0]
lea edx, [esp + 0xd0]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0xc]
push edx
push eax
call fcn.00403830
add esp, 0x10
test eax, eax
mov dword [esp + 0x58], eax
je 0x4132d3
cmp dword [esp + 0x2c], 0xa
je 0x4132bf
mov edx, dword [ebp + 0xc]
lea ecx, [esp + 0xc8]
push ecx
push edx
call fcn.0040ada0
jmp 0x4132d0
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0xc8]
push eax
push ecx
call fcn.0040bae0
add esp, 8
mov edx, dword [esp + 0x10]
push edx
call sub.WINSPOOL.DRV_DeletePrinter
mov edi, eax
mov eax, dword [esp + 0x10]
push eax
call sub.WINSPOOL.DRV_ClosePrinter
test edi, edi
jne 0x41330e
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 1
mov ecx, dword [esp + 0xa1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x2c]
cmp edi, 2
je 0x41331c
cmp edi, 3
jne 0x41336d
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
push 1
push 0
push 0
push 0
lea ecx, [esp + 0x7c]
push ecx
call edi
test eax, eax
je 0x413369
lea edx, [esp + 0x6c]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x6c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
push 0
lea ecx, [esp + 0x7c]
push ecx
call edi
test eax, eax
jne 0x413340
mov edi, dword [esp + 0x2c]
lea ecx, [esp + 0x14]
call fcn.00401540
lea ecx, [esp + 0x1c]
mov dword [esp + 0xa24], 0
call fcn.00401540
lea ecx, [esp + 0x24]
call fcn.00401540
lea ecx, [esp + 0x40]
call fcn.00401540
mov edx, dword [ebx + 4]
push edx
lea ecx, [esp + 0x38]
mov byte [esp + 0xa28], 3
call fcn.00402470
push 5
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0xa2c], 4
call fcn.00405c40
push eax
lea ecx, [esp + 0x38]
mov byte [esp + 0xa28], 5
call fcn.00401e30
lea ecx, [esp + 0x38]
mov byte [esp + 0xa24], 4
call fcn.00401400
mov ecx, dword [ebx + 4]
push ecx
lea ecx, [esp + 0x58]
call fcn.00402470
lea ecx, [esp + 0x38]
call fcn.00401540
lea edx, [esp + 0x38]
push edx
push ecx
lea eax, [esp + 0x5c]
mov ecx, esp
mov dword [esp + 0x28], esp
push eax
mov byte [esp + 0xa30], 7
call fcn.00401710
call fcn.0040d2d0
add esp, 8
cmp edi, 2
je 0x4135e0
cmp edi, 3
je 0x4135e0
mov edi, dword [ebp + 0xc]
push edi
lea ecx, [esp + 0x40]
mov dword [esp + 0x50], 0
call fcn.00402470
push 2
push 0x44c1e4
push edi
mov byte [esp + 0xa30], 0xa
call fcn.0042fa90
add esp, 0xc
test eax, eax
jne 0x413540
mov ecx, dword [esp + 0x3c]
mov eax, dword [ecx - 0xc]
dec eax
push eax
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x44]
call fcn.00405c40
push eax
lea edi, [esi + 0xdc]
lea eax, [esp + 0x1c]
push edi
push eax
mov byte [esp + 0xa30], 0xb
call fcn.0040c1f0
add esp, 0xc
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0xa28], 0xc
call fcn.00401e30
lea ecx, [esp + 0x18]
call fcn.00401400
lea ecx, [esp + 0x20]
mov byte [esp + 0xa24], 0xa
call fcn.00401400
push edi
lea ecx, [esp + 0x20]
call fcn.00401e30
mov edi, dword [esp + 0x14]
push edi
push SysReAllocString
call fcn.0040a010
add esp, 8
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push SysReAllocString
call edi
push 0x5c
lea ecx, [esp + 0x18]
call fcn.00401330
push eax
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00403670
mov ebx, dword [esp + 0x18]
push ebx
push SysReAllocString
call fcn.0040a110
add esp, 8
cmp eax, 1
jne 0x413532
push ebx
push SysReAllocString
call edi
lea ecx, [esp + 0x18]
call fcn.00401400
jmp 0x4135c6
mov edx, dword [ebp + 0xc]
push edx
lea ecx, [esp + 0x1c]
call fcn.00402470
push eax
lea eax, [esi + 0xd8]
push eax
lea ecx, [esp + 0x28]
push ecx
mov byte [esp + 0xa30], 0xd
call fcn.0040c1f0
add esp, 0xc
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0xa28], 0xe
call fcn.00401e30
lea ecx, [esp + 0x20]
call fcn.00401400
lea ecx, [esp + 0x18]
mov byte [esp + 0xa24], 0xa
call fcn.00401400
lea edx, [esi + 0xdc]
push edx
lea ecx, [esp + 0x20]
call fcn.00401e30
mov edi, dword [esp + 0x14]
push edi
push SysReAllocString
call fcn.0040a010
add esp, 8
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push SysReAllocString
call edi
lea ecx, [esp + 0x3c]
mov byte [esp + 0xa24], 7
call fcn.00401400
mov ebx, dword [esp + 0x28]
jmp 0x4137d0
cmp dword [esp + 0x18], 1
jne 0x4135f4
lea eax, [esp + 0x44]
push eax
call fcn.004034f0
add esp, 4
mov ecx, dword [esp + 0x34]
push str._FAX_
push ecx
call fcn.0042de57
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
add esp, 8
test eax, eax
je 0x41364e
mov edx, dword [esp + 0x34]
push str._FAX_
push edx
call fcn.0042de57
add esp, 8
test eax, eax
je 0x413641
mov eax, dword [esi + 0xb4]
push eax
lea eax, [esp + 0x8c]
push eax
call fcn.0040fb10
add esp, 8
test eax, eax
jge 0x41364e
mov dword [esp + 0x4c], 1
jmp 0x4137a7
mov ecx, dword [ebp + 0xc]
push ecx
lea ecx, [esp + 0x40]
mov dword [esp + 0x50], 0
call fcn.00402470
push eax
lea edx, [esi + 0xd8]
push edx
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0xa30], 8
call fcn.0040c1f0
add esp, 0xc
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0xa28], 9
call fcn.00401e30
lea ecx, [esp + 0x20]
call fcn.00401400
lea ecx, [esp + 0x3c]
mov byte [esp + 0xa24], 7
call fcn.00401400
lea ecx, [esi + 0xdc]
push ecx
lea ecx, [esp + 0x20]
call fcn.00401e30
lea edx, [esi + 0xe8]
push edx
lea ecx, [esp + 0x28]
call fcn.00401e30
lea eax, [esi + 0xe4]
push eax
lea ecx, [esp + 0x44]
call fcn.00401e30
mov ebx, dword [esp + 0x14]
push ebx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040a010
add esp, 8
push ebx
push reloc.OLEAUT32.dll_SysReAllocString
call edi
mov ecx, dword [esp + 0x1c]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040a110
add esp, 8
cmp eax, 1
je 0x413718
call fcn.0040ef70
test eax, eax
jne 0x41378d
jmp 0x413724
mov edx, dword [esp + 0x1c]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call edi
mov eax, dword [esp + 0x24]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040a110
add esp, 8
cmp eax, 1
jne 0x413747
mov ecx, dword [esp + 0x24]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call edi
mov edx, dword [esp + 0x40]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040a110
add esp, 8
cmp eax, 1
jne 0x41376a
mov eax, dword [esp + 0x40]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call edi
push str.SOFTWARECANON_
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040a110
add esp, 8
cmp eax, 1
jne 0x41378d
push str.SOFTWARECANON_
push reloc.OLEAUT32.dll_SysReAllocString
call edi
push ebx
push SysReAllocString
call fcn.0040a010
add esp, 8
push ebx
push SysReAllocString
call edi
mov ebx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4137d0
lea ecx, [esp + 0x44]
push ecx
push str.EnumLPTENUM
call fcn.0040b820
lea edx, [esp + 0x4c]
push edx
push str.EnumUSBPRINT
call fcn.0040b820
add esp, 0x10
mov eax, dword [esp + 0x1c]
push eax
push SysReAllocString
call fcn.0040a110
add esp, 8
cmp eax, 1
jne 0x413816
mov ecx, dword [esp + 0x1c]
push ecx
push SysReAllocString
call edi
push str.SOFTWARECANON_
push SysReAllocString
call fcn.0040a110
add esp, 8
cmp eax, 1
jne 0x413816
push str.SOFTWARECANON_
push SysReAllocString
call edi
mov eax, dword [esp + 0x2c]
cmp eax, 2
je 0x413945
cmp eax, 3
je 0x413945
mov edx, dword [ebp + 0xc]
cmp eax, 6
mov eax, dword [ebx + 4]
push edx
push eax
jne 0x413930
call fcn.00409e40
add esp, 8
test eax, eax
jne 0x4139ef
mov edx, dword [esp + 0x28]
mov ecx, 0x41
lea edi, [esp + 0x1d0]
rep stosd dword es:[edi], eax
push eax
mov eax, dword [edx + 4]
lea ecx, [esp + 0x1d4]
push ecx
push eax
call fcn.0040ae10
add esp, 0xc
push 0x44c89c
mov dword [esp + 0x24], eax
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x4139c0
mov eax, dword [esi + 0x214]
test eax, eax
je 0x4138b6
push str.SPOOLER
call fcn.00405570
push str.SPOOLER
call fcn.00409a00
add esp, 8
mov dword [esi + 0x214], ebx
push str.DeletePrinterDriverExA
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4138da
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx + 4]
push 3
push 3
push edx
push 0
push 0
call eax
mov ebx, eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp ebx, 1
jne 0x4139c0
mov eax, dword [esp + 0x58]
test eax, eax
je 0x413906
mov ecx, dword [ebp + 0xc]
lea eax, [esp + 0xc8]
push eax
push ecx
call fcn.00411820
add esp, 8
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4139c6
push 0
lea ecx, [esp + 0x1d4]
call fcn.0040e9a0
mov dword [esp + 0x54], 1
add esp, 4
jmp 0x4139c6
call fcn.00409e40
add esp, 8
test eax, eax
jne 0x4139ef
jmp 0x4139c6
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebx + 4]
push ecx
push edx
call fcn.00409e40
add esp, 8
test eax, eax
jne 0x4139ef
mov esi, dword [esp + 0x28]
push esi
lea ebx, [esp + 0x2dc]
call fcn.0040de40
add esp, 4
mov edi, eax
mov eax, dword [esi + 4]
push eax
push 0
push 0
call sub.WINSPOOL.DRV_DeletePrinterDriverA
cmp eax, 1
jne 0x4139c0
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x413999
mov ecx, dword [esi + 4]
push ecx
call fcn.0040df60
add esp, 4
test edi, edi
jne 0x4139b2
mov edx, dword [esi + 0x20]
push edi
push edx
lea eax, [esp + 0x2e0]
push eax
call fcn.0040a1c0
add esp, 0xc
mov ecx, dword [esi + 0x1c]
push ecx
call fcn.004122d0
add esp, 4
jmp 0x4139c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 4]
push 0
push eax
call fcn.004061b0
add esp, 8
test eax, eax
je 0x4139e1
call fcn.00407440
call fcn.00406800
test eax, eax
je 0x4139ef
call fcn.00408e60
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
call fcn.0040ef70
test eax, eax
jne 0x413a08
call fcn.00407b50
mov eax, dword [esp + 0x5c]
mov esi, 1
cmp eax, esi
jne 0x413a3c
lea edx, [esp + 0x5e8]
push edx
call fcn.0040aaa0
add esp, 4
cmp eax, esi
jne 0x413a3c
push 0
lea eax, [esp + 0x5ec]
push esi
push eax
call fcn.0040a4e0
add esp, 0xc
mov eax, dword [esp + 0x2c]
cmp eax, 6
je 0x413a4a
cmp eax, 0xa
jne 0x413a67
cmp dword [esp + 0x50], esi
jne 0x413a67
push str.SPOOLER
call fcn.00405570
push str.SPOOLER
call fcn.00409a00
add esp, 8
push ecx
lea edx, [esp + 0x3c]
mov ecx, esp
mov dword [esp + 0x60], esp
push edx
call fcn.00401710
call fcn.0040ccb0
add esp, 4
lea ecx, [esp + 0x38]
call fcn.00401400
lea ecx, [esp + 0x54]
call fcn.00401400
lea ecx, [esp + 0x34]
call fcn.00401400
lea ecx, [esp + 0x40]
call fcn.00401400
lea ecx, [esp + 0x24]
call fcn.00401400
lea ecx, [esp + 0x1c]
call fcn.00401400
lea ecx, [esp + 0x14]
call fcn.00401400
mov ecx, dword [esp + 0xa1c]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret