Function at 0x140061800
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
push rbp
push rdi
push r13
push r14
push r15
lea rbp, [rsp - 0x11b0]
mov eax, 0x12b0
call fcn.1401d9bc0
sub rsp, rax
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov qword [rsp + 0x12e8], rbx
mov qword [rsp + 0x12f0], rsi
mov rax, qword [0x140325af8]
xor rax, rsp
mov qword [rbp + 0x11a0], rax
mov r13, rcx
cmp dword [rcx + 0xc], 6
jae 0x14006185a
mov byte [rcx + 0x158], 0
jmp 0x140061898
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, str.BCD00000000
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400618c3
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [r13 + 0x158], 0
mov rcx, qword [rbp + 0x11a0]
xor rcx, rsp
call fcn.1401d9c30
lea r11, [rsp + 0x12b0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop rdi
pop rbp
ret
cmp eax, 5
je 0x140061890
cmp eax, 0x20
je 0x140061890
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 0x101
xor r8d, r8d
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionWinPE
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140061890
mov byte [r13 + 0x158], 1
mov dword [rsp + 0x38], 0x1000
mov dword [rbp - 0x78], 1
lea rax, [rsp + 0x38]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x1a0]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x78]
xor r8d, r8d
lea rdx, str.InstRoot
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
movdqa xmm0, xmmword [0x1402e5c30]
movdqu xmmword [rsp + 0x58], xmm0
test ebx, ebx
jne 0x140061bbb
mov eax, dword [rsp + 0x38]
shr rax, 1
xor r14d, r14d
mov word [rbp + rax*2 + 0x19e], r14w
mov word [rsp + 0x48], r14w
lea rax, [rbp + 0x1a0]
mov rsi, 0xffffffffffffffff
mov rdx, rsi
nop dword [rax + rax]
inc rdx
cmp word [rax + rdx*2], r14w
jne 0x140061990
lea rcx, [rsp + 0x48]
cmp rdx, 7
ja 0x1400619c5
mov qword [rsp + 0x58], rdx
lea rbx, [rdx + rdx]
mov r8, rbx
lea rdx, [rbp + 0x1a0]
call fcn.1401db870
mov word [rsp + rbx + 0x48], r14w
jmp 0x1400619d2
lea r9, [rbp + 0x1a0]
call fcn.14000c3b0
nop
lea rcx, [rsp + 0x48]
call fcn.14000e490
lea rcx, [rsp + 0x48]
cmp rcx, rax
je 0x140061a01
mov rdx, rax
cmp qword [rax + 0x18], 8
jb 0x1400619f3
mov rdx, qword [rax]
mov r8, qword [rax + 0x10]
lea rcx, [rsp + 0x48]
call fcn.14000c510
lea rcx, [rsp + 0x48]
call fcn.14000dfa0
movdqa xmm0, xmmword [0x1402e5c30]
movdqu xmmword [rsp + 0x78], xmm0
mov word [rsp + 0x68], r14w
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0x24]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x140061a94
lea rax, [rbp - 0x70]
inc rsi
cmp word [rax + rsi*2], 0
jne 0x140061a42
mov rax, qword [rbp - 0x80]
cmp rsi, rax
ja 0x140061a83
lea rdi, [rsp + 0x68]
cmp rax, 8
cmovae rdi, qword [rsp + 0x68]
mov qword [rsp + 0x78], rsi
lea rbx, [rsi + rsi]
mov r8, rbx
lea rdx, [rbp - 0x70]
mov rcx, rdi
call fcn.1401db870
mov word [rdi + rbx], r14w
jmp 0x140061a94
lea r9, [rbp - 0x70]
mov rdx, rsi
lea rcx, [rsp + 0x68]
call fcn.14000c3b0
lea rcx, [rsp + 0x68]
call fcn.14000dfa0
lea rcx, [rsp + 0x68]
call fcn.14000e490
lea rcx, [rsp + 0x68]
cmp rcx, rax
je 0x140061acd
mov rdx, rax
cmp qword [rax + 0x18], 8
jb 0x140061abf
mov rdx, qword [rax]
mov r8, qword [rax + 0x10]
lea rcx, [rsp + 0x68]
call fcn.14000c510
lea r9, [rsp + 0x48]
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x60]
cmp rsi, 8
cmovae r9, rbx
lea rcx, [rsp + 0x68]
mov rdi, qword [rsp + 0x68]
mov r15, qword [rbp - 0x80]
cmp r15, 8
cmovae rcx, rdi
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov rdx, qword [rsp + 0x78]
call fcn.14000fb50
test rax, rax
je 0x140061b1e
mov byte [r13 + 0x158], 0
cmp r15, 8
jb 0x140061b63
lea rdx, [r15*2 + 2]
mov rax, rdi
cmp rdx, 0x1000
jb 0x140061b51
add rdx, 0x27
mov rdi, qword [rdi - 8]
sub rax, rdi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140061d54
mov rcx, rdi
call fcn.1401d94a8
mov rsi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x48]
movdqa xmm0, xmmword [0x1402e5c30]
movdqu xmmword [rsp + 0x78], xmm0
mov word [rsp + 0x68], r14w
cmp rsi, 8
jb 0x140061898
lea rdx, [rsi*2 + 2]
mov rax, rbx
cmp rdx, 0x1000
jb 0x140061bae
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140061d5a
mov rcx, rbx
call fcn.1401d94a8
jmp 0x140061898
xor r14d, r14d
mov word [rsp + 0x48], r14w
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r14 + 0x24]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x140061c43
lea rax, [rbp - 0x70]
mov rsi, 0xffffffffffffffff
nop
inc rsi
cmp word [rax + rsi*2], 0
jne 0x140061bf0
mov rax, qword [rsp + 0x60]
cmp rsi, rax
ja 0x140061c32
lea rdi, [rsp + 0x48]
cmp rax, 8
cmovae rdi, qword [rsp + 0x48]
mov qword [rsp + 0x58], rsi
lea rbx, [rsi + rsi]
mov r8, rbx
lea rdx, [rbp - 0x70]
mov rcx, rdi
call fcn.1401db870
mov word [rdi + rbx], r14w
jmp 0x140061c43
lea r9, [rbp - 0x70]
mov rdx, rsi
lea rcx, [rsp + 0x48]
call fcn.14000c3b0
lea rcx, [rsp + 0x48]
call fcn.14000dfa0
lea rcx, [rsp + 0x48]
call fcn.14000e490
lea rcx, [rsp + 0x48]
cmp rcx, rax
je 0x140061c7c
mov rdx, rax
cmp qword [rax + 0x18], 8
jb 0x140061c6e
mov rdx, qword [rax]
mov r8, qword [rax + 0x10]
lea rcx, [rsp + 0x48]
call fcn.14000c510
lea r11, [rsp + 0x48]
mov r10, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x60]
cmp rdi, 8
cmovae r11, r10
mov rax, qword [rsp + 0x58]
cmp rax, 2
jb 0x140061cfd
lea rbx, [rax - 1]
lea rbx, [r11 + rbx*2]
mov rcx, r11
lea rsi, [0x1402e410c]
mov rax, rbx
sub rax, rcx
sar rax, 1
je 0x140061cfd
cmp word [rcx], 0x58
je 0x140061ccb
add rcx, 2
sub rax, 1
jmp 0x140061cb9
test rcx, rcx
je 0x140061cfd
mov r8d, 2
mov rdx, rsi
mov r9, rcx
sub r9, rsi
nop
movzx eax, word [rdx]
cmp word [r9 + rdx], ax
jne 0x140061d45
add rdx, 2
sub r8, 1
jne 0x140061ce0
sub rcx, r11
cmp rcx, 2
jb 0x140061d05
mov byte [r13 + 0x158], 0
cmp rdi, 8
jb 0x140061898
lea rdx, [rdi*2 + 2]
mov rax, r10
cmp rdx, 0x1000
jb 0x140061d38
add rdx, 0x27
mov r10, qword [r10 - 8]
sub rax, r10
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140061d4e
mov rcx, r10
call fcn.1401d94a8
jmp 0x140061898
add rcx, 2
jmp 0x140061cb0
call fcn.1401e4d9c
nop
call fcn.1401e4d9c
nop
call fcn.1401e4d9c
int3