Function at 0x140003520
Capabilities:
Check if file exists
Copy file
Delete registry key
Get common file path
Persist via application shimming
Persist via windows service
Query or enumerate registry value
Set registry value

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x3b8]
sub rsp, 0x490
mov qword [rbp - 0x78], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov rax, qword [0x1400a7430]
xor rax, rsp
mov qword [rbp + 0x380], rax
mov rsi, r8
mov ebx, 1
lea rdx, [0x14008ac00]
mov rcx, qword [0x1400a8248]
call fcn.140004380
mov edx, 0x104
mov rcx, rsi
call fcn.140035820
lea rdx, [rax + 1]
mov rcx, rsi
call fcn.140036128
mov r8, rsi
lea rdx, str.Command_line_passed_in:__s_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
xor r12d, r12d
mov dword [rsp + 0x58], r12d
mov dword [rsp + 0x5c], 4
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r12
lea r9d, [rbx + 0xf]
lea r8, str.NvProfileUpdateFirstRun
lea rdx, str.SYSTEMCurrentControlSetServices_nvlddmkm
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
mov rcx, qword [0x1400a8248]
test eax, eax
je 0x14000360b
mov r8d, eax
lea rdx, str.NvProfileUpdateFirstRun_regKey_Read_failed_with_Error__u_n
call fcn.140004100
xor dil, dil
jmp 0x140003626
mov r8d, dword [rsp + 0x58]
lea rdx, str.NvProfileUpdateFirstRun_flag_value__d_n
call fcn.140004100
cmp dword [rsp + 0x58], ebx
sete dil
je 0x14000363d
lea rdx, str._nocheck
mov rcx, rsi
call fcn.140029c1c
test rax, rax
je 0x14000366d
movzx edi, bl
lea rdx, str._init
mov rcx, rsi
call fcn.140029c1c
test rax, rax
jne 0x140003a11
lea rdx, str._setoemkeys
mov rcx, rsi
call fcn.140029c1c
test rax, rax
jne 0x140003a11
lea rdx, str._uninstall
mov rcx, rsi
call fcn.140029c1c
test rax, rax
je 0x14000376d
lea rdx, str.Running_in_uninstall_mode..._n
mov rcx, qword [0x1400a8248]
call fcn.140004100
lea rcx, [rbp - 0x70]
call fcn.140001110
lea rcx, [rbp - 0x70]
call fcn.140025ef0
cmp eax, ebx
jbe 0x1400036c1
lea rdx, str.WARNING:_Failed_to_remove_the_NvDrsDb_from_the_system__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
lea r8, str.SOFTWARENVIDIA_CorporationGlobal
lea rdx, str.Opening_the_reg_path___s__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x102
xor r8d, r8d
lea rdx, str.SOFTWARENVIDIA_CorporationGlobal
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140004060
lea r8, str.SOFTWARENVIDIA_CorporationGlobal
lea rdx, str.Deleting_DRS_Path_Keys_from___s__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
lea rdx, str.DrsPath
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
je 0x14000375d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea r8, str.SOFTWARENVIDIA_CorporationGlobalDrsPath
lea rdx, str.WARNING:_Failed_to_delete___s___err:_d___n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140004060
lea rdx, str._update
mov rcx, rsi
call fcn.140029c1c
test rax, rax
je 0x1400039dd
lea rdx, str._update
mov rcx, rsi
call fcn.140029c1c
lea rdi, [rax + 0x10]
lea rcx, [rbp - 0x70]
call fcn.140001110
mov rdx, rdi
lea rcx, [rsp + 0x78]
call fcn.1400271a0
lea rcx, [rbp - 0x70]
call fcn.140025980
mov rcx, qword [0x1400a8248]
cmp eax, ebx
jbe 0x1400037d6
mov ebx, r12d
lea rdx, str.System_settings_could_not_be_loaded__n
call fcn.140004100
jmp 0x1400039cd
xor sil, sil
mov qword [rsp + 0x50], r12
mov dword [rsp + 0x58], r12d
mov dword [rsp + 0x70], r12d
mov dword [rsp + 0x5c], r12d
lea r8, str.SOFTWARENVIDIA_CorporationGlobalNVUpdatus
lea rdx, str.Checking_for_ForceUpdate_on____s__n
call fcn.140004100
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 0x20119
xor r8d, r8d
lea rdx, str.SOFTWARENVIDIA_CorporationGlobalNVUpdatus
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140003871
lea rax, [rsp + 0x5c]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x70]
xor r8d, r8d
lea rdx, str.ForcePackages
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140003866
cmp dword [rsp + 0x58], r12d
setne sil
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
movzx r9d, sil
movzx r8d, bl
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x70]
call fcn.140025750
cmp eax, ebx
jbe 0x1400038f5
cmp eax, 0x12
jne 0x1400038ab
lea ebx, [rax - 0xf]
lea rdx, str.The_update_file_was_too_old_and_was_not_applied_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
jmp 0x1400039cd
cmp eax, 0x10
jne 0x1400038ce
lea ebx, [rax - 0xe]
mov r8, rdi
lea rdx, str.The_update_file_could_not_be_found:__s_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
jmp 0x1400039cd
cmp eax, 0x15
jne 0x1400039cd
lea ebx, [rax - 0x11]
mov r8, rdi
lea rdx, str.The_update_file_belongs_to_another_release_branch:__s_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
jmp 0x1400039cd
xor edx, edx
lea rcx, [rbp - 0x70]
call fcn.140026a10
cmp eax, ebx
jbe 0x14000391f
mov ebx, r12d
lea rdx, str.Update_could_not_be_saved_on_the_system__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
jmp 0x1400039cd
lea rcx, [rbp + 0x80]
call fcn.140001110
lea rcx, [rsp + 0x60]
call fcn.140027250
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0x80]
call fcn.140002090
cmp eax, ebx
jne 0x1400039b5
lea rdx, [0x140089fd8]
lea rcx, [rsp + 0x60]
call fcn.1400279c0
lea rdx, str.update.bin
lea rcx, [rsp + 0x60]
call fcn.1400279c0
xor r8d, r8d
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x1400039a1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Update_Could_not_be_copied__GetLastError:__08x_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
jmp 0x1400039b5
lea rdx, str.Update_File_copied_successfully_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
nop
lea rcx, [rsp + 0x60]
call fcn.140027ab0
nop
lea rcx, [rbp + 0x80]
call fcn.140023e80
nop
lea rcx, [rsp + 0x78]
call fcn.140027ab0
nop
jmp 0x140004060
mov rcx, qword [0x1400a8248]
test dil, dil
je 0x140003a00
mov r8, rsi
lea rdx, str.Invalid_Command__:__s_n
call fcn.140004100
mov ebx, r12d
jmp 0x140004069
lea rdx, str.First_Run_Flag_not_set_n
call fcn.140004100
jmp 0x140004069
lea rdx, str.Running_in_install_mode..._n
mov rcx, qword [0x1400a8248]
call fcn.140004100
lea rdx, str._init
mov rcx, rsi
call fcn.140029c1c
test rax, rax
je 0x140003fc3
lea rcx, [rbp - 0x70]
call fcn.140001110
lea rcx, [rsp + 0x78]
call fcn.140027250
lea rcx, [rsp + 0x60]
call fcn.140027250
lea rdx, str.Running__init_mode._n
mov rcx, qword [0x1400a8248]
call fcn.140004100
lea r8, str.nvdrsdb.bin
lea rdx, str.Checking_if_the_file___s__exists._n
mov rcx, qword [0x1400a8248]
call fcn.140004100
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x170]
call fcn.14002a530
mov edx, 0x104
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp word [rbp + 0x170], r12w
je 0x140003ad8
lea rdx, [rbp + 0x170]
lea rcx, [rsp + 0x78]
call fcn.140027400
lea rdx, str.drivers
lea rcx, [rsp + 0x78]
call fcn.1400279c0
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x60]
call fcn.1400272a0
lea rdx, str.NVIDIA_CorporationDrs_nvdrsdb.bin
lea rcx, [rsp + 0x60]
call fcn.1400279c0
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rcx, qword [0x1400a8248]
cmp eax, 0xffffffff
je 0x140003f87
mov r14, qword [rsp + 0x78]
lea rdx, str.Entering__SetDriversPath__function....._n
call fcn.140004100
mov rcx, qword [0x1400a8248]
call fcn.140004290
mov r15d, ebx
mov qword [rsp + 0x50], r12
mov r8, r14
lea rdx, str.Setting_the_Gold_Path_as___s__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rdi, 0xffffffffffffffff
mov rcx, qword [0x1400a8248]
cmp eax, 0xffffffff
jne 0x140003b7e
mov r15d, r12d
lea rdx, str.WARNING:___Drivers_Path___is_not_a_valid_System_path__n
call fcn.140004100
jmp 0x140003c59
lea r8, str.SOFTWARENVIDIA_CorporationGlobalDrsPath
lea rdx, str.Creating_Opening_the_reg_path___s__n
call fcn.140004100
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0xf013f
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SOFTWARENVIDIA_CorporationGlobalDrsPath
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea r8, str.SOFTWARENVIDIA_CorporationGlobalDrsPath
mov rcx, qword [0x1400a8248]
test eax, eax
jne 0x140003c4a
lea rdx, str.Setting_NVDRS_GOLD_PATH_key_on___s__n
call fcn.140004100
mov rax, rdi
nop dword [rax]
lea rax, [rax + 1]
cmp word [r14 + rax*2], r12w
jne 0x140003bf0
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
mov r9d, ebx
xor r8d, r8d
lea rdx, str.NVDRS_GOLD_PATH
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x140003c3d
mov r15d, r12d
lea rdx, str.WARNING:_Could_not_set_the_registry_entry_for_NVDRS_GOLD_PATH__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140003c59
lea rdx, str.WARNING:_Could_not_Create_or_Open_the_reg_path___s___n
call fcn.140004100
mov r15d, r12d
mov rcx, qword [0x1400a8248]
call fcn.1400042d0
mov r8d, r15d
lea rdx, str.Exiting__SetDriversPath__function._Return__d_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, qword [0x1400a8248]
test r15d, r15d
lea rdx, str.WARNING:_The_NVDRS_GOLD_PATH_has_not_been_set__n
je 0x140003c95
lea rdx, str.The_NVDRS_GOLD_PATH_has_been_set_successfully._n
call fcn.140004100
mov r8, qword [rsp + 0x60]
lea rdx, str.__s__exists._Loading_the_Db._n
mov rcx, qword [0x1400a8248]
call fcn.140004100
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x60]
lea rcx, [rbp - 0x70]
call fcn.140025750
mov rcx, qword [0x1400a8248]
cmp eax, ebx
jbe 0x140003ce2
lea rdx, str.ERROR:_The_NvDrsDb_has_encountered_problems_loading____n
call fcn.140004100
mov ebx, r12d
jmp 0x140003cee
lea rdx, str.The_NvDrsDb_has_been_loaded_successfully._n
call fcn.140004100
lea rcx, [rbp - 0x70]
call fcn.140001470
test eax, eax
jne 0x140003d13
lea rdx, str.ERROR:_CreateDrsFolder_has_encountered_problems_in_creating_Drs_folder____n
mov rcx, qword [0x1400a8248]
call fcn.140004100
jmp 0x140003f98
cmp ebx, 1
jne 0x140003f9b
lea rdx, str.Entering__SetLDDMRegistry__function....._n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, qword [0x1400a8248]
call fcn.140004290
mov r14d, ebx
mov qword [rsp + 0x70], r12
mov ecx, 0x20a
call fcn.140027e6c
mov rbx, rax
xor edx, edx
mov r8d, 0x20a
mov rcx, rax
call fcn.14002a530
lea rdx, str.Querying_the_OS_for_the_ALLUSERSPROFILE__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov qword [rsp + 0x50], r12
lea r9, [rsp + 0x50]
xor r8d, r8d
xor edx, edx
lea rcx, [0x14008e8f0]
call sub.SHELL32.dll_SHGetKnownFolderPath
mov r8, qword [rsp + 0x50]
test r8, r8
je 0x140003db0
mov edx, 0x105
mov rcx, rbx
call fcn.140034a3c
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov r8, rbx
lea rdx, str.ALLUSERSPROFILE_obtained_as___s__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rcx, qword [0x1400a8248]
cmp eax, 0xffffffff
jne 0x140003def
mov r14d, r12d
lea rdx, str.WARNING:_ALLUSERSPROFILE_is_not_a_valid_System_path__n
call fcn.140004100
jmp 0x140003ec9
lea r8, str.SOFTWARENVIDIA_CorporationGlobalDrsPath
lea rdx, str.Creating_Opening_the_reg_path___s__n
call fcn.140004100
mov qword [rsp + 0x40], r12
lea rax, [rsp + 0x70]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0xf013f
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SOFTWARENVIDIA_CorporationGlobalDrsPath
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea r8, str.SOFTWARENVIDIA_CorporationGlobalDrsPath
mov rcx, qword [0x1400a8248]
test eax, eax
jne 0x140003eba
lea rdx, str.Setting_NVDRS_PATH_key_on___s__n
call fcn.140004100
nop dword [rax + rax]
lea rdi, [rdi + 1]
cmp word [rbx + rdi*2], r12w
jne 0x140003e60
lea eax, [rdi*2 + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov r9d, r14d
xor r8d, r8d
lea rdx, str.NVDRS_PATH
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x140003ead
mov r14d, r12d
lea rdx, str.WARNING:_Could_not_set_the_registry_entry_for_NVDRS_PATH__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140003ec9
lea rdx, str.WARNING:_Could_not_Create_or_Open_the_reg_path___s___n
call fcn.140004100
mov r14d, r12d
mov rcx, rbx
call fcn.140027e74
mov rcx, qword [0x1400a8248]
call fcn.1400042d0
mov r8d, r14d
lea rdx, str.Exiting__SetLDDMRegistry__function._Return__d_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov r8d, r14d
lea rdx, str.SetLDDMRegistry_returned__d_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov ebx, 1
lea rdx, str.Starting_the_process_to_save_the_DRS_database_to_system_n
mov rcx, qword [0x1400a8248]
call fcn.140004100
lea rcx, [rsp + 0x50]
call fcn.140001b50
mov r8d, eax
mov rdi, qword [rsp + 0x50]
mov rdx, rdi
lea rcx, [rbp - 0x70]
call fcn.140026c60
cmp eax, ebx
jbe 0x140003f4f
mov ebx, r12d
lea rdx, str.ERROR:_The_System_NvDrsDB_could_not_be_created____n
jmp 0x140003f71
xor edx, edx
lea rcx, [rbp - 0x70]
call fcn.140026a10
cmp eax, ebx
jbe 0x140003f6a
mov ebx, r12d
lea rdx, str.ERROR:_The_System_NvDrsDB_could_not_be_created____n
jmp 0x140003f71
lea rdx, str.The_System_NvDrsDB_has_been_created_successfully._n
mov rcx, qword [0x1400a8248]
call fcn.140004100
mov rcx, rdi
call fcn.140027e74
jmp 0x140003f9b
mov r8, qword [rsp + 0x60]
lea rdx, str.ERROR:___s__does_not_exist._Terminating_install_now____n
call fcn.140004100
mov ebx, r12d
lea rcx, [rsp + 0x60]
call fcn.140027ab0
nop
lea rcx, [rsp + 0x78]
call fcn.140027ab0
nop
lea rcx, [rbp - 0x70]
call fcn.140023e80
cmp ebx, 1
jne 0x140004069
lea rdx, str._setoemkeys
mov rcx, rsi
call fcn.140029c1c
test rax, rax
je 0x140004069
lea rdx, str.Running__setOEMkeys_mode._n
mov rcx, qword [0x1400a8248]
call fcn.140004100
lea rcx, [rbp - 0x70]
call fcn.140001110
lea rcx, [rbp - 0x70]
call fcn.140025980
cmp eax, 1
jbe 0x140004011
mov ebx, r12d
lea rdx, str.ERROR:_The_System_NvDrsDB_could_not_be_loaded_to_apply_the_OEM_customization____n
jmp 0x140004054
lea rcx, [rbp - 0x70]
call fcn.1400030a0
cmp eax, 1
jne 0x140004048
xor edx, edx
lea rcx, [rbp - 0x70]
call fcn.140026a10
mov rcx, qword [0x1400a8248]
cmp eax, 1
jbe 0x14000403f
lea rdx, str.ERROR:_The_System_NvDrsDB_could_not_be_saved_appling_the_OEM_customization____n
jmp 0x14000405b
lea rdx, str.The_OEM_customizations_have_been_applied_successfully._n
jmp 0x14000405b
cmp eax, 5
je 0x140004060
lea rdx, str.ERROR:_Failure_in_SetOEMCustomization_operation__n
mov rcx, qword [0x1400a8248]
call fcn.140004100
lea rcx, [rbp - 0x70]
call fcn.140023e80
mov rcx, qword [0x1400a8248]
call fcn.140004310
mov edx, 0x6b8
mov rcx, qword [0x1400a8248]
call fcn.140027e64
mov qword [0x1400a8248], r12
mov eax, ebx
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.140027f90
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret