Function at 0x1400034c0
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 [0x1400a6410]
xor rax, rsp
mov qword [rbp + 0x380], rax
mov rsi, r8
mov ebx, 1
lea rdx, [0x140089bf0]
mov rcx, qword [0x1400a7228]
call fcn.140004320
mov edx, 0x104
mov rcx, rsi
call fcn.140035300
lea rdx, [rax + 1]
mov rcx, rsi
call fcn.140035c08
mov r8, rsi
lea rdx, str.Command_line_passed_in:__s_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
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 [0x1400a7228]
test eax, eax
je 0x1400035ab
mov r8d, eax
lea rdx, str.NvProfileUpdateFirstRun_regKey_Read_failed_with_Error__u_n
call fcn.1400040a0
xor dil, dil
jmp 0x1400035c6
mov r8d, dword [rsp + 0x58]
lea rdx, str.NvProfileUpdateFirstRun_flag_value__d_n
call fcn.1400040a0
cmp dword [rsp + 0x58], ebx
sete dil
je 0x1400035dd
lea rdx, str._nocheck
mov rcx, rsi
call fcn.140029704
test rax, rax
je 0x14000360d
movzx edi, bl
lea rdx, str._init
mov rcx, rsi
call fcn.140029704
test rax, rax
jne 0x1400039b1
lea rdx, str._setoemkeys
mov rcx, rsi
call fcn.140029704
test rax, rax
jne 0x1400039b1
lea rdx, str._uninstall
mov rcx, rsi
call fcn.140029704
test rax, rax
je 0x14000370d
lea rdx, str.Running_in_uninstall_mode..._n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
lea rcx, [rbp - 0x70]
call fcn.140001110
lea rcx, [rbp - 0x70]
call fcn.1400259e0
cmp eax, ebx
jbe 0x140003661
lea rdx, str.WARNING:_Failed_to_remove_the_NvDrsDb_from_the_system__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
lea r8, str.SOFTWARENVIDIA_CorporationGlobal
lea rdx, str.Opening_the_reg_path___s__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
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 0x140004000
lea r8, str.SOFTWARENVIDIA_CorporationGlobal
lea rdx, str.Deleting_DRS_Path_Keys_from___s__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
lea rdx, str.DrsPath
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
je 0x1400036fd
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 [0x1400a7228]
call fcn.1400040a0
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140004000
lea rdx, str._update
mov rcx, rsi
call fcn.140029704
test rax, rax
je 0x14000397d
lea rdx, str._update
mov rcx, rsi
call fcn.140029704
lea rdi, [rax + 0x10]
lea rcx, [rbp - 0x70]
call fcn.140001110
mov rdx, rdi
lea rcx, [rsp + 0x78]
call fcn.140026c90
lea rcx, [rbp - 0x70]
call fcn.140025470
mov rcx, qword [0x1400a7228]
cmp eax, ebx
jbe 0x140003776
mov ebx, r12d
lea rdx, str.System_settings_could_not_be_loaded__n
call fcn.1400040a0
jmp 0x14000396d
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.1400040a0
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 0x140003811
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 0x140003806
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.140025240
cmp eax, ebx
jbe 0x140003895
cmp eax, 0x12
jne 0x14000384b
lea ebx, [rax - 0xf]
lea rdx, str.The_update_file_was_too_old_and_was_not_applied_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
jmp 0x14000396d
cmp eax, 0x10
jne 0x14000386e
lea ebx, [rax - 0xe]
mov r8, rdi
lea rdx, str.The_update_file_could_not_be_found:__s_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
jmp 0x14000396d
cmp eax, 0x15
jne 0x14000396d
lea ebx, [rax - 0x11]
mov r8, rdi
lea rdx, str.The_update_file_belongs_to_another_release_branch:__s_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
jmp 0x14000396d
xor edx, edx
lea rcx, [rbp - 0x70]
call fcn.140026500
cmp eax, ebx
jbe 0x1400038bf
mov ebx, r12d
lea rdx, str.Update_could_not_be_saved_on_the_system__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
jmp 0x14000396d
lea rcx, [rbp + 0x80]
call fcn.140001110
lea rcx, [rsp + 0x60]
call fcn.140026d40
lea rdx, [rsp + 0x60]
lea rcx, [rbp + 0x80]
call fcn.140002030
cmp eax, ebx
jne 0x140003955
lea rdx, [0x140088fc8]
lea rcx, [rsp + 0x60]
call fcn.1400274b0
lea rdx, str.update.bin
lea rcx, [rsp + 0x60]
call fcn.1400274b0
xor r8d, r8d
mov rdx, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x140003941
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Update_Could_not_be_copied__GetLastError:__08x_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
jmp 0x140003955
lea rdx, str.Update_File_copied_successfully_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
nop
lea rcx, [rsp + 0x60]
call fcn.1400275a0
nop
lea rcx, [rbp + 0x80]
call fcn.140023970
nop
lea rcx, [rsp + 0x78]
call fcn.1400275a0
nop
jmp 0x140004000
mov rcx, qword [0x1400a7228]
test dil, dil
je 0x1400039a0
mov r8, rsi
lea rdx, str.Invalid_Command__:__s_n
call fcn.1400040a0
mov ebx, r12d
jmp 0x140004009
lea rdx, str.First_Run_Flag_not_set_n
call fcn.1400040a0
jmp 0x140004009
lea rdx, str.Running_in_install_mode..._n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
lea rdx, str._init
mov rcx, rsi
call fcn.140029704
test rax, rax
je 0x140003f63
lea rcx, [rbp - 0x70]
call fcn.140001110
lea rcx, [rsp + 0x78]
call fcn.140026d40
lea rcx, [rsp + 0x60]
call fcn.140026d40
lea rdx, str.Running__init_mode._n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
lea r8, str.nvdrsdb.bin
lea rdx, str.Checking_if_the_file___s__exists._n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x170]
call fcn.14002a010
mov edx, 0x104
lea rcx, [rbp + 0x170]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp word [rbp + 0x170], r12w
je 0x140003a78
lea rdx, [rbp + 0x170]
lea rcx, [rsp + 0x78]
call fcn.140026ef0
lea rdx, str.drivers
lea rcx, [rsp + 0x78]
call fcn.1400274b0
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x60]
call fcn.140026d90
lea rdx, str.NVIDIA_CorporationDrs_nvdrsdb.bin
lea rcx, [rsp + 0x60]
call fcn.1400274b0
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rcx, qword [0x1400a7228]
cmp eax, 0xffffffff
je 0x140003f27
mov r14, qword [rsp + 0x78]
lea rdx, str.Entering__SetDriversPath__function....._n
call fcn.1400040a0
mov rcx, qword [0x1400a7228]
call fcn.140004230
mov r15d, ebx
mov qword [rsp + 0x50], r12
mov r8, r14
lea rdx, str.Setting_the_Gold_Path_as___s__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rdi, 0xffffffffffffffff
mov rcx, qword [0x1400a7228]
cmp eax, 0xffffffff
jne 0x140003b1e
mov r15d, r12d
lea rdx, str.WARNING:___Drivers_Path___is_not_a_valid_System_path__n
call fcn.1400040a0
jmp 0x140003bf9
lea r8, str.SOFTWARENVIDIA_CorporationGlobalDrsPath
lea rdx, str.Creating_Opening_the_reg_path___s__n
call fcn.1400040a0
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 [0x1400a7228]
test eax, eax
jne 0x140003bea
lea rdx, str.Setting_NVDRS_GOLD_PATH_key_on___s__n
call fcn.1400040a0
mov rax, rdi
nop dword [rax]
lea rax, [rax + 1]
cmp word [r14 + rax*2], r12w
jne 0x140003b90
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 0x140003bdd
mov r15d, r12d
lea rdx, str.WARNING:_Could_not_set_the_registry_entry_for_NVDRS_GOLD_PATH__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140003bf9
lea rdx, str.WARNING:_Could_not_Create_or_Open_the_reg_path___s___n
call fcn.1400040a0
mov r15d, r12d
mov rcx, qword [0x1400a7228]
call fcn.140004270
mov r8d, r15d
lea rdx, str.Exiting__SetDriversPath__function._Return__d_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov rcx, qword [0x1400a7228]
test r15d, r15d
lea rdx, str.WARNING:_The_NVDRS_GOLD_PATH_has_not_been_set__n
je 0x140003c35
lea rdx, str.The_NVDRS_GOLD_PATH_has_been_set_successfully._n
call fcn.1400040a0
mov r8, qword [rsp + 0x60]
lea rdx, str.__s__exists._Loading_the_Db._n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x60]
lea rcx, [rbp - 0x70]
call fcn.140025240
mov rcx, qword [0x1400a7228]
cmp eax, ebx
jbe 0x140003c82
lea rdx, str.ERROR:_The_NvDrsDb_has_encountered_problems_loading____n
call fcn.1400040a0
mov ebx, r12d
jmp 0x140003c8e
lea rdx, str.The_NvDrsDb_has_been_loaded_successfully._n
call fcn.1400040a0
lea rcx, [rbp - 0x70]
call fcn.140001470
test eax, eax
jne 0x140003cb3
lea rdx, str.ERROR:_CreateDrsFolder_has_encountered_problems_in_creating_Drs_folder____n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
jmp 0x140003f38
cmp ebx, 1
jne 0x140003f3b
lea rdx, str.Entering__SetLDDMRegistry__function....._n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov rcx, qword [0x1400a7228]
call fcn.140004230
mov r14d, ebx
mov qword [rsp + 0x70], r12
mov ecx, 0x20a
call fcn.14002795c
mov rbx, rax
xor edx, edx
mov r8d, 0x20a
mov rcx, rax
call fcn.14002a010
lea rdx, str.Querying_the_OS_for_the_ALLUSERSPROFILE__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov qword [rsp + 0x50], r12
lea r9, [rsp + 0x50]
xor r8d, r8d
xor edx, edx
lea rcx, [0x14008d960]
call sub.SHELL32.dll_SHGetKnownFolderPath
mov r8, qword [rsp + 0x50]
test r8, r8
je 0x140003d50
mov edx, 0x105
mov rcx, rbx
call fcn.14003451c
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 [0x1400a7228]
call fcn.1400040a0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rcx, qword [0x1400a7228]
cmp eax, 0xffffffff
jne 0x140003d8f
mov r14d, r12d
lea rdx, str.WARNING:_ALLUSERSPROFILE_is_not_a_valid_System_path__n
call fcn.1400040a0
jmp 0x140003e69
lea r8, str.SOFTWARENVIDIA_CorporationGlobalDrsPath
lea rdx, str.Creating_Opening_the_reg_path___s__n
call fcn.1400040a0
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 [0x1400a7228]
test eax, eax
jne 0x140003e5a
lea rdx, str.Setting_NVDRS_PATH_key_on___s__n
call fcn.1400040a0
nop dword [rax + rax]
lea rdi, [rdi + 1]
cmp word [rbx + rdi*2], r12w
jne 0x140003e00
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 0x140003e4d
mov r14d, r12d
lea rdx, str.WARNING:_Could_not_set_the_registry_entry_for_NVDRS_PATH__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140003e69
lea rdx, str.WARNING:_Could_not_Create_or_Open_the_reg_path___s___n
call fcn.1400040a0
mov r14d, r12d
mov rcx, rbx
call fcn.140027964
mov rcx, qword [0x1400a7228]
call fcn.140004270
mov r8d, r14d
lea rdx, str.Exiting__SetLDDMRegistry__function._Return__d_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov r8d, r14d
lea rdx, str.SetLDDMRegistry_returned__d_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov ebx, 1
lea rdx, str.Starting_the_process_to_save_the_DRS_database_to_system_n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
lea rcx, [rsp + 0x50]
call fcn.140001b50
mov r8d, eax
mov rdi, qword [rsp + 0x50]
mov rdx, rdi
lea rcx, [rbp - 0x70]
call fcn.140026750
cmp eax, ebx
jbe 0x140003eef
mov ebx, r12d
lea rdx, str.ERROR:_The_System_NvDrsDB_could_not_be_created____n
jmp 0x140003f11
xor edx, edx
lea rcx, [rbp - 0x70]
call fcn.140026500
cmp eax, ebx
jbe 0x140003f0a
mov ebx, r12d
lea rdx, str.ERROR:_The_System_NvDrsDB_could_not_be_created____n
jmp 0x140003f11
lea rdx, str.The_System_NvDrsDB_has_been_created_successfully._n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
mov rcx, rdi
call fcn.140027964
jmp 0x140003f3b
mov r8, qword [rsp + 0x60]
lea rdx, str.ERROR:___s__does_not_exist._Terminating_install_now____n
call fcn.1400040a0
mov ebx, r12d
lea rcx, [rsp + 0x60]
call fcn.1400275a0
nop
lea rcx, [rsp + 0x78]
call fcn.1400275a0
nop
lea rcx, [rbp - 0x70]
call fcn.140023970
cmp ebx, 1
jne 0x140004009
lea rdx, str._setoemkeys
mov rcx, rsi
call fcn.140029704
test rax, rax
je 0x140004009
lea rdx, str.Running__setOEMkeys_mode._n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
lea rcx, [rbp - 0x70]
call fcn.140001110
lea rcx, [rbp - 0x70]
call fcn.140025470
cmp eax, 1
jbe 0x140003fb1
mov ebx, r12d
lea rdx, str.ERROR:_The_System_NvDrsDB_could_not_be_loaded_to_apply_the_OEM_customization____n
jmp 0x140003ff4
lea rcx, [rbp - 0x70]
call fcn.140003040
cmp eax, 1
jne 0x140003fe8
xor edx, edx
lea rcx, [rbp - 0x70]
call fcn.140026500
mov rcx, qword [0x1400a7228]
cmp eax, 1
jbe 0x140003fdf
lea rdx, str.ERROR:_The_System_NvDrsDB_could_not_be_saved_appling_the_OEM_customization____n
jmp 0x140003ffb
lea rdx, str.The_OEM_customizations_have_been_applied_successfully._n
jmp 0x140003ffb
cmp eax, 5
je 0x140004000
lea rdx, str.ERROR:_Failure_in_SetOEMCustomization_operation__n
mov rcx, qword [0x1400a7228]
call fcn.1400040a0
lea rcx, [rbp - 0x70]
call fcn.140023970
mov rcx, qword [0x1400a7228]
call fcn.1400042b0
mov edx, 0x6b8
mov rcx, qword [0x1400a7228]
call fcn.140027954
mov qword [0x1400a7228], r12
mov eax, ebx
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.140027a80
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