Function at 0x405840
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
mov eax, dword [0x427120]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor eax, eax
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x40c], eax
mov dword [ebp - 0x408], eax
mov dword [ebp - 0x418], eax
mov dword [ebp - 0x414], eax
mov dword [ebp - 0x410], eax
call fcn.004065d0
test eax, eax
je 0x40589e
push str.PdfsInstaller.UninstallPdfsPrinter__start.
push 0x41e6ec
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
mov ecx, esi
mov dword [ebp - 0x410], 0xf000c
call fcn.00402830
lea eax, [ebp - 0x418]
push eax
lea ecx, [ebp - 0x408]
push ecx
push edi
call sub.WINSPOOL.DRV_OpenPrinterW
test eax, eax
je 0x405a22
call fcn.004065d0
test eax, eax
je 0x4058ec
push str.PdfsInstaller.UninstallPdfsPrinter__check_printer_has_jobs.
push 0x41e6ec
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
mov edx, dword [ebp - 0x408]
push 0x4200c8
push edx
mov ecx, esi
call fcn.00401de0
test al, al
je 0x405959
call fcn.004065d0
test eax, eax
je 0x405924
push str.PdfsInstaller.UninstallPdfsPrinter__start_cancel_all_print_jobs.
push 0x41e6ec
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
mov eax, dword [ebp - 0x408]
push eax
mov ecx, esi
call fcn.00401f20
mov ebx, eax
test ebx, ebx
je 0x405959
call fcn.004065d0
test eax, eax
je 0x405959
push str.PdfsInstaller.UninstallPdfsPrinter__FAILED_to_cancel_all_print_jobs.
push 0x41e6ec
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
call fcn.004065d0
test eax, eax
je 0x40597a
push str.PdfsInstaller.UninstallPdfsPrinter__check_other_printers_installed.
push 0x41e6ec
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
mov ecx, dword [ebp - 0x408]
push edi
push ecx
mov ecx, esi
call fcn.00402050
movzx edx, al
mov dword [ebp - 0x40c], edx
call fcn.004065d0
test eax, eax
je 0x4059b3
push str.PdfsInstaller.UninstallPdfsPrinter__Before_delete_printer...
push 0x41e6ec
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
mov eax, dword [ebp - 0x408]
push eax
call sub.WINSPOOL.DRV_DeletePrinter
test eax, eax
jne 0x4059f7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.004065d0
test eax, eax
je 0x405a14
push ebx
push edi
push str.PdfsInstaller.UninstallPdfsPrinter__FAILED_to_delete_printer___s___error___d
call fcn.004065d0
push eax
call fcn.004063d0
mov ecx, dword [ebp - 0x408]
add esp, 0x10
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
jmp 0x405a48
call fcn.004065d0
test eax, eax
je 0x405a14
push edi
push str.PdfsInstaller.UninstallPdfsPrinter__deleted_printer___s_
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
mov ecx, dword [ebp - 0x408]
push ecx
call sub.WINSPOOL.DRV_ClosePrinter
jmp 0x405a48
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.004065d0
test eax, eax
je 0x405a48
push ebx
push edi
push str.PdfsInstaller.UninstallPdfsPrinter__FAILED_to_open_printer___s__Error___d
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0x10
cmp byte [ebp + 0xc], 0
je 0x405abd
call fcn.004065d0
test eax, eax
je 0x405a6f
push str.PdfsInstaller.UninstallPdfsPrinter__before_delete_profiles.
push 0x41e6ec
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
push edi
mov ecx, esi
call fcn.00403390
cmp dword [0x42a1e8], 0
jne 0x405a9c
lea edx, [ebp - 0x404]
push edx
push edi
mov ecx, esi
call fcn.00402b40
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.004065d0
test eax, eax
je 0x405abd
push str.PdfsInstaller.UninstallPdfsPrinter__after_delete_profiles.
push 0x41e6ec
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
cmp dword [ebp - 0x40c], 0
jne 0x405bfb
call fcn.004065d0
test eax, eax
je 0x405aeb
push str.PdfsInstaller.UninstallPdfsPrinter__Before_delete_monitor...
push 0x41e6ec
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
lea edi, [esi + 0x240]
push edi
push 0
push 0
call sub.WINSPOOL.DRV_DeleteMonitorW
test eax, eax
jne 0x405b27
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.004065d0
test eax, eax
je 0x405b44
push ebx
push edi
push str.PdfsInstaller.UninstallPdfsPrinter__did_NOT_delete_port_monitor:___s___error___d
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0x10
jmp 0x405b44
call fcn.004065d0
test eax, eax
je 0x405b44
push edi
push str.PdfsInstaller.UninstallPdfsPrinter__deleted_monitor___s_
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
call fcn.004065d0
test eax, eax
je 0x405b65
push str.PdfsInstaller.UninstallPdfsPrinter__Before_delete_printer_driver...
push 0x41e6ec
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
push 0
push 1
push esi
push 0
push 0
call sub.WINSPOOL.DRV_DeletePrinterDriverExW
test eax, eax
jne 0x405b9f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
call fcn.004065d0
test eax, eax
je 0x405bbc
push edi
push esi
push str.PdfsInstaller.UninstallPdfsPrinter__did_NOT_delete_printer_driver:___s___error___d
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0x10
jmp 0x405bbc
call fcn.004065d0
test eax, eax
je 0x405bbc
push esi
push str.PdfsInstaller.UninstallPdfsPrinter__deleted_printer_driver___s_
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
call fcn.004065d0
test eax, eax
je 0x405bdd
push str.PdfsInstaller.UninstallPdfsPrinter__Before_delete_files...
push 0x41e6ec
call fcn.004065d0
push eax
call fcn.004063d0
add esp, 0xc
mov ecx, dword [ebp + 0x10]
push ecx
mov ecx, esi
call fcn.00404bc0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040ae4c
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0040ae4c
mov esp, ebp
pop ebp
ret 0xc