Function at 0x140012130
Capabilities:
Get common file path

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xc48
mov r12, rcx
mov rax, qword [0x140038008]
xor rax, rsp
mov qword [rsp + 0xc40], rax
mov word [rcx], 0
movzx eax, word [rdx]
test ax, ax
je 0x1400126c3
mov rsi, r8
mov rdi, rdx
lea rbx, [rsp + 0x440]
lea r14, str.TEMP
mov r13, qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rbp, str.PROGRAM
lea r15, str.PROGRAM_BASE
add rdi, 2
xor ecx, ecx
jmp 0x1400121c2
test rcx, rcx
jne 0x1400121e0
mov word [rsp + 0x440], 0
mov rcx, rbx
movzx eax, word [rdi]
add rdi, 2
test ax, ax
je 0x1400126c3
cmp ax, 0x25
je 0x1400121a0
test rcx, rcx
je 0x140012360
mov word [rcx], ax
add rcx, 2
jmp 0x1400121b2
mov word [rcx], 0
mov rcx, rbx
mov rdx, r14
call fcn.14001aa18
test eax, eax
je 0x140012382
mov rcx, rbx
mov rdx, rbp
call fcn.14001aa18
test eax, eax
je 0x14001239d
mov rcx, rbx
mov rdx, r15
call fcn.14001aa18
test eax, eax
je 0x140012418
mov rcx, rbx
lea rdx, [0x140033310]
call fcn.14001aa18
test eax, eax
je 0x140012471
mov rcx, rbx
lea rdx, str.HOME
call fcn.14001aa18
test eax, eax
je 0x1400125bd
mov rcx, rbx
lea rdx, str.CACHE_DIR
call fcn.14001aa18
test eax, eax
je 0x140012630
mov rcx, rbx
lea rdx, str.TIME
call fcn.14001aa18
test eax, eax
jne 0x1400126f3
mov qword [rsp + 0x30], 0
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov r9, qword [rsp + 0x30]
mov edx, 0x400
lea rcx, [rsp + 0x40]
lea r8, str._lld
call fcn.140012700
cmp word [r12], 0
mov r14, rsi
mov rbp, r12
je 0x1400122ce
nop word [rax + rax]
dec r14
cmp word [rbp + 2], 0
lea rbp, [rbp + 2]
jne 0x1400122c0
movzx ebx, byte [rsp + 0x40]
test bl, bl
je 0x140012532
lea r13, [rsp + 0x40]
cmp word [rbp], 0
mov r15, rbp
mov rax, r14
je 0x140012311
mov rax, r14
mov rcx, rbp
nop word cs:[rax + rax]
lea r15, [rcx + 2]
dec rax
cmp word [rcx + 2], 0
mov rcx, r15
jne 0x140012300
test rax, rax
je 0x1400126f7
mov rcx, r15
call fcn.14001b628
lea rcx, [r15 + rax*2]
mov byte [rsp + 0x3e], bl
mov byte [rsp + 0x3f], 0
mov r8d, 2
lea rdx, [rsp + 0x3e]
call fcn.14001acec
add rbp, 2
dec r14
movzx ebx, byte [r13 + 1]
inc r13
test bl, bl
jne 0x1400122e0
jmp 0x140012532
test rsi, rsi
je 0x1400126f3
mov word [r12], ax
mov word [r12 + 2], 0
add r12, 2
dec rsi
jmp 0x1400125ac
mov ecx, esi
mov rdx, r12
call r13
mov al, 1
cmp word [r12], 0
jne 0x140012560
jmp 0x14001257a
call fcn.140015af4
cmp word [r12], 0
mov rdx, rsi
mov rcx, r12
je 0x1400123be
dec rdx
cmp word [rcx + 2], 0
lea rcx, [rcx + 2]
jne 0x1400123b0
mov rax, qword [rax]
mov rax, qword [rax]
movzx r8d, word [rax]
test r8w, r8w
je 0x140012400
xor r9d, r9d
nop word cs:[rax + rax]
cmp rdx, r9
je 0x1400126f7
mov word [rcx], r8w
add rcx, 2
movzx r8d, word [rax + r9*2 + 2]
inc r9
test r8w, r8w
jne 0x1400123e0
mov word [rcx], 0
xor eax, eax
cmp word [r12], 0
jne 0x140012560
jmp 0x14001257a
mov rcx, r12
call fcn.14001b628
mov r8, rsi
sub r8, rax
mov rcx, r12
lea rdx, str._PROGRAM_
call fcn.140012130
test al, al
je 0x1400126f3
mov rcx, r12
call fcn.14001b628
cmp rax, 4
jb 0x14001246a
mov r15, rax
lea rcx, [r12 + rax*2]
add rcx, 0xfffffffffffffff8
lea rdx, str..exe
call fcn.14001aa18
test eax, eax
je 0x1400126b4
xor eax, eax
jmp 0x140012551
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, 0x80
lea rcx, [rsp + 0x40]
lea r8, [0x14003315e]
mov r9d, eax
call fcn.140012700
cmp word [r12], 0
mov r14, rsi
mov rbp, r12
je 0x1400124ae
nop
dec r14
cmp word [rbp + 2], 0
lea rbp, [rbp + 2]
jne 0x1400124a0
movzx ebx, byte [rsp + 0x40]
test bl, bl
je 0x140012532
lea r13, [rsp + 0x40]
nop dword [rax]
cmp word [rbp], 0
mov r15, rbp
mov rax, r14
je 0x1400124f1
mov rax, r14
mov rcx, rbp
nop word cs:[rax + rax]
lea r15, [rcx + 2]
dec rax
cmp word [rcx + 2], 0
mov rcx, r15
jne 0x1400124e0
test rax, rax
je 0x1400126f7
mov rcx, r15
call fcn.14001b628
lea rcx, [r15 + rax*2]
mov byte [rsp + 0x30], bl
mov byte [rsp + 0x31], 0
mov r8d, 2
lea rdx, [rsp + 0x30]
call fcn.14001acec
add rbp, 2
dec r14
movzx ebx, byte [r13 + 1]
inc r13
test bl, bl
jne 0x1400124c0
xor eax, eax
lea rbx, [rsp + 0x440]
lea r14, str.TEMP
mov r13, qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rbp, str.PROGRAM
lea r15, str.PROGRAM_BASE
cmp word [r12], 0
je 0x14001257a
lea rcx, [r12 + 2]
dec rsi
cmp word [r12 + 2], 0
mov r12, rcx
jne 0x140012560
test al, al
je 0x1400125a9
jmp 0x140012581
mov rcx, r12
test al, al
je 0x1400125a9
cmp word [rcx - 2], 0x5c
jne 0x1400125a9
nop dword [rax + rax]
lea r12, [rcx - 2]
mov word [rcx - 2], 0
inc rsi
cmp word [rcx - 4], 0x5c
mov rcx, r12
je 0x140012590
jmp 0x1400125ac
mov r12, rcx
movzx eax, word [rdi]
test ax, ax
jne 0x140012193
jmp 0x1400126c3
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor ecx, ecx
mov edx, 0x28
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x1400126f3
cmp word [r12], 0
mov rcx, rsi
mov rax, r12
je 0x1400125fe
dec rcx
cmp word [rax + 2], 0
lea rax, [rax + 2]
jne 0x1400125f0
movzx edx, word [rsp + 0x40]
test dx, dx
je 0x1400126aa
xor r8d, r8d
nop
cmp rcx, r8
je 0x1400126f7
mov word [rax], dx
add rax, 2
movzx edx, word [rsp + r8*2 + 0x42]
inc r8
test dx, dx
jne 0x140012610
jmp 0x1400126aa
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
xor ecx, ecx
mov edx, 0x1c
xor r8d, r8d
xor r9d, r9d
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x1400126f3
cmp word [r12], 0
mov rcx, rsi
mov rax, r12
je 0x14001267e
nop word cs:[rax + rax]
dec rcx
cmp word [rax + 2], 0
lea rax, [rax + 2]
jne 0x140012670
movzx edx, word [rsp + 0x40]
test dx, dx
je 0x1400126aa
xor r8d, r8d
nop dword [rax + rax]
cmp rcx, r8
je 0x1400126f7
mov word [rax], dx
add rax, 2
movzx edx, word [rsp + r8*2 + 0x42]
inc r8
test dx, dx
jne 0x140012690
mov word [rax], 0
jmp 0x14001238a
mov word [r12 + r15*2 - 8], 0
xor eax, eax
jmp 0x140012551
mov word [r12], 0
mov sil, 1
mov rcx, qword [rsp + 0xc40]
xor rcx, rsp
call fcn.140013dc0
mov eax, esi
add rsp, 0xc48
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
xor esi, esi
jmp 0x1400126cd
call fcn.14001ac70
int3