Function at 0x140004510
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 [0x1400bb4a8]
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 0x140004557
xor eax, eax
jmp 0x1400048d2
add r8, r8
xor edx, edx
mov rcx, rdi
call fcn.14002b5b0
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 0x140004779
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 0x140004779
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 0x1400048d0
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 0x140004769
cmp dword [rsp + 0x30], 1
jne 0x140004769
lea rcx, [r15 + 0x2a4]
mov edx, 0x104
lea r8, str.GlobalNVInstallerLogFile
call fcn.140039be4
lea rcx, [r15 + 0x4ac]
mov edx, 0x104
lea r8, str.NVInstallerLogSharedMemory
call fcn.140039be4
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x208
call fcn.14002b5b0
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 0x1400046fd
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
jne 0x1400046fd
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.140004af0
mov rcx, qword [rsp + 0x38]
mov ebx, 1
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1400048d0
xor edx, edx
lea rcx, [rbp + 0x160]
mov r8d, 0x208
call fcn.14002b5b0
mov edx, 0x104
lea rcx, [rbp + 0x160]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x140004769
lea rcx, [rbp + 0x160]
call qword [sym.imp.SHLWAPI.dll_PathStripToRootW]
cmp eax, 1
jne 0x140004769
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.140004af0
cmp word [rdi], bx
mov eax, 1
cmovne ebx, eax
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x1400048d0
xor edx, edx
mov qword [rsp + 0x4c8], r14
mov r8d, 0x208
lea rcx, [rbp + 0x160]
call fcn.14002b5b0
xor edx, edx
mov dword [rsp + 0x30], 0x208
mov r8d, 0x206
mov word [rsp + 0x50], bx
lea rcx, [rsp + 0x52]
call fcn.14002b5b0
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 0x1400048bd
lea eax, [r14 - 1]
cmp eax, 0x102
ja 0x1400048bd
lea rcx, [rsp + 0x50]
call qword [sym.imp.SHLWAPI.dll_PathStripPathW]
lea rcx, [r15 + 0x2a4]
mov edx, 0x104
lea r8, str.GlobalDBInstallerLogFile
call fcn.140039be4
lea rcx, [r15 + 0x4ac]
mov edx, 0x104
lea r8, str.DBInstallerLogSharedMemory
call fcn.140039be4
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 0x1400048bd
lea rcx, [rbp + 0x160]
call qword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
jne 0x1400048bd
lea rax, [rsp + 0x50]
mov rcx, 0xffffffffffffffff
inc rcx
cmp word [rax + rcx*2], bx
jne 0x140004872
mov eax, dword [rsp + 0x30]
add rax, 5
add rcx, rax
cmp rcx, 0x104
jae 0x1400048bd
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.140004af0
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.140028460
add rsp, 0x480
pop r15
pop rdi
pop rsi
pop rbx
pop rbp
ret