Function at 0x406423
Capabilities:
Persist via run registry key

Disassembly:
mov eax, 0x416c88
call fcn.0040ef50
sub esp, 0x64
push ebx
push esi
push edi
push str.CMainFrame::DeleteTargetKey2___n
mov dword [ebp - 4], 1
call fcn.004024eb
pop ecx
lea ecx, [ebp - 0x14]
call fcn.004013e3
xor ebx, ebx
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
mov dword [ebp - 0x24], ebx
call fcn.004013e3
mov edi, 0xf003f
lea ecx, [ebp + 0xc]
push edi
push ebx
push ebx
mov byte [ebp - 4], 3
call fcn.00401e04
push eax
lea ecx, [ebp - 0x50]
push dword [ebp + 8]
call fcn.0040dc20
cmp dword [ebp - 0x48], ebx
mov byte [ebp - 4], 4
je 0x40676f
push ebx
lea eax, [ebp - 0x2c]
push ebx
push eax
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x28], ebx
call fcn.0040dce6
mov byte [ebp - 4], 5
mov esi, 0x420bb0
push esi
push eax
lea ecx, [ebp - 0x14]
call fcn.00401618
push eax
call fcn.00401e9b
pop ecx
mov byte [ebp - 0xd], al
pop ecx
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x2c]
call fcn.00401563
cmp byte [ebp - 0xd], bl
je 0x40676f
push dword [ebp - 0x14]
push str.CMainFrame::DeleteTargetKey2___SubKey_name:_s_n
call fcn.004024eb
pop ecx
lea eax, [ebp + 0xc]
pop ecx
push 0x41c058
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.0040176a
add esp, 0xc
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 6
push ecx
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.004016fe
add esp, 0xc
push edi
push ebx
push ebx
mov ecx, eax
mov byte [ebp - 4], 7
call fcn.00401e04
push eax
lea ecx, [ebp - 0x60]
push dword [ebp + 8]
call fcn.0040dc20
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0xa
call fcn.00401563
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 9
call fcn.00401563
cmp dword [ebp - 0x58], ebx
je 0x406712
push esi
lea ecx, [ebp - 0x30]
call fcn.00401595
lea eax, [ebp - 0x30]
push 0x100
push eax
lea eax, [ebp - 0x40]
push str.Name
push eax
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 0xb
call fcn.0040df98
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0xc
call fcn.00401618
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xb
call fcn.00401563
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 9
call fcn.00401563
lea ecx, [ebp - 0x18]
call fcn.00401b7a
test eax, eax
jne 0x406719
lea eax, [ebp - 0x24]
push ebx
push eax
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x20], ebx
call fcn.00401e04
push eax
call sub.WINSPOOL.DRV_OpenPrinterA
test eax, eax
jne 0x4065d0
push str.CMainFrame::DeleteTargetKey2___Open_Error_n
call fcn.004024eb
pop ecx
mov dword [ebp - 0x20], 1
jmp 0x406690
push str.CMainFrame::DeleteTargetKey2___Open_Succees_n
call fcn.004024eb
pop ecx
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push 2
push dword [ebp - 0x24]
mov dword [ebp - 0x1c], ebx
call sub.WINSPOOL.DRV_GetPrinterA
cmp dword [ebp - 0x1c], ebx
jne 0x406616
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
push str.CMainFrame::DeleteTargetKey2___GetPrinter___error_hPrinter_d__needed_d__LastError_d_n
call fcn.004024eb
add esp, 0x10
mov dword [ebp - 0x20], 1
jmp 0x406688
push dword [ebp - 0x1c]
call fcn.0040efd0
pop ecx
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp - 0x1c]
push eax
push 2
push dword [ebp - 0x24]
call sub.WINSPOOL.DRV_GetPrinterA
test eax, eax
je 0x40666d
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x10]
cmp eax, ebx
jne 0x406656
push str.CMainFrame::DeleteTargetKey2___GetPrinter___error_pDriverName__NULL_n
mov dword [ebp - 0x20], 1
call fcn.004024eb
pop ecx
jmp 0x40667f
lea ecx, [ebp + 0x10]
push ecx
push eax
call fcn.00401e51
pop ecx
test al, al
pop ecx
je 0x40667f
push str.CMainFrame::DeleteTargetKey2___Delete_SubKey_n
jmp 0x406672
push str.CMainFrame::DeleteTargetKey2___GetPrinter___error_n
call fcn.004024eb
pop ecx
mov dword [ebp - 0x20], 1
push dword [ebp - 0x34]
call fcn.0040eaf0
pop ecx
push dword [ebp - 0x24]
call sub.WINSPOOL.DRV_ClosePrinter
cmp dword [ebp - 0x20], ebx
je 0x4066ea
push edi
push ebx
push ebx
push str.SOFTWAREMicrosoftWindowsCurrentVersion_run
push 0x80000001
lea ecx, [ebp - 0x70]
call fcn.0040dc20
cmp dword [ebp - 0x68], ebx
mov byte [ebp - 4], 0xd
je 0x4066c4
lea ecx, [ebp - 0x18]
call fcn.00401e04
push eax
lea ecx, [ebp - 0x70]
call fcn.0040df79
lea ecx, [ebp - 0x14]
call fcn.00401e04
push eax
lea ecx, [ebp - 0x50]
call fcn.0040de74
test eax, eax
jne 0x4066dc
inc dword [ebp - 0x28]
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 9
call fcn.0040dcd0
jmp 0x4066ed
inc dword [ebp - 0x28]
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 4
call fcn.0040dcd0
push ebx
lea eax, [ebp - 0x2c]
push dword [ebp - 0x28]
lea ecx, [ebp - 0x50]
push eax
call fcn.0040dce6
mov byte [ebp - 4], 5
jmp 0x4064a5
push str.CMainFrame::DeleteTargetKey2___SubKey_open_error_n
jmp 0x40671e
push str.CMainFrame::DeleteTargetKey2___Printer_name_error_n
call fcn.004024eb
pop ecx
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x60]
call fcn.0040dcd0
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 3
call fcn.0040dcd0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.00401563
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00401563
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], bl
call fcn.00401563
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x10]
call fcn.00401563
xor eax, eax
jmp 0x4067b8
push str.CMainFrame::DeleteTargetKey2___exit_n
call fcn.004024eb
pop ecx
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x50]
call fcn.0040dcd0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.00401563
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00401563
lea ecx, [ebp + 0xc]
mov byte [ebp - 4], bl
call fcn.00401563
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x10]
call fcn.00401563
push 1
pop eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0xc