Function at 0x140050de0
Capabilities:
Get common file path
Get program files directory
Set current directory

Disassembly:
mov qword [rsp + 8], rcx
mov eax, 0x2b48
call fcn.140054680
sub rsp, rax
mov qword [rsp + 0x2b28], 0xfffffffffffffffe
mov rax, qword [0x140079ca0]
xor rax, rsp
mov qword [rsp + 0x2b30], rax
call fcn.140005fb0
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
add rax, 0x140
mov qword [rsp + 0x490], rax
mov rax, qword [rsp + 0x58]
add rax, 0x43e4
mov qword [rsp + 0x28e0], rax
mov rax, qword [rsp + 0x58]
add rax, 0x15b48
mov qword [rsp + 0x24b0], rax
mov rax, qword [rsp + 0x58]
add rax, 0x15d54
mov qword [rsp + 0x60], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x104
lea r9, [rsp + 0x28f0]
mov r8d, 1
xor edx, edx
xor ecx, ecx
call sub.WINSPOOL.DRV_GetPrinterDriverDirectoryW
test eax, eax
jne 0x140050e9a
xor eax, eax
mov word [rsp + 0x28f0], ax
mov rcx, qword [rsp + 0x2b50]
add rcx, 0x7c0
lea rdx, [rsp + 0x28f0]
call fcn.1400043e0
mov rcx, qword [rsp + 0x2b50]
add rcx, 0x7c0
call fcn.140003700
mov rcx, qword [rsp + 0x28e0]
add rcx, 0x414
mov rdx, rax
call fcn.140004cf0
mov rcx, qword [rsp + 0x28e0]
add rcx, 0x414
lea rdx, [0x140064e14]
call fcn.140004d20
lea rdx, [0x140064e90]
lea rcx, [rsp + 0x280]
call fcn.140004cf0
mov rdx, qword [rsp + 0x28e0]
add rdx, 0x414
lea r8, [rsp + 0x280]
mov rcx, qword [rsp + 0x2b50]
call fcn.14004e6b0
test eax, eax
jne 0x140050f42
mov eax, 4
jmp 0x140051381
mov rcx, qword [rsp + 0x28e0]
add rcx, 0x414
lea rdx, [rsp + 0x280]
call fcn.140004d20
mov rdx, qword [rsp + 0x28e0]
add rdx, 0x414
mov rcx, qword [rsp + 0x490]
add rcx, 0x418
call fcn.140004cf0
lea rcx, [rsp + 0x4a0]
call fcn.140045240
nop
lea rcx, [rsp + 0x2b00]
call fcn.140003710
nop
xor r9d, r9d
mov r8d, 0x26
lea rdx, [rsp + 0x70]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
cmp eax, 1
je 0x140050fea
mov dword [rsp + 0x2b08], 9
lea rcx, [rsp + 0x2b00]
call fcn.140003760
nop
lea rcx, [rsp + 0x4a0]
call fcn.140045220
mov eax, dword [rsp + 0x2b08]
jmp 0x140051381
lea rdx, [0x140064e24]
lea rcx, [rsp + 0x70]
call fcn.140004d20
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0x104
lea r9, [rsp + 0x26d0]
mov r8d, 0x104
lea rdx, [rsp + 0x24c0]
lea rcx, [rsp + 0x70]
call fcn.14002fc08
mov qword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x26d0]
lea rdx, [rsp + 0x24c0]
lea rcx, [rsp + 0x70]
call fcn.140005dc0
mov r8, qword [rsp + 0x24b0]
add r8, 4
lea rdx, [rsp + 0x2b00]
lea rcx, [rsp + 0x4a0]
call fcn.140046cb0
cmp eax, 1
je 0x1400510c6
mov dword [rsp + 0x2b0c], 0xd
lea rcx, [rsp + 0x2b00]
call fcn.140003760
nop
lea rcx, [rsp + 0x4a0]
call fcn.140045220
mov eax, dword [rsp + 0x2b0c]
jmp 0x140051381
lea rcx, [rsp + 0x2b00]
call fcn.140003700
mov rdx, rax
lea rcx, [rsp + 0x26d0]
call fcn.140004cf0
mov r8, qword [rsp + 0x24b0]
add r8, 4
lea rdx, [rsp + 0x2b00]
lea rcx, [rsp + 0x4a0]
call fcn.140046910
cmp eax, 1
je 0x14005113b
mov dword [rsp + 0x2b10], 0xd
lea rcx, [rsp + 0x2b00]
call fcn.140003760
nop
lea rcx, [rsp + 0x4a0]
call fcn.140045220
mov eax, dword [rsp + 0x2b10]
jmp 0x140051381
lea rcx, [rsp + 0x2b00]
call fcn.140003700
mov rcx, qword [rsp + 0x60]
add rcx, 0x414
mov rdx, rax
call fcn.140004d20
mov rdx, qword [rsp + 0x60]
add rdx, 0x414
lea rcx, [rsp + 0x26d0]
call fcn.140004d20
lea rdx, [0x140064e98]
lea rcx, [rsp + 0x26d0]
call fcn.140004d20
lea r8, [rsp + 0x26d0]
lea rdx, [rsp + 0x70]
mov rcx, qword [rsp + 0x2b50]
call fcn.14004e6b0
test eax, eax
jne 0x1400511d9
mov dword [rsp + 0x2b14], 4
lea rcx, [rsp + 0x2b00]
call fcn.140003760
nop
lea rcx, [rsp + 0x4a0]
call fcn.140045220
mov eax, dword [rsp + 0x2b14]
jmp 0x140051381
mov rcx, qword [rsp + 0x490]
add rcx, 0x3a78
lea rdx, [rsp + 0x70]
call fcn.140004cf0
mov rcx, qword [rsp + 0x490]
add rcx, 0x3a78
lea rdx, [rsp + 0x26d0]
call fcn.140004d20
mov rdx, qword [rsp + 0x490]
add rdx, 0x3870
mov rcx, qword [rsp + 0x490]
add rcx, 0x3e88
call fcn.140004cf0
mov r8, qword [rsp + 0x24b0]
add r8, 4
lea rdx, [rsp + 0x2b00]
lea rcx, [rsp + 0x4a0]
call fcn.140046880
cmp eax, 1
je 0x140051289
mov dword [rsp + 0x2b18], 0xd
lea rcx, [rsp + 0x2b00]
call fcn.140003760
nop
lea rcx, [rsp + 0x4a0]
call fcn.140045220
mov eax, dword [rsp + 0x2b18]
jmp 0x140051381
mov rdx, qword [rsp + 0x490]
add rdx, 0x3e88
mov rcx, qword [rsp + 0x490]
add rcx, 0x3a78
call fcn.1400301f8
test eax, eax
je 0x14005130c
lea rcx, [rsp + 0x2b00]
call fcn.140003700
mov rcx, qword [rsp + 0x60]
add rcx, 0x20c
mov rdx, rax
call fcn.140004d20
mov rdx, qword [rsp + 0x60]
add rdx, 0x20c
mov rcx, qword [rsp + 0x490]
add rcx, 0x3870
call fcn.140004d20
mov rcx, qword [rsp + 0x490]
add rcx, 0x3870
lea rdx, [0x140064e9c]
call fcn.140004d20
mov rcx, qword [rsp + 0x490]
add rcx, 0x3870
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x140051354
mov dword [rsp + 0x2b1c], 4
lea rcx, [rsp + 0x2b00]
call fcn.140003760
nop
lea rcx, [rsp + 0x4a0]
call fcn.140045220
mov eax, dword [rsp + 0x2b1c]
jmp 0x140051381
mov dword [rsp + 0x2b20], 0
lea rcx, [rsp + 0x2b00]
call fcn.140003760
nop
lea rcx, [rsp + 0x4a0]
call fcn.140045220
mov eax, dword [rsp + 0x2b20]
mov rcx, qword [rsp + 0x2b30]
xor rcx, rsp
call fcn.14002f9d0
add rsp, 0x2b48
ret