Function at 0x140007940
Capabilities:
Get common file path

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov r12, rcx
movsxd rbx, edx
test edx, edx
jns 0x14000796d
mov rax, qword [0x14000bff0]
not edx
movsxd rdx, edx
mov rax, qword [rax]
movsxd rbx, dword [rax + rdx*4]
mov rax, qword [0x14000c030]
lea rsi, [0x140035c20]
add rbx, rbx
mov r13, rsi
add rbx, qword [rax + 0x24]
cmp r12, rsi
jb 0x140007a5c
mov rax, r12
sub rax, rsi
cmp rax, 0xffe
ja 0x140007a5c
mov rsi, r12
xor r12d, r12d
jmp 0x140007a5c
mov rax, rsi
sub rax, r13
cmp rax, 0x7fe
jg 0x140007c12
cmp cx, 3
ja 0x140007bec
movsx edi, byte [rbx + 3]
mov al, byte [rbx + 2]
add rbx, 4
shl edi, 7
and eax, 0x7f
and edi, 0x3f80
or edi, eax
mov ax, word [rbx - 2]
movzx edx, al
mov r14d, eax
mov r8d, edx
shr r14w, 8
mov dword [rsp + 0x34], edx
or r8d, 0x8000
movzx r15d, r14w
mov dword [rsp + 0x30], r8d
mov r8d, r14d
or r8w, 0x8000
mov dword [rsp + 0x3c], r15d
movzx r8d, r8w
mov dword [rsp + 0x38], r8d
cmp cx, 2
je 0x140007a6d
cmp cx, 3
jne 0x140007bdb
cmp edi, 0x1d
jne 0x140007ba9
mov rax, qword [0x14000c0c0]
mov rcx, rsi
mov rdx, qword [rax]
call fcn.1400072f7
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
cdqe
add rax, rax
add rax, rsi
mov rsi, rax
mov cx, word [rbx]
test cx, cx
jne 0x1400079ab
jmp 0x140007c12
mov rcx, qword [0x14000c060]
cmp dword [rcx + 4], 1
sbb edi, edi
and edi, 0xfffffffe
add edi, 4
test al, al
jns 0x140007ace
mov rdi, qword [0x14000c030]
mov r8, rax
and eax, 0x40
mov r9, rsi
and r8d, 0x3f
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersion
mov rcx, 0xffffffff80000002
add r8, r8
add r8, qword [rdi + 0x24]
mov dword [rsp + 0x20], eax
xor edi, edi
call fcn.14000725f
cmp word [rsi], 0
jne 0x140007ac9
mov edx, r15d
mov rcx, rsi
call fcn.140007940
movsxd rdi, edi
jmp 0x140007b4d
cmp edx, 0x25
jne 0x140007ae3
mov edx, 0x400
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x140007af6
cmp edx, 0x24
jne 0x140007ac9
mov edx, 0x400
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor edi, edi
jmp 0x140007ac9
mov rax, qword [0x14000c010]
mov ebp, dword [rsp + rdi*4 + 0x2c]
mov rax, qword [rax]
mov edx, ebp
mov r15d, ebp
and edx, 0xffffffbf
and r15d, 0x8000
test rax, rax
jne 0x140007b53
mov ecx, 4
call fcn.1400078b7
mov rcx, qword [0x14000c0c0]
mov edx, ebp
mov r8d, r15d
and edx, 0xbf
mov rcx, qword [rcx]
call rax
mov r15, rax
test rax, rax
jne 0x140007b8c
mov word [rsi], 0
dec rdi
test edi, edi
jne 0x140007afa
jmp 0x140007b6e
mov rcx, qword [0x14000c0c0]
mov qword [rsp + 0x20], rsi
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rcx]
call rax
test eax, eax
jne 0x140007b1c
cmp word [rsi], 0
je 0x140007bce
cmp r14w, 0x1a
jne 0x140007bce
lea rdx, str.MicrosoftInternet_ExplorerQuick_Launch
mov rcx, rsi
call sub.KERNEL32.dll_lstrcatW
jmp 0x140007bce
mov rcx, rax
mov rdx, rsi
call qword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov rcx, r15
mov ebp, eax
call qword [sym.imp.ole32.dll_CoTaskMemFree]
test ebp, ebp
je 0x140007b45
jmp 0x140007b6e
movsxd rdx, edi
lea rax, [section..ndata]
mov rcx, rsi
sub edi, 0x15
shl rdx, 0xb
add rdx, rax
call fcn.1400073c7
cmp edi, 6
ja 0x140007a48
mov rcx, rsi
call fcn.140007458
jmp 0x140007a48
not edi
mov rcx, rsi
mov edx, edi
call fcn.140007940
jmp 0x140007a48
lea rax, [rsi + 2]
cmp cx, 4
jne 0x140007c06
mov dx, word [rbx + 2]
add rbx, 4
mov word [rsi], dx
jmp 0x140007a59
mov word [rsi], cx
add rbx, 2
jmp 0x140007a59
mov word [rsi], 0
test r12, r12
je 0x140007c37
mov rdx, r13
mov rcx, r12
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp fcn.1400073c7
mov rax, r13
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret