Function at 0x140006310
Capabilities:
Delete file
Get common file path

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
mov eax, 0x1328
call fcn.140013610
sub rsp, rax
mov rax, qword [0x140018160]
xor rax, rsp
mov qword [rsp + 0x1310], rax
lea rax, [rsp + 0x6e0]
mov rdi, rcx
xor r14d, r14d
mov r13d, 0x4000
or r9d, 0xffffffff
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x28], 0x410
mov rsi, r14
mov rbx, r14
mov r12w, r13w
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea r8, [rsp + 0x6e0]
lea rdx, [rsp + 0xa0]
xor ecx, ecx
call fcn.140003870
test eax, eax
jne 0x140006395
or eax, 0xffffffff
jmp 0x140006793
lea rdx, [rsp + 0xf00]
mov r8d, 0x208
mov rcx, rdi
mov qword [rsp + 0x1368], rbp
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0xa0]
xor r8d, r8d
mov qword [rsp + 0x38], r14
mov rbp, r14
call sub.WINSPOOL.DRV_OpenPrinterW
mov edi, 1
test eax, eax
je 0x14000659d
mov rdx, qword [rsp + 0x38]
lea r8, [rsp + 0xa0]
xor r9d, r9d
xor ecx, ecx
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x1320], r15
mov qword [rsp + 0x20], r14
call sub.WINSPOOL.DRV_DocumentPropertiesW
movsxd rcx, eax
mov dword [rsp + 0x30], eax
call fcn.14000680c
movsxd rcx, dword [rsp + 0x30]
mov rbx, rax
call fcn.14000680c
lea r15d, [rdi + 1]
mov rsi, rax
test rbx, rbx
je 0x1400064eb
test rax, rax
je 0x1400064eb
mov rdx, qword [rsp + 0x38]
lea r8, [rsp + 0xa0]
mov r9, rbx
xor ecx, ecx
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r14
call sub.WINSPOOL.DRV_DocumentPropertiesW
mov r12d, 0x7fff
mov eax, 0x100
mov word [rbx + 0x4e], ax
mov word [rbx + 0x52], r12w
mov word [rbx + 0x50], r12w
mov eax, dword [rsp + 0x6cc]
mov r13w, r12w
cmp dword [rsp + 0x6c8], eax
jle 0x14000648e
mov word [rbx + 0x4c], r15w
jmp 0x140006492
mov word [rbx + 0x4c], di
bt dword [rbx + 0x48], 0xb
jae 0x1400064a4
cmp word [rbx + 0x5c], di
jne 0x1400064a4
mov word [rbx + 0x5c], r15w
mov eax, 0x404
lea r8, [rsp + 0xa0]
mov r9, rsi
mov word [rbx + 0x58], ax
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
mov dword [rsp + 0x28], 0xa
mov qword [rsp + 0x20], rbx
call sub.WINSPOOL.DRV_DocumentPropertiesW
movzx r11d, word [rsp + 0x4a4]
mov word [rsi + 0x5a], r11w
movzx eax, word [rsp + 0x4a4]
mov word [rsi + 0x60], ax
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
mov edx, r15d
mov qword [rsp + 0x20], rax
call sub.WINSPOOL.DRV_GetPrinterW
movsxd rcx, dword [rsp + 0x30]
call fcn.14000680c
mov rdi, rax
test rax, rax
je 0x140006595
mov r9d, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov r8, rdi
mov edx, r15d
mov qword [rsp + 0x20], rax
call sub.WINSPOOL.DRV_GetPrinterW
test eax, eax
je 0x14000658d
mov rcx, qword [rdi + 0x18]
lea rdx, str.FILE:
call fcn.140006ffc
test rax, rax
je 0x14000658d
mov ecx, 0x208
call fcn.14000680c
lea rdx, [rsp + 0xaf0]
mov ecx, 0x208
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rdx, [0x1400153e0]
lea rcx, [rsp + 0xaf0]
mov r9, rbp
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov rcx, rdi
call fcn.1400067cc
mov r15, qword [rsp + 0x1320]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1400065b1
call sub.WINSPOOL.DRV_ClosePrinter
mov qword [rsp + 0x38], r14
lea rdx, [rsp + 0xa0]
lea rcx, str.WINSPOOL
mov r9, rsi
xor r8d, r8d
call qword [sym.imp.GDI32.dll_CreateDCW]
mov rdi, rax
test rax, rax
je 0x140006720
cmp dword [rsp + 0x4a0], 1
lea rax, [rsp + 0xf00]
mov dword [rsp + 0x40], 0x28
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x2a0]
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x60], r14d
jne 0x14000665b
lea rcx, [rsp + 0x40]
lea rdx, [rsp + 0x70]
lea r9, [rsp + 0x70]
mov rax, qword [rcx]
xor r8d, r8d
mov qword [rsp + 0x20], rbp
mov qword [rdx], rax
mov rax, qword [rcx + 8]
mov qword [rdx + 8], rax
mov rax, qword [rcx + 0x10]
mov qword [rdx + 0x10], rax
mov rax, qword [rcx + 0x18]
mov qword [rdx + 0x18], rax
mov rax, qword [rcx + 0x20]
mov rcx, rdi
mov qword [rdx + 0x20], rax
lea rdx, [rsp + 0xa0]
call fcn.140005460
mov rcx, rdi
call qword [sym.imp.GDI32.dll_EndPage]
mov rcx, rdi
call qword [sym.imp.GDI32.dll_EndDoc]
cmp dword [rsp + 0x4a0], 1
jne 0x14000669b
cmp dword [rsp + 0x61c], r14d
je 0x14000669b
cmp dword [rsp + 0x614], r14d
jne 0x14000669b
lea rdx, [rsp + 0xa0]
mov rcx, rdi
call fcn.140003710
mov rcx, rdi
call qword [sym.imp.GDI32.dll_DeleteDC]
test rbp, rbp
je 0x1400066ba
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, rbp
call fcn.1400067cc
mov eax, dword [rsp + 0x4ac]
mov r8d, dword [rsp + 0x4a4]
xor edx, edx
movsx ecx, r13w
mov dword [rsp + 0x4b4], r14d
imul eax, eax, 0xfe
div r8d
cmp eax, ecx
jge 0x1400066fe
mov eax, dword [rsp + 0x4b0]
xor edx, edx
movsx ecx, r12w
imul eax, eax, 0xfe
div r8d
cmp eax, ecx
jl 0x140006709
mov dword [rsp + 0x4b4], 1
lea r8, [rsp + 0x6e0]
lea rdx, [rsp + 0xa0]
xor ecx, ecx
call fcn.1400041d0
mov rbp, qword [rsp + 0x1368]
test rbx, rbx
je 0x140006735
mov rcx, rbx
call fcn.1400067cc
test rsi, rsi
je 0x140006742
mov rcx, rsi
call fcn.1400067cc
lea rcx, [rsp + 0x6e0]
mov edx, 0x5c
call fcn.140006fd0
test rax, rax
jne 0x140006763
lea rax, [rsp + 0x6e0]
jmp 0x140006767
add rax, 2
mov r9, rax
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rbx, rax
test rax, rax
je 0x140006791
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rcx, qword [rsp + 0x1310]
xor rcx, rsp
call fcn.140006ba0
add rsp, 0x1328
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret