Function at 0x140014250
Capabilities:
Get common file path

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x480
mov rax, qword [0x14012df80]
xor rax, rsp
mov qword [rsp + 0x470], rax
xor esi, esi
cmp r8d, 0x101d0
mov rbx, rdx
mov r12, rcx
je case.0x1400142b9.11
sub r8d, 1
cmp r8d, 0x36
ja case.0x1400142b9.14
lea rdx, [0x140000000]
movsxd rax, r8d
mov edi, 0x104
movzx eax, byte [rdx + rax + 0x14b40]
mov ebp, 0x8007007a
mov ecx, dword [rdx + rax*4 + 0x14b08]
add rcx, rdx
jmp rcx
lea rdx, [rsp + 0x50]
mov r8d, edi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je case.0x1400142b9.14
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x260]
mov r9d, edi
mov rcx, r12
call fcn.140013370
test eax, eax
je case.0x1400142b9.14
lea rcx, [rsp + 0x260]
xor ebp, ebp
sub rcx, rbx
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x140014335
movzx eax, word [rcx + rbx]
test ax, ax
je 0x140014335
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x140014300
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
test rdi, rdi
jne 0x140014343
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
lea rcx, [rsp + 0x50]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
test eax, eax
je case.0x1400142b9.14
lea rcx, [rsp + 0x50]
xor ebp, ebp
sub rcx, rbx
nop
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x1400143a5
movzx eax, word [rcx + rbx]
test ax, ax
je 0x1400143a5
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x140014370
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
test rdi, rdi
jne 0x140014343
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
lea rcx, [rsp + 0x50]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je case.0x1400142b9.14
lea rcx, [rsp + 0x50]
xor ebp, ebp
sub rcx, rbx
nop
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x140014415
movzx eax, word [rcx + rbx]
test ax, ax
je 0x140014415
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x1400143e0
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
test rdi, rdi
jne 0x140014343
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
lea rcx, [rsp + 0x50]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je case.0x1400142b9.14
lea r8, str.drivers
lea rdx, [rsp + 0x50]
mov r9d, edi
mov rcx, r12
call fcn.140012f30
test eax, eax
je case.0x1400142b9.14
lea rcx, [rsp + 0x50]
xor ebp, ebp
sub rcx, rbx
nop
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x1400144a5
movzx eax, word [rcx + rbx]
test ax, ax
je 0x1400144a5
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x140014470
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
test rdi, rdi
jne 0x140014343
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
lea rcx, [rsp + 0x50]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
test eax, eax
je case.0x1400142b9.14
lea r8, [0x1400fc5a8]
lea rdx, [rsp + 0x50]
mov r9d, edi
mov rcx, r12
call fcn.140012f30
test eax, eax
je case.0x1400142b9.14
lea rcx, [rsp + 0x50]
xor ebp, ebp
sub rcx, rbx
nop
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x140014535
movzx eax, word [rcx + rbx]
test ax, ax
je 0x140014535
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x140014500
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
test rdi, rdi
jne 0x140014343
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
lea rcx, [rsp + 0x50]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
test eax, eax
je case.0x1400142b9.14
lea r8, str.help
lea rdx, [rsp + 0x50]
mov r9d, edi
mov rcx, r12
call fcn.140012f30
test eax, eax
je case.0x1400142b9.14
lea rcx, [rsp + 0x50]
xor ebp, ebp
sub rcx, rbx
nop
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x1400145c5
movzx eax, word [rcx + rbx]
test ax, ax
je 0x1400145c5
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x140014590
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
test rdi, rdi
jne 0x140014343
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
lea rcx, [rsp + 0x50]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
test eax, eax
je case.0x1400142b9.14
lea rcx, [rsp + 0x50]
xor ebp, ebp
sub rcx, rbx
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x140014635
movzx eax, word [rcx + rbx]
test ax, ax
je 0x140014635
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x140014600
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
test rdi, rdi
jne 0x140014343
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
call fcn.1400a02a0
lea rdx, [rsp + 0x50]
mov r8d, edi
mov rcx, qword [rax + 8]
mov qword [rsp + 0x38], rcx
mov rax, qword [rcx + 0x140]
mov qword [rsp + 0x40], rax
mov rax, qword [rcx + 0x148]
lea rcx, [rsp + 0x38]
mov qword [rsp + 0x48], rax
call fcn.140051230
test eax, eax
je case.0x1400142b9.14
lea rcx, [rsp + 0x50]
xor ebp, ebp
sub rcx, rbx
nop
nop
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x1400146d5
movzx eax, word [rcx + rbx]
test ax, ax
je 0x1400146d5
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x1400146a0
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
test rdi, rdi
jne 0x140014343
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
lea rcx, [rsp + 0x50]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
test eax, eax
je case.0x1400142b9.14
lea r8, str.system
lea rdx, [rsp + 0x50]
mov r9d, edi
mov rcx, r12
call fcn.140012f30
test eax, eax
je case.0x1400142b9.14
lea rcx, [rsp + 0x50]
xor ebp, ebp
sub rcx, rbx
nop
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x140014765
movzx eax, word [rcx + rbx]
test ax, ax
je 0x140014765
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x140014730
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
test rdi, rdi
jne 0x140014343
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
lea rcx, [rsp + 0x50]
mov edx, edi
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je case.0x1400142b9.14
lea r8, str.spool
lea rdx, [rsp + 0x50]
mov r9d, edi
mov rcx, r12
call fcn.140012f30
test eax, eax
je case.0x1400142b9.14
lea rcx, [rsp + 0x50]
xor ebp, ebp
sub rcx, rbx
nop
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x1400147f5
movzx eax, word [rcx + rbx]
test ax, ax
je 0x1400147f5
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x1400147c0
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
test rdi, rdi
jne 0x140014343
sub rbx, 2
mov ebp, 0x8007007a
mov word [rbx], si
test ebp, ebp
jmp 0x140014ae4
lea rcx, [rsp + 0x30]
call qword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jne case.0x1400142b9.13
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x50]
mov cx, 0x28
call fcn.140014180
test eax, eax
je case.0x1400142b9.13
lea r8, [rsp + 0x50]
xor r9d, r9d
mov rdx, rdi
sub r8, rbx
mov rcx, rbx
nop
nop
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x140014875
movzx eax, word [r8 + rcx]
test ax, ax
je 0x140014875
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x140014850
jmp 0x14001487a
test rdx, rdx
jne 0x140014881
sub rcx, 2
mov r9d, ebp
test r9d, r9d
mov word [rcx], si
sete sil
call fcn.1400a02a0
lea rdx, [rsp + 0x50]
mov r8d, edi
mov rcx, qword [rax + 8]
mov qword [rsp + 0x38], rcx
mov rax, qword [rcx + 0x140]
mov qword [rsp + 0x40], rax
mov rax, qword [rcx + 0x148]
lea rcx, [rsp + 0x38]
mov qword [rsp + 0x48], rax
call fcn.1400510e0
test eax, eax
je case.0x1400142b9.14
lea rcx, [rsp + 0x50]
xor edx, edx
sub rcx, rbx
nop
nop
nop
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x140014912
movzx eax, word [rcx + rbx]
test ax, ax
je 0x140014912
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x1400148e0
sub rbx, 2
mov edx, ebp
xor esi, esi
mov word [rbx], di
jmp 0x140014ae2
test rdi, rdi
jne 0x14001491d
sub rbx, 2
mov edx, ebp
mov word [rbx], 0
xor esi, esi
jmp 0x140014ae2
mov qword [rsp + 0x4c0], r14
mov qword [rsp + 0x4c8], r15
call fcn.1400a02a0
mov r15, qword [rax + 8]
lea rax, [rsp + 0x50]
mov edi, 0x104
mov r14, qword [r15 + 0x140]
lea r9, str.lpszPath_x__nLen_u
lea r8, str.GetPrinterDriverDirectoryEx
lea rdx, str.CPrinterFunc
mov rcx, r15
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rax
call fcn.140080c70
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
xor r12d, r12d
xor r9d, r9d
lea r8d, [r12 + 1]
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x20], esi
call sub.WINSPOOL.DRV_GetPrinterDriverDirectoryW
mov eax, dword [rsp + 0x30]
mov ebp, 0x8007007a
test eax, eax
je 0x140014a66
mov qword [rsp + 0x4b0], r13
xor r13d, r13d
test eax, eax
mov r8, rax
je 0x1400149d7
mov rcx, qword [r14]
lea edx, [r12 + 8]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r13, rax
mov eax, dword [rsp + 0x30]
lea rcx, [rsp + 0x30]
xor edx, edx
mov r9, r13
mov qword [rsp + 0x28], rcx
lea r8d, [rdx + 1]
xor ecx, ecx
mov dword [rsp + 0x20], eax
call sub.WINSPOOL.DRV_GetPrinterDriverDirectoryW
test eax, eax
je 0x140014a4b
lea rax, [rsp + 0x50]
mov r8, r13
xor r9d, r9d
mov rdx, rdi
lea rcx, [rsp + 0x50]
sub r8, rax
nop
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x140014a35
movzx eax, word [rcx + r8]
test ax, ax
je 0x140014a35
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x140014a10
jmp 0x140014a3a
test rdx, rdx
jne 0x140014a41
sub rcx, 2
mov r9d, ebp
test r9d, r9d
mov word [rcx], si
sete r12b
test r13, r13
je 0x140014a5e
mov rcx, qword [r14]
mov r8, r13
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r13, qword [rsp + 0x4b0]
lea r9, [0x1400fb428]
lea r8, str.GetPrinterDriverDirectoryEx
lea rdx, str.CPrinterFunc
mov rcx, r15
mov dword [rsp + 0x20], r12d
call fcn.140080e70
test r12d, r12d
mov r15, qword [rsp + 0x4c8]
mov r14, qword [rsp + 0x4c0]
je case.0x1400142b9.14
lea rcx, [rsp + 0x50]
xor edx, edx
sub rcx, rbx
nop
nop
nop
lea rax, [rdi + 0x7ffffefa]
test rax, rax
je 0x140014ad4
movzx eax, word [rcx + rbx]
test ax, ax
je 0x140014ad4
mov word [rbx], ax
add rbx, 2
sub rdi, 1
jne 0x140014ab0
jmp 0x140014ad9
test rdi, rdi
jne 0x140014adf
sub rbx, 2
mov edx, ebp
mov word [rbx], si
test edx, edx
sete sil
mov eax, esi
mov rcx, qword [rsp + 0x470]
xor rcx, rsp
call fcn.1400cd6e0
add rsp, 0x480
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret