Function at 0x140007310
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.140014610
sub rsp, rax
mov rax, qword [0x140019160]
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.140004870
test eax, eax
jne 0x140007395
or eax, 0xffffffff
jmp 0x140007793
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 0x14000759d
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.14000780c
movsxd rcx, dword [rsp + 0x30]
mov rbx, rax
call fcn.14000780c
lea r15d, [rdi + 1]
mov rsi, rax
test rbx, rbx
je 0x1400074eb
test rax, rax
je 0x1400074eb
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 0x14000748e
mov word [rbx + 0x4c], r15w
jmp 0x140007492
mov word [rbx + 0x4c], di
bt dword [rbx + 0x48], 0xb
jae 0x1400074a4
cmp word [rbx + 0x5c], di
jne 0x1400074a4
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.14000780c
mov rdi, rax
test rax, rax
je 0x140007595
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 0x14000758d
mov rcx, qword [rdi + 0x18]
lea rdx, str.FILE:
call fcn.140007ffc
test rax, rax
je 0x14000758d
mov ecx, 0x208
call fcn.14000780c
lea rdx, [rsp + 0xaf0]
mov ecx, 0x208
mov rbp, rax
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rdx, [0x1400163e0]
lea rcx, [rsp + 0xaf0]
mov r9, rbp
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov rcx, rdi
call fcn.1400077cc
mov r15, qword [rsp + 0x1320]
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1400075b1
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 0x140007720
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 0x14000765b
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.140006460
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 0x14000769b
cmp dword [rsp + 0x61c], r14d
je 0x14000769b
cmp dword [rsp + 0x614], r14d
jne 0x14000769b
lea rdx, [rsp + 0xa0]
mov rcx, rdi
call fcn.140004710
mov rcx, rdi
call qword [sym.imp.GDI32.dll_DeleteDC]
test rbp, rbp
je 0x1400076ba
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, rbp
call fcn.1400077cc
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 0x1400076fe
mov eax, dword [rsp + 0x4b0]
xor edx, edx
movsx ecx, r12w
imul eax, eax, 0xfe
div r8d
cmp eax, ecx
jl 0x140007709
mov dword [rsp + 0x4b4], 1
lea r8, [rsp + 0x6e0]
lea rdx, [rsp + 0xa0]
xor ecx, ecx
call fcn.1400051d0
mov rbp, qword [rsp + 0x1368]
test rbx, rbx
je 0x140007735
mov rcx, rbx
call fcn.1400077cc
test rsi, rsi
je 0x140007742
mov rcx, rsi
call fcn.1400077cc
lea rcx, [rsp + 0x6e0]
mov edx, 0x5c
call fcn.140007fd0
test rax, rax
jne 0x140007763
lea rax, [rsp + 0x6e0]
jmp 0x140007767
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 0x140007791
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.140007ba0
add rsp, 0x1328
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret