Function at 0x140220df0
Capabilities:
Get common file path

Disassembly:
push r15
mov eax, 0x1108
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14028b3a0
sub rsp, rax
xor r13d, r13d
mov word [rcx], r13w
movzx eax, word [rdx]
mov rbx, rcx
mov rdi, r8
test ax, ax
je 0x140220e81
lea rsi, [rdx + 2]
xor edx, edx
lea rbp, [rsp + 0x900]
lea r13, [0x1402a72a8]
jmp 0x140220e4b
mov word [rdx], ax
add rdx, 2
movzx eax, word [rsi]
add rsi, 2
test ax, ax
je 0x140220e81
cmp ax, 0x7b
je 0x140220ea0
cmp ax, 0x7d
je 0x140220eb8
test rdx, rdx
jne 0x140220e38
test rdi, rdi
je 0x140221026
xor ecx, ecx
mov word [rbx], ax
sub rdi, 1
add rbx, 2
mov word [rbx], cx
movzx eax, word [rsi]
add rsi, 2
test ax, ax
jne 0x140220e4b
xor eax, eax
mov word [rbx], ax
mov eax, 1
add rsp, 0x1108
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
xor r12d, r12d
mov rdx, rbp
mov word [rsp + 0x900], r12w
jmp 0x140220e3f
xor r11d, r11d
mov rcx, rbp
mov word [rdx], r11w
mov rdx, r13
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x1402211c0
lea rdx, [0x1402a72b2]
mov rcx, rbp
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x140221010
lea rdx, str.PROGRAM_BASE
mov rcx, rbp
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x140221160
lea rdx, [0x1402a72fa]
mov rcx, rbp
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x140221030
lea rdx, [0x1402a7302]
mov rcx, rbp
call sub.msvcrt.dll__wcsicmp
test eax, eax
je 0x140221308
lea rdx, str.CACHE_DIR
mov rcx, rbp
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x1402211e0
lea r12, [rsp + 0x2f0]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov qword [rsp + 0x20], r12
mov edx, 0x1c
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x140221026
cmp word [rbx], 0
mov rdx, rdi
mov rax, rbx
je 0x140220f8e
nop dword [rax]
add rax, 2
sub rdx, 1
cmp word [rax], 0
jne 0x140220f80
movzx r8d, word [rsp + 0x2f0]
test r8w, r8w
je 0x140220fd3
test rdx, rdx
je 0x140299358
mov rcx, r12
jmp 0x140220fb9
test rdx, rdx
je 0x140299358
add rcx, 2
mov word [rax], r8w
add rax, 2
sub rdx, 1
movzx r8d, word [rcx]
test r8w, r8w
jne 0x140220fb0
xor r9d, r9d
mov word [rax], r9w
cmp word [rbx], 0
je 0x14022114f
mov eax, 1
add rbx, 2
sub rdi, 1
cmp word [rbx], 0
jne 0x140221128
test al, al
jne 0x14022114f
nop dword [rax + rax]
xor edx, edx
jmp 0x140220e3f
xor ecx, ecx
mov r8d, edi
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x140221118
xor eax, eax
jmp 0x140220e8b
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea r15, [rsp + 0x60]
mov edx, pe_nt_image_headers64
lea r8, [0x1402a729c]
mov r9d, eax
mov rcx, r15
call fcn.1402051f0
cmp word [rbx], 0
je 0x140221394
mov r12, rdi
mov r9, rbx
nop word [rax + rax]
add r9, 2
sub r12, 1
cmp word [r9], 0
jne 0x140221068
movzx r14d, byte [rsp + 0x60]
test r14b, r14b
je 0x140221122
lea rax, [r15 + r12]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x500]
mov qword [rsp + 0x48], rax
nop dword [rax]
mov rax, qword [rsp + 0x40]
mov r12, r9
sub rax, r15
cmp word [r9], 0
je 0x1402210c8
nop word [rax + rax]
add r12, 2
sub rax, 1
cmp word [r12], 0
jne 0x1402210b8
test rax, rax
je 0x140299358
mov rcx, r12
mov qword [rsp + 0x38], r9
add r15, 1
call sub.msvcrt.dll_wcslen
mov rdx, qword [rsp + 0x48]
mov r8d, 2
mov byte [rsp + 0x500], r14b
lea rcx, [r12 + rax*2]
mov byte [rsp + 0x501], 0
call sub.msvcrt.dll_mbstowcs
mov r9, qword [rsp + 0x38]
movzx r14d, byte [r15]
add r9, 2
test r14b, r14b
jne 0x1402210a0
cmp word [rbx], 0
je 0x140221008
xor eax, eax
nop dword [rax]
add rbx, 2
sub rdi, 1
cmp word [rbx], 0
jne 0x140221128
test al, al
je 0x140221008
jmp 0x14022114f
sub rbx, 2
xor r8d, r8d
add rdi, 1
mov word [rbx], r8w
cmp word [rbx - 2], 0x5c
je 0x140221140
xor edx, edx
jmp 0x140220e3f
mov rcx, rbx
call sub.msvcrt.dll_wcslen
mov r8, rdi
mov rcx, rbx
lea rdx, str.PROGRAM
sub r8, rax
call fcn.140220df0
test al, al
je 0x140221026
mov rcx, rbx
call sub.msvcrt.dll_wcslen
cmp rax, 3
jbe 0x140221118
lea r12, [rbx + rax*2 - 8]
lea rdx, [0x1402a72f0]
mov rcx, r12
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x140221118
xor r10d, r10d
mov word [r12], r10w
jmp 0x140221118
mov rdx, rbx
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
cmp word [rbx], 0
je 0x14022114f
mov eax, 1
jmp 0x140220fe9
lea rdx, str.TIME
mov rcx, rbp
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x140221026
mov qword [rsp + 0x58], 0
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov r9, qword [rsp + 0x58]
mov edx, 0x400
lea r15, [rsp + 0x500]
lea r8, str._lld
mov rcx, r15
call fcn.1402051f0
cmp word [rbx], 0
je 0x1402213b0
mov r12, rdi
mov r9, rbx
nop dword [rax]
add r9, 2
sub r12, 1
cmp word [r9], 0
jne 0x140221240
movzx r8d, byte [rsp + 0x500]
test r8b, r8b
je 0x140221122
lea rax, [rsp + 0x2f0]
add r12, r15
mov qword [rsp + 0x48], rax
nop dword [rax]
mov rax, r12
mov r14, r9
sub rax, r15
cmp word [r9], 0
je 0x14022129f
nop dword [rax + rax]
add r14, 2
sub rax, 1
cmp word [r14], 0
jne 0x140221290
test rax, rax
mov byte [rsp + 0x40], r8b
mov qword [rsp + 0x38], r9
je 0x140299358
mov rcx, r14
add r15, 1
call sub.msvcrt.dll_wcslen
movzx r8d, byte [rsp + 0x40]
mov byte [rsp + 0x2f1], 0
mov rdx, qword [rsp + 0x48]
lea rcx, [r14 + rax*2]
mov byte [rsp + 0x2f0], r8b
mov r8d, 2
call sub.msvcrt.dll_mbstowcs
mov r9, qword [rsp + 0x38]
movzx r8d, byte [r15]
add r9, 2
test r8b, r8b
jne 0x140221278
jmp 0x140221118
lea r12, [rsp + 0xe0]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov qword [rsp + 0x20], r12
mov edx, 0x28
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x140221026
cmp word [rbx], 0
mov rdx, rdi
mov rax, rbx
je 0x14022134e
nop dword [rax]
add rax, 2
sub rdx, 1
cmp word [rax], 0
jne 0x140221340
movzx r8d, word [rsp + 0xe0]
test r8w, r8w
je 0x140220fd3
test rdx, rdx
je 0x1402213d4
mov rcx, r12
jmp 0x140221375
test rdx, rdx
je 0x1402213cf
add rcx, 2
mov word [rax], r8w
add rax, 2
sub rdx, 1
movzx r8d, word [rcx]
test r8w, r8w
jne 0x140221370
jmp 0x140220fd3
movzx r14d, byte [rsp + 0x60]
mov r12, rdi
mov r9, rbx
test r14b, r14b
jne 0x140221086
xor edx, edx
jmp 0x140220e3f
movzx r8d, byte [rsp + 0x500]
mov r12, rdi
mov r9, rbx
test r8b, r8b
jne 0x140221261
xor edx, edx
jmp 0x140220e3f
jmp 0x140299358
jmp 0x140299358