Function at 0x140005ca0
Capabilities:
Get common file path

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x50
and qword [rax + 8], 0
xor esi, esi
and qword [rax - 0x38], rsi
xor r14d, r14d
mov rdi, r9
mov r13, rdx
mov rbp, rcx
test rcx, rcx
je 0x14002a37c
cmp dword [rcx], 0x6060
jne 0x14002a37c
cmp r8d, 1
jne 0x14002a1e4
cmp dword [rsp + 0xa0], 0x18
jb 0x14002a1fc
test r9, r9
je 0x14002a1eb
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_2.dll_GetCurrentProcess]
mov rsi, rax
test rax, rax
je 0x140005d76
mov rbx, qword [0x1400aad38]
cmp qword [rbp + 8], rbx
jne 0x14002a21a
mov rbx, qword [rbx + 0x2a0]
mov rcx, rbx
call qword [0x1400719c8]
mov rcx, qword [rbp + 0x10]
lea r8, [rsp + 0x80]
mov r9, rsi
mov qword [rsp + 0x20], r13
xor edx, edx
call rbx
mov r14d, eax
test eax, eax
je 0x140005d68
mov rax, qword [rsp + 0x80]
mov ebx, 1
mov dword [rdi], ebx
mov qword [rdi + 8], rax
mov dword [rdi + 0x10], ebx
test rsi, rsi
je 0x140005d76
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rcx, qword [rsp + 0x40]
test rcx, rcx
jne 0x140005d9c
lea r11, [rsp + 0x50]
mov eax, r14d
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret
call sym.spoolsv.exe_PrvDllFreeSplMem
jmp 0x140005d80
mov ecx, 0x7c
jmp 0x14002a1f0
mov ecx, 0x57
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError]
nop
jmp 0x140005d76
mov ecx, 0x7a
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError]
mov rax, qword [rsp + 0xa8]
mov dword [rax], 0x18
jmp 0x140005d76
mov rdx, qword [rbp + 0x38]
cmp rdx, 0xffffffffffffffff
je 0x14002a273
mov dword [rsp + 0x30], 2
lea r9, [rsp + 0x80]
mov ebx, 1
mov r8, r13
mov dword [rsp + 0x28], ebx
mov rcx, rax
and dword [rsp + 0x20], r14d
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_DuplicateHandle]
mov r14d, eax
test eax, eax
je 0x140005d68
mov rcx, qword [rsp + 0x80]
mov qword [rdi + 8], rcx
mov dword [rdi], ebx
mov dword [rdi + 0x10], 2
jmp 0x140005d68
cmp qword [rbp + 8], rbx
je 0x140005d23
mov rbx, qword [rbx + 0x2a0]
mov rcx, rbx
call qword [0x1400719c8]
and qword [rsp + 0x20], r14
lea rdx, [rsp + 0x40]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call rbx
mov r14d, eax
test eax, eax
je 0x140005d68
call sym.spoolsv.exe_PrvRevertToPrinterSelf
mov ecx, 0x208
mov r12, rax
call sym.spoolsv.exe_PrvDllAllocSplMem
mov qword [rbp + 0x40], rax
test rax, rax
je 0x14002a362
mov rcx, qword [rsp + 0x40]
lea rdx, [0x14009ceb8]
mov r9, rax
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetTempFileNameW]
test eax, eax
je 0x14002a362
and qword [rsp + 0x30], 0
xor r9d, r9d
and dword [rsp + 0x28], 0
mov edx, 0xc0000000
mov rcx, qword [rbp + 0x40]
mov dword [rsp + 0x20], 2
lea r8d, [r9 + 3]
call qword [sym.imp.api_ms_win_core_file_l1_2_1.dll_CreateFileW]
mov qword [rbp + 0x38], rax
cmp rax, 0xffffffffffffffff
je 0x14002a362
mov dword [rsp + 0x30], 2
lea r9, [rsp + 0x80]
mov ebx, 1
mov r8, r13
mov dword [rsp + 0x28], ebx
mov rdx, rax
and dword [rsp + 0x20], 0
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_DuplicateHandle]
test eax, eax
je 0x14002a362
mov rax, qword [rsp + 0x80]
mov qword [rdi + 8], rax
mov dword [rdi], ebx
mov dword [rdi + 0x10], 2
jmp 0x14002a365
xor r14d, r14d
test r12, r12
je 0x140005d68
mov rcx, r12
call sym.spoolsv.exe_PrvImpersonatePrinterClient
nop
jmp 0x140005d68
mov ecx, 6
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_1.dll_SetLastError]
nop
jmp 0x140005d68