Function at 0x412620
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x44859e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1894
call fcn.0042dd50
push ebx
push esi
push edi
call fcn.0044608e
mov ecx, dword [eax + 4]
call fcn.0044181e
xor esi, esi
mov dword [esp + 0x18ac], esi
mov dword [esp + 0x44], esi
call fcn.0044608e
mov eax, dword [eax + 4]
mov ebx, dword [ebp + 8]
push esi
push 1
push ebx
mov dword [esp + 0x40], eax
call fcn.0040a6e0
add esp, 0xc
cmp eax, 1
jne 0x4126ba
cmp dword [ebp + 0x10], esi
jne 0x4126ba
mov dword [esp + 0x18ac], 0xffffffff
call fcn.0044608e
mov ecx, dword [eax + 4]
call fcn.00441833
mov eax, 3
mov ecx, dword [esp + 0x18a4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call fcn.0040a940
add esp, 4
mov dword [esp + 0x50], eax
xor eax, eax
mov ecx, 0x82
lea edi, [esp + 0x268]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1c]
push edx
push esi
push esi
push 2
push esi
push 4
call sub.WINSPOOL.DRV_EnumPrintersA
test eax, eax
jne 0x412700
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x412ba5
mov eax, dword [esp + 0x18]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
cmp edi, esi
je 0x412ba5
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
push edi
push 2
push esi
push 4
call sub.WINSPOOL.DRV_EnumPrintersA
test eax, eax
je 0x412780
cmp dword [esp + 0x1c], esi
mov dword [esp + 0x14], esi
jbe 0x412780
lea esi, [edi + 4]
mov ecx, dword [esi]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x412766
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
inc eax
add esi, 0x54
cmp eax, ecx
mov dword [esp + 0x14], eax
jb 0x412742
jmp 0x412780
mov edx, dword [esp + 0x14]
imul edx, edx, 0x54
mov eax, dword [edx + edi + 0x10]
push eax
lea ecx, [esp + 0x26c]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea edx, [esp + 0x58]
push edx
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x5c]
push ebx
rep stosd dword es:[edi], eax
call fcn.00403830
add esp, 8
push ebx
mov esi, eax
call sub.WINSPOOL.DRV_DeletePrinterConnectionA
mov edi, eax
test edi, edi
jne 0x4127f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
mov dword [esp + 0x18ac], 0xffffffff
jne 0x412bb0
call fcn.0044608e
mov ecx, dword [eax + 4]
call fcn.00441833
mov eax, 4
mov ecx, dword [esp + 0x18a4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.0044608e
mov ecx, dword [eax + 4]
call fcn.00441848
cmp dword [ebp + 0x14], 1
jne 0x412833
push edi
push ebx
lea eax, [esp + 0x8a8]
push str.Tool_DeleteNetworkPrinter__s__RET__ld_
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0
push str.AddPrinter
lea ecx, [esp + 0x8a8]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
test esi, esi
je 0x412845
lea edx, [esp + 0x58]
push edx
push ebx
call fcn.00411820
add esp, 8
call fcn.0043cb83
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x2c]
push eax
push ecx
lea edx, [esp + 0x270]
mov ecx, esp
mov dword [esp + 0x40], esp
push edx
mov byte [esp + 0x18b8], 1
call fcn.00402470
call fcn.0040d2d0
add esp, 8
call fcn.0043cb83
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x24], eax
mov byte [esp + 0x18ac], 2
call fcn.0043cb83
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x20], eax
push ebx
lea ecx, [esp + 0x2c]
mov byte [esp + 0x18b0], 3
call fcn.00402470
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x18b0], 4
call fcn.00402470
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx - 0xc]
dec eax
push eax
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0x30]
mov byte [esp + 0x18b4], 5
call fcn.00405c40
mov edi, dword [esp + 0x34]
push eax
add edi, 0xdc
lea eax, [esp + 0x58]
push edi
push eax
mov byte [esp + 0x18b8], 6
call fcn.0040c1f0
add esp, 0xc
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0x18b0], 7
call fcn.00401e30
mov eax, dword [esp + 0x54]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 6
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41294e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412974
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push edi
lea ecx, [esp + 0x24]
call fcn.00401e30
mov esi, dword [esp + 0x24]
push esi
push SysReAllocString
call fcn.0040a010
mov edi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
add esp, 8
push esi
push SysReAllocString
call edi
push ebx
lea ecx, [esp + 0x44]
call fcn.00402470
push 0x5c
push esi
mov byte [esp + 0x18b4], 8
call fcn.0042dfa2
add esp, 8
test eax, eax
jne 0x4129c4
or eax, 0xffffffff
jmp 0x4129c6
sub eax, esi
push eax
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x2c]
call fcn.00403670
mov esi, dword [esp + 0x48]
push esi
push SysReAllocString
mov byte [esp + 0x18b4], 9
call fcn.0040a110
add esp, 8
cmp eax, 1
jne 0x4129fc
push esi
push SysReAllocString
call edi
mov ecx, dword [esp + 0x20]
push ecx
push SysReAllocString
call fcn.0040a110
add esp, 8
cmp eax, 1
jne 0x412a42
mov edx, dword [esp + 0x20]
push edx
push SysReAllocString
call edi
push str.SOFTWARECANON_
push SysReAllocString
call fcn.0040a110
add esp, 8
cmp eax, 1
jne 0x412a42
push str.SOFTWARECANON_
push SysReAllocString
call edi
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0
push 0
push 3
push 0
push 0
call sub.WINSPOOL.DRV_EnumPrinterDriversA
test eax, eax
jne 0x412a84
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x412a84
lea eax, [esi - 0x10]
mov byte [esp + 0x18ac], 8
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x412ab7
mov eax, dword [esp + 0x18]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
mov dword [esp + 0x3c], edi
jne 0x412bd7
lea eax, [esi - 0x10]
mov byte [esp + 0x18ac], 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412ac1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412ae7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412b0d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412b33
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412b59
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412b7f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412ba5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov dword [esp + 0x18ac], 0xffffffff
call fcn.0044608e
mov ecx, dword [eax + 4]
call fcn.00441833
mov eax, 1
mov ecx, dword [esp + 0x18a4]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edx
push edi
push 3
push 0
push 0
call sub.WINSPOOL.DRV_EnumPrinterDriversA
test eax, eax
je 0x412c73
mov eax, dword [esp + 0x1c]
xor esi, esi
test eax, eax
mov dword [esp + 0x14], esi
jbe 0x412c35
add edi, 4
jmp 0x412c10
mov ecx, dword [edi]
lea eax, [esp + 0x268]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x412c31
mov eax, dword [esp + 0x1c]
inc esi
add edi, 0x28
cmp esi, eax
jb 0x412c10
mov dword [esp + 0x14], esi
call fcn.00404100
cmp eax, 6
je 0x412c79
cmp eax, 0xa
je 0x412c79
cmp eax, 5
jne 0x412d7c
mov eax, dword [esp + 0x3c]
lea edx, [esi + esi*4]
mov ecx, dword [eax + edx*8 + 4]
lea edi, [eax + edx*8 + 4]
push ebx
push ecx
call fcn.00409e40
add esp, 8
test eax, eax
jne 0x412d7c
jmp 0x412d58
mov esi, dword [esp + 0x14]
jmp 0x412c35
mov eax, dword [esp + 0x14]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x3c]
lea esi, [eax + edx*8]
mov ecx, dword [esi + 4]
lea edi, [esi + 4]
push ebx
push ecx
call fcn.00409e40
add esp, 8
test eax, eax
jne 0x412d7c
push esi
lea ebx, [esp + 0x164]
call fcn.0040de40
add esp, 4
push 0x44c89c
mov dword [esp + 0x3c], eax
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x412d58
mov edx, dword [esp + 0x34]
mov eax, dword [edx + 0x214]
test eax, eax
je 0x412d03
push str.SPOOLER
call fcn.00405570
push str.SPOOLER
call fcn.00409a00
mov eax, dword [esp + 0x3c]
add esp, 8
mov dword [eax + 0x214], 0
push str.DeletePrinterDriverExA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x412d24
mov ecx, dword [edi]
push 3
push 3
push ecx
push 0
push 0
call eax
mov dword [esp + 0x14], eax
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esp + 0x14], 1
jne 0x412d58
mov eax, dword [esp + 0x38]
test eax, eax
jne 0x412d58
mov edx, dword [esi + 0x20]
push 0
push edx
lea eax, [esp + 0x168]
push eax
call fcn.0040a1c0
add esp, 0xc
mov dword [esp + 0x44], 1
mov ecx, dword [edi]
push 0
push ecx
call fcn.004061b0
add esp, 8
test eax, eax
je 0x412d6e
call fcn.00407440
call fcn.00406800
test eax, eax
je 0x412d7c
call fcn.00408e60
mov edx, dword [esp + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x44]
test eax, eax
je 0x412da6
push str.SPOOLER
call fcn.00405570
push str.SPOOLER
call fcn.00409a00
add esp, 8
call fcn.0040ef70
test eax, eax
jne 0x412db4
call fcn.00407b50
mov esi, dword [esp + 0x2c]
push ecx
add esi, 0xfffffff0
mov dword [esp + 0x3c], esp
mov edi, esp
push esi
call fcn.004014e0
add eax, 0x10
add esp, 4
mov dword [edi], eax
call fcn.0040ccb0
mov eax, dword [esp + 0x54]
add esp, 4
cmp eax, 1
jne 0x412e09
lea eax, [esp + 0x470]
push eax
call fcn.0040aaa0
add esp, 4
cmp eax, 1
jne 0x412e09
push 0
push eax
lea ecx, [esp + 0x478]
push ecx
call fcn.0040a4e0
add esp, 0xc
mov eax, dword [esp + 0x48]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 8
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x412e2f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412e55
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412e7b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412ea1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412ec7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x18ac], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x412eed
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov byte [esp + 0x18ac], 0
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x412f0c
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
mov dword [esp + 0x18ac], 0xffffffff
call fcn.0044608e
mov ecx, dword [eax + 4]
call fcn.00441833
mov ecx, dword [esp + 0x18a4]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret