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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r15
lea rbp, [rsp - 0x380]
sub rsp, 0x480
mov rax, qword [0x1400a7470]
xor rax, rsp
mov qword [rbp + 0x370], rax
xor ebx, ebx
mov rsi, r8
mov qword [rsp + 0x38], rbx
mov rdi, rdx
mov r15, rcx
cmp r8, 0x104
jbe 0x140004957
xor eax, eax
jmp 0x140004cd0
add r8, r8
xor edx, edx
mov rcx, rdi
call fcn.14002a600
lea rax, [rsp + 0x38]
mov r9d, 0x101
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x14008b960]
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140004b79
lea rax, [rsp + 0x38]
mov r9d, 0x101
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x14008b960]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140004b79
lea rax, [rsp + 0x38]
mov r9d, 0x101
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, [0x14008ba90]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140004cce
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rdx, [0x14008bae0]
lea rax, [rsp + 0x30]
mov dword [rsp + 0x30], ebx
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x40], 4
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140004b69
cmp dword [rsp + 0x30], 1
jne 0x140004b69
lea rcx, [r15 + 0x2a4]
mov edx, 0x104
lea r8, [0x14008baf0]
call fcn.140034b0c
lea rcx, [r15 + 0x4ac]
mov edx, 0x104
lea r8, [0x14008bb28]
call fcn.140034b0c
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x208
call fcn.14002a600
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rdx, [0x14008bb60]
lea rax, [rsp + 0x50]
mov dword [rsp + 0x44], 0x208
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140004afd
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
jne 0x140004afd
lea rax, [0x14008b928]
mov rdx, rsi
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea r8, [0x14008bb70]
mov rcx, rdi
call fcn.140004ef0
mov rcx, qword [rsp + 0x38]
mov ebx, 1
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140004cce
xor edx, edx
lea rcx, [rbp + 0x160]
mov r8d, 0x208
call fcn.14002a600
mov edx, 0x104
lea rcx, [rbp + 0x160]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x140004b69
lea rcx, [rbp + 0x160]
call qword [sym.imp.SHLWAPI.dll_PathStripToRootW]
cmp eax, 1
jne 0x140004b69
lea rax, [0x14008b928]
mov rdx, rsi
lea r9, [rbp + 0x160]
mov qword [rsp + 0x20], rax
lea r8, [0x14008b948]
mov rcx, rdi
call fcn.140004ef0
cmp word [rdi], bx
mov eax, 1
cmovne ebx, eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140004cce
xor edx, edx
mov qword [rsp + 0x4c8], r14
mov r8d, 0x208
lea rcx, [rbp + 0x160]
call fcn.14002a600
xor edx, edx
mov dword [rsp + 0x30], 0x208
mov r8d, 0x208
lea rcx, [rsp + 0x50]
call fcn.14002a600
mov r8d, 0x104
lea rdx, [rsp + 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov r14d, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140004cbb
lea eax, [r14 - 1]
cmp eax, 0x102
ja 0x140004cbb
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathStripPathW]
lea rcx, [r15 + 0x2a4]
mov edx, 0x104
lea r8, [0x14008b9e8]
call fcn.140034b0c
lea rcx, [r15 + 0x4ac]
mov edx, 0x104
lea r8, [0x14008ba20]
call fcn.140034b0c
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, [0x14008ba58]
lea rax, [rbp + 0x160]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140004cbb
lea rcx, [rbp + 0x160]
call qword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
jne 0x140004cbb
lea rax, [rsp + 0x50]
mov rcx, 0xffffffffffffffff
nop dword [rax]
inc rcx
cmp word [rax + rcx*2], bx
jne 0x140004c70
mov eax, dword [rsp + 0x30]
add rax, 5
add rcx, rax
cmp rcx, 0x104
jae 0x140004cbb
lea rax, [rsp + 0x50]
mov rdx, rsi
lea r9, [rbp + 0x160]
mov qword [rsp + 0x20], rax
lea r8, [0x14008ba70]
mov rcx, rdi
call fcn.140004ef0
cmp word [rdi], bx
mov eax, 1
cmovne ebx, eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov r14, qword [rsp + 0x4c8]
mov eax, ebx
mov rcx, qword [rbp + 0x370]
xor rcx, rsp
call fcn.140028060
add rsp, 0x480
pop r15
pop rdi
pop rsi
pop rbx
pop rbp
ret