Function at 0x407a30
Capabilities:
Persist via run registry key
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x41ea78
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
push ebx
push ebp
push esi
push edi
push str.CMainFrame::DeleteTargetKey2___n
mov dword [esp + 0x84], 1
call fcn.00403770
add esp, 4
lea ecx, [esp + 0x14]
call fcn.004017b0
xor ebp, ebp
lea ecx, [esp + 0x10]
mov byte [esp + 0x80], 2
mov dword [esp + 0x1c], ebp
call fcn.004017b0
mov eax, dword [esp + 0x8c]
push eax
push str.CMainFrame::DeleteTargetKey2___TargetKey_name_:__s_n
mov byte [esp + 0x88], 3
call fcn.00403770
add esp, 8
push 0xf003f
push ebp
push ebp
lea ecx, [esp + 0x98]
call fcn.00402cb0
mov ecx, dword [esp + 0x94]
push eax
push ecx
lea ecx, [esp + 0x4c]
call fcn.00413990
cmp dword [esp + 0x40], ebp
mov byte [esp + 0x80], 4
je 0x407efe
push ebp
push ebp
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x44]
mov dword [esp + 0x2c], ebp
call fcn.004134c0
push 0x4202b4
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x88], 5
call fcn.00401940
push eax
call fcn.004016b0
add esp, 8
lea ecx, [esp + 0x24]
mov bl, al
mov byte [esp + 0x80], 4
call fcn.00401910
test bl, bl
je 0x407f0b
jmp 0x407b30
mov eax, dword [esp + 0x14]
push eax
push str.CMainFrame::DeleteTargetKey2___SubKey_name_:__s_n
call fcn.00403770
push 0x4202c0
lea ecx, [esp + 0x98]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.004024e0
lea ecx, [esp + 0x28]
push ecx
push eax
lea edx, [esp + 0x48]
push edx
mov byte [esp + 0xa0], 6
call fcn.00402410
add esp, 0x20
push 0xf003f
push ebp
push ebp
mov ecx, eax
mov byte [esp + 0x8c], 7
call fcn.00402cb0
push eax
mov eax, dword [esp + 0x98]
push eax
lea ecx, [esp + 0x5c]
call fcn.00413990
lea ecx, [esp + 0x2c]
mov byte [esp + 0x80], 0xa
call fcn.00401910
lea ecx, [esp + 0x30]
mov byte [esp + 0x80], 9
call fcn.00401910
cmp dword [esp + 0x50], ebp
je 0x407e64
push 0x4202b4
lea ecx, [esp + 0x2c]
call fcn.00402390
push 0x100
lea ecx, [esp + 0x2c]
push ecx
push str.Name
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x58]
mov byte [esp + 0x90], 0xb
call fcn.00413720
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x84], 0xc
call fcn.00401940
lea ecx, [esp + 0x34]
mov byte [esp + 0x80], 0xb
call fcn.00401910
lea ecx, [esp + 0x28]
mov byte [esp + 0x80], 9
call fcn.00401910
lea ecx, [esp + 0x10]
call fcn.00401d50
test eax, eax
jne 0x407e6b
push ebp
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x18]
xor esi, esi
call fcn.00402cb0
push eax
call sub.WINSPOOL.DRV_OpenPrinterA
test eax, eax
jne 0x407c6a
push str.CMainFrame::DeleteTargetKey2___Open_Error_n
call fcn.00403770
add esp, 4
jmp 0x407d46
push str.CMainFrame::DeleteTargetKey2___Open_Succees_n
call fcn.00403770
mov edx, dword [esp + 0x20]
add esp, 4
lea ecx, [esp + 0x18]
push ecx
push ebp
push ebp
push 2
push edx
mov dword [esp + 0x2c], ebp
call sub.WINSPOOL.DRV_GetPrinterA
mov eax, dword [esp + 0x18]
cmp eax, ebp
jne 0x407cbb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x1c]
push eax
mov eax, dword [esp + 0x1c]
push eax
push ecx
push str.CMainFrame::DeleteTargetKey2___GetPrinter___error_hPrinter_d__needed_d__LastError_d_n
call fcn.00403770
add esp, 0x10
mov esi, 1
jmp 0x407d34
push eax
call fcn.0041563f
mov ecx, dword [esp + 0x20]
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x18]
push edx
push eax
push edi
push 2
push ecx
call sub.WINSPOOL.DRV_GetPrinterA
test eax, eax
je 0x407d15
mov eax, dword [edi + 0x10]
cmp eax, ebp
jne 0x407cf9
push str.CMainFrame::DeleteTargetKey2___GetPrinter___error_pDriverName__NULL_n
mov esi, 1
call fcn.00403770
jmp 0x407d24
lea edx, [esp + 0x90]
push edx
push eax
call fcn.00401610
add esp, 8
test al, al
je 0x407d27
push str.CMainFrame::DeleteTargetKey2___Delete_SubKey_n
jmp 0x407d1a
push str.CMainFrame::DeleteTargetKey2___GetPrinter___error_n
call fcn.00403770
mov esi, 1
add esp, 4
cmp edi, ebp
je 0x407d34
push edi
call fcn.0041563a
add esp, 4
mov eax, dword [esp + 0x1c]
push eax
call sub.WINSPOOL.DRV_ClosePrinter
cmp esi, ebp
je 0x407dfb
push 0xf003f
push ebp
push ebp
push str.SOFTWAREMicrosoftWindowsCurrentVersion_run
push 0x80000001
lea ecx, [esp + 0x7c]
call fcn.00413990
cmp dword [esp + 0x70], ebp
mov byte [esp + 0x80], 0xd
je 0x407d81
lea ecx, [esp + 0x10]
call fcn.00402cb0
push eax
lea ecx, [esp + 0x6c]
call fcn.004136f0
push 0xf003f
push ebp
push ebp
push str.SOFTWAREMicrosoftWindowsCurrentVersion_run
push 0x80000002
lea ecx, [esp + 0x6c]
call fcn.00413990
cmp dword [esp + 0x60], ebp
mov byte [esp + 0x80], 0xe
je 0x407dbc
lea ecx, [esp + 0x10]
call fcn.00402cb0
push eax
lea ecx, [esp + 0x5c]
call fcn.004136f0
lea ecx, [esp + 0x14]
call fcn.00402cb0
push eax
lea ecx, [esp + 0x3c]
call fcn.00413a10
test eax, eax
jne 0x407dd7
inc dword [esp + 0x20]
lea ecx, [esp + 0x58]
mov byte [esp + 0x80], 0xd
call fcn.00413420
lea ecx, [esp + 0x68]
mov byte [esp + 0x80], 9
call fcn.00413420
jmp 0x407dff
inc dword [esp + 0x20]
lea ecx, [esp + 0x48]
mov byte [esp + 0x80], 4
call fcn.00413420
mov ecx, dword [esp + 0x20]
push ebp
push ecx
lea edx, [esp + 0x2c]
push edx
lea ecx, [esp + 0x44]
call fcn.004134c0
push 0x4202b4
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x88], 5
call fcn.00401940
push eax
call fcn.004016b0
add esp, 8
lea ecx, [esp + 0x24]
mov bl, al
mov byte [esp + 0x80], 4
call fcn.00401910
test bl, bl
jne 0x407b30
jmp 0x407f0b
push str.CMainFrame::DeleteTargetKey2___SubKey_open_error_n
jmp 0x407e70
push str.CMainFrame::DeleteTargetKey2___Printer_name_error_n
call fcn.00403770
add esp, 4
lea ecx, [esp + 0x48]
mov byte [esp + 0x80], 4
call fcn.00413420
lea ecx, [esp + 0x38]
mov byte [esp + 0x80], 3
call fcn.00413420
lea ecx, [esp + 0x10]
mov byte [esp + 0x80], 2
call fcn.00401910
lea ecx, [esp + 0x14]
mov byte [esp + 0x80], 1
call fcn.00401910
lea ecx, [esp + 0x8c]
mov byte [esp + 0x80], 0
call fcn.00401910
lea ecx, [esp + 0x90]
mov dword [esp + 0x80], 0xffffffff
call fcn.00401910
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
add esp, 0x74
ret 0xc
push str.CMainFrame::DeleteTargetKey2___TargetKey_open_error_n
call fcn.00403770
add esp, 4
push str.CMainFrame::DeleteTargetKey2___exit_n
call fcn.00403770
add esp, 4
lea ecx, [esp + 0x38]
mov byte [esp + 0x80], 3
call fcn.00413420
lea ecx, [esp + 0x10]
mov byte [esp + 0x80], 2
call fcn.00401910
lea ecx, [esp + 0x14]
mov byte [esp + 0x80], 1
call fcn.00401910
lea ecx, [esp + 0x8c]
mov byte [esp + 0x80], 0
call fcn.00401910
lea ecx, [esp + 0x90]
mov dword [esp + 0x80], 0xffffffff
call fcn.00401910
mov ecx, dword [esp + 0x78]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x74
ret 0xc