Function at 0x1400047e0
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 [0x1400a6410]
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 0x140004827
xor eax, eax
jmp 0x140004ba0
add r8, r8
xor edx, edx
mov rcx, rdi
call fcn.14002a010
lea rax, [rsp + 0x38]
mov r9d, 0x101
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWARENVIDIA_CorporationLoggingDefinitionsLogManagersFileOut
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140004a49
lea rax, [rsp + 0x38]
mov r9d, 0x101
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWARENVIDIA_CorporationLoggingDefinitionsLogManagersFileOut
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140004a49
lea rax, [rsp + 0x38]
mov r9d, 0x101
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWARENVIDIA_CorporationInstaller
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140004b9e
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rdx, str.Logging
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 0x140004a39
cmp dword [rsp + 0x30], 1
jne 0x140004a39
lea rcx, [r15 + 0x2a4]
mov edx, 0x104
lea r8, str.GlobalNVInstallerLogFile
call fcn.14003451c
lea rcx, [r15 + 0x4ac]
mov edx, 0x104
lea r8, str.NVInstallerLogSharedMemory
call fcn.14003451c
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x208
call fcn.14002a010
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rdx, str.LogPath
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 0x1400049cd
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
jne 0x1400049cd
lea rax, str.NVInstaller.log
mov rdx, rsi
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea r8, str._s_s
mov rcx, rdi
call fcn.140004dc0
mov rcx, qword [rsp + 0x38]
mov ebx, 1
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140004b9e
xor edx, edx
lea rcx, [rbp + 0x160]
mov r8d, 0x208
call fcn.14002a010
mov edx, 0x104
lea rcx, [rbp + 0x160]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x140004a39
lea rcx, [rbp + 0x160]
call qword [sym.imp.SHLWAPI.dll_PathStripToRootW]
cmp eax, 1
jne 0x140004a39
lea rax, str.NVInstaller.log
mov rdx, rsi
lea r9, [rbp + 0x160]
mov qword [rsp + 0x20], rax
lea r8, str._sTemp_s
mov rcx, rdi
call fcn.140004dc0
cmp word [rdi], bx
mov eax, 1
cmovne ebx, eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140004b9e
xor edx, edx
mov qword [rsp + 0x4c8], r14
mov r8d, 0x208
lea rcx, [rbp + 0x160]
call fcn.14002a010
xor edx, edx
mov dword [rsp + 0x30], 0x208
mov r8d, 0x208
lea rcx, [rsp + 0x50]
call fcn.14002a010
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 0x140004b8b
lea eax, [r14 - 1]
cmp eax, 0x102
ja 0x140004b8b
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathStripPathW]
lea rcx, [r15 + 0x2a4]
mov edx, 0x104
lea r8, str.GlobalDBInstallerLogFile
call fcn.14003451c
lea rcx, [r15 + 0x4ac]
mov edx, 0x104
lea r8, str.DBInstallerLogSharedMemory
call fcn.14003451c
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, str.PathPrefix
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 0x140004b8b
lea rcx, [rbp + 0x160]
call qword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
jne 0x140004b8b
lea rax, [rsp + 0x50]
mov rcx, 0xffffffffffffffff
nop dword [rax]
inc rcx
cmp word [rax + rcx*2], bx
jne 0x140004b40
mov eax, dword [rsp + 0x30]
add rax, 5
add rcx, rax
cmp rcx, 0x104
jae 0x140004b8b
lea rax, [rsp + 0x50]
mov rdx, rsi
lea r9, [rbp + 0x160]
mov qword [rsp + 0x20], rax
lea r8, str._s._s.log
mov rcx, rdi
call fcn.140004dc0
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.140027a80
add rsp, 0x480
pop r15
pop rdi
pop rsi
pop rbx
pop rbp
ret