Function at 0x140003170
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 qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x2a0]
sub rsp, 0x3a0
mov rax, qword [0x1400bb4a8]
xor rax, rsp
mov qword [rbp + 0x290], rax
mov r14, r8
mov esi, 1
mov ebx, esi
lea rdx, [0x14009eaa0]
mov rcx, qword [0x1400bc2d8]
call fcn.140004050
mov edx, 0x104
mov rcx, r14
call fcn.14003a9c8
lea rdx, [rax + 1]
mov rcx, r14
call fcn.14003b3ac
mov r8, r14
lea rdx, str.Command_line_passed_in:__s_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
xor r15d, r15d
mov dword [rsp + 0x50], r15d
mov dword [rsp + 0x60], 4
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
lea r9d, [rsi + 0xf]
lea r8, str.NvProfileUpdateFirstRun
lea rdx, str.SYSTEMCurrentControlSetServices_nvlddmkm
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegGetValueW]
mov rcx, qword [0x1400bc2d8]
test eax, eax
je 0x140003257
mov r8d, eax
lea rdx, str.NvProfileUpdateFirstRun_regKey_Read_failed_with_Error__u_n
call fcn.140003dd0
xor dil, dil
jmp 0x140003272
mov r8d, dword [rsp + 0x50]
lea rdx, str.NvProfileUpdateFirstRun_flag_value__d_n
call fcn.140003dd0
cmp dword [rsp + 0x50], ebx
sete dil
je 0x140003289
lea rdx, str._nocheck
mov rcx, r14
call fcn.14002a2ec
test rax, rax
je 0x1400032b9
movzx edi, bl
lea rdx, str._init
mov rcx, r14
call fcn.14002a2ec
test rax, rax
jne 0x140003659
lea rdx, str._setoemkeys
mov rcx, r14
call fcn.14002a2ec
test rax, rax
jne 0x140003659
lea rdx, str._uninstall
mov rcx, r14
call fcn.14002a2ec
test rax, rax
je 0x1400033b9
lea rdx, str.Running_in_uninstall_mode..._n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
lea rcx, [rbp - 0x70]
call fcn.140001100
lea rcx, [rbp - 0x70]
call fcn.140026190
cmp eax, ebx
jbe 0x14000330d
lea rdx, str.WARNING:_Failed_to_remove_the_NvDrsDb_from_the_system__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
lea r8, str.SOFTWARENVIDIA_CorporationGlobal
lea rdx, str.Opening_the_reg_path___s__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
lea rax, [rsp + 0x58]
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 0x140003ce2
lea r8, str.SOFTWARENVIDIA_CorporationGlobal
lea rdx, str.Deleting_DRS_Path_Keys_from___s__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
lea rdx, str.DrsPath
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
je 0x1400033a9
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 [0x1400bc2d8]
call fcn.140003dd0
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140003ce2
lea rdx, str._update
mov rcx, r14
call fcn.14002a2ec
test rax, rax
je 0x140003625
lea rdx, str._update
mov rcx, r14
call fcn.14002a2ec
lea rdi, [rax + 0x10]
lea rcx, [rbp - 0x70]
call fcn.140001100
mov rdx, rdi
lea rcx, [rbp - 0x80]
call fcn.1400274b0
lea rcx, [rbp - 0x70]
call fcn.140025c40
mov rcx, qword [0x1400bc2d8]
cmp eax, ebx
jbe 0x140003421
mov ebx, r15d
lea rdx, str.System_settings_could_not_be_loaded__n
call fcn.140003dd0
jmp 0x140003616
xor sil, sil
mov qword [rsp + 0x58], r15
mov dword [rsp + 0x50], r15d
mov dword [rsp + 0x78], r15d
mov dword [rsp + 0x60], r15d
lea r8, str.SOFTWARENVIDIA_CorporationGlobalNVUpdatus
lea rdx, str.Checking_for_ForceUpdate_on____s__n
call fcn.140003dd0
lea rax, [rsp + 0x58]
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 0x1400034bc
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x78]
xor r8d, r8d
lea rdx, str.ForcePackages
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1400034b1
cmp dword [rsp + 0x50], r15d
setne sil
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
movzx r9d, sil
movzx r8d, bl
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x70]
call fcn.140025a00
cmp eax, ebx
jbe 0x14000353f
cmp eax, 0x12
jne 0x1400034f5
lea ebx, [rax - 0xf]
lea rdx, str.The_update_file_was_too_old_and_was_not_applied_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
jmp 0x140003616
cmp eax, 0x10
jne 0x140003518
lea ebx, [rax - 0xe]
mov r8, rdi
lea rdx, str.The_update_file_could_not_be_found:__s_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
jmp 0x140003616
cmp eax, 0x15
jne 0x140003616
lea ebx, [rax - 0x11]
mov r8, rdi
lea rdx, str.The_update_file_belongs_to_another_release_branch:__s_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
jmp 0x140003616
xor edx, edx
lea rcx, [rbp - 0x70]
call fcn.140026cc0
cmp eax, ebx
jbe 0x140003569
mov ebx, r15d
lea rdx, str.Update_could_not_be_saved_on_the_system__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
jmp 0x140003616
lea rcx, [rbp + 0x80]
call fcn.140001100
lea rcx, [rsp + 0x68]
call fcn.140027560
lea rdx, [rsp + 0x68]
lea rcx, [rbp + 0x80]
call fcn.140001d00
cmp eax, ebx
jne 0x1400035fe
lea rdx, [0x14009de78]
lea rcx, [rsp + 0x68]
call fcn.140027d10
lea rdx, str.update.bin
lea rcx, [rsp + 0x68]
call fcn.140027d10
xor r8d, r8d
mov rdx, qword [rsp + 0x68]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x1400035ea
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.Update_Could_not_be_copied__GetLastError:__08x_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
jmp 0x1400035fe
lea rdx, str.Update_File_copied_successfully_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
nop
lea rcx, [rsp + 0x68]
call fcn.140027e00
nop
lea rcx, [rbp + 0x80]
call fcn.140024140
nop
lea rcx, [rbp - 0x80]
call fcn.140027e00
nop
jmp 0x140003ce2
mov rcx, qword [0x1400bc2d8]
test dil, dil
je 0x140003648
mov r8, r14
lea rdx, str.Invalid_Command__:__s_n
call fcn.140003dd0
mov ebx, r15d
jmp 0x140003ceb
lea rdx, str.First_Run_Flag_not_set_n
call fcn.140003dd0
jmp 0x140003ceb
lea rdx, str.Running_in_install_mode..._n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
lea rdx, str._init
mov rcx, r14
call fcn.14002a2ec
test rax, rax
je 0x140003c45
lea rcx, [rbp - 0x70]
call fcn.140001100
lea rcx, [rbp - 0x80]
call fcn.140027560
lea rcx, [rsp + 0x68]
call fcn.140027560
lea rdx, str.Running__init_mode._n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
lea r8, str.nvdrsdb.bin
lea rdx, str.Checking_if_the_file___s__exists._n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x80]
call fcn.14002b5b0
mov edx, 0x104
lea rcx, [rbp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp word [rbp + 0x80], r15w
je 0x14000371d
lea rdx, [rbp + 0x80]
lea rcx, [rbp - 0x80]
call fcn.140027710
lea rdx, str.drivers
lea rcx, [rbp - 0x80]
call fcn.140027d10
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x68]
call fcn.1400275b0
lea rdx, str.NVIDIA_CorporationDrs_nvdrsdb.bin
lea rcx, [rsp + 0x68]
call fcn.140027d10
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rcx, qword [0x1400bc2d8]
cmp eax, 0xffffffff
je 0x140003c08
mov rdi, qword [rbp - 0x80]
lea rdx, str.Entering__SetDriversPath__function....._n
call fcn.140003dd0
mov rcx, qword [0x1400bc2d8]
call fcn.140003f60
mov qword [rsp + 0x58], r15
mov r8, rdi
lea rdx, str.Setting_the_Gold_Path_as___s__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov rcx, qword [0x1400bc2d8]
cmp eax, 0xffffffff
jne 0x1400037b4
lea rdx, str.WARNING:___Drivers_Path___is_not_a_valid_System_path__n
call fcn.140003dd0
jmp 0x1400038c5
lea r8, str.SOFTWARENVIDIA_CorporationGlobalDrsPath
lea rdx, str.Creating_Opening_the_reg_path___s__n
call fcn.140003dd0
mov qword [rsp + 0x40], r15
lea rax, [rsp + 0x58]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0xf013f
mov dword [rsp + 0x20], r15d
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 [0x1400bc2d8]
test eax, eax
jne 0x1400038b9
lea rdx, str.Setting_NVDRS_GOLD_PATH_key_on___s__n
call fcn.140003dd0
mov rax, 0xffffffffffffffff
nop dword [rax + rax]
lea rax, [rax + 1]
cmp word [rdi + rax*2], r15w
jne 0x140003830
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdi
mov r9d, esi
xor r8d, r8d
lea rdx, str.NVDRS_GOLD_PATH
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, esi
test eax, eax
je 0x14000387f
mov edi, r15d
lea rdx, str.WARNING:_Could_not_set_the_registry_entry_for_NVDRS_GOLD_PATH__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [0x1400bc2d8]
call fcn.140003fa0
mov r8d, edi
lea rdx, str.Exiting__SetDriversPath__function._Return__d_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
test edi, edi
je 0x1400038e7
lea rdx, str.The_NVDRS_GOLD_PATH_has_been_set_successfully._n
jmp 0x1400038ee
lea rdx, str.WARNING:_Could_not_Create_or_Open_the_reg_path___s___n
call fcn.140003dd0
mov rcx, qword [0x1400bc2d8]
call fcn.140003fa0
xor r8d, r8d
lea rdx, str.Exiting__SetDriversPath__function._Return__d_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
lea rdx, str.WARNING:_The_NVDRS_GOLD_PATH_has_not_been_set__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov r8, qword [rsp + 0x68]
lea rdx, str.__s__exists._Loading_the_Db._n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x70]
call fcn.140025a00
mov rcx, qword [0x1400bc2d8]
cmp eax, ebx
jbe 0x140003942
lea rdx, str.ERROR:_The_NvDrsDb_has_encountered_problems_loading____n
call fcn.140003dd0
mov ebx, r15d
jmp 0x14000394e
lea rdx, str.The_NvDrsDb_has_been_loaded_successfully._n
call fcn.140003dd0
lea rcx, [rbp - 0x70]
call fcn.140001420
test eax, eax
jne 0x140003971
lea rdx, str.ERROR:_CreateDrsFolder_has_encountered_problems_in_creating_Drs_folder____n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov ebx, r15d
cmp ebx, esi
jne 0x140003c04
call fcn.140002af0
mov r8d, eax
lea rdx, str.SetLDDMRegistry_returned__d_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
lea rdx, str.Starting_the_process_to_save_the_DRS_database_to_system_n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov ecx, 0x21c
call fcn.14002833c
mov rdi, rax
add rax, 0xa4
lea rcx, [0x1400bb0a4]
lea rdx, section..data
cmp rdi, rcx
ja 0x1400039f1
cmp rax, rdx
jb 0x1400039f1
mov rcx, rdi
sub rdx, rdi
mov r8d, 0x2a
mov r9d, r8d
mov eax, dword [rdx + rcx]
mov dword [rcx], eax
lea rcx, [rcx + 4]
sub r8, rsi
jne 0x1400039e1
jmp 0x140003a5f
movups xmm0, xmmword [rdx]
movups xmmword [rdi], xmm0
movups xmm1, xmmword [rdx + 0x10]
movups xmmword [rdi + 0x10], xmm1
movups xmm0, xmmword [rdx + 0x20]
movups xmmword [rdi + 0x20], xmm0
movups xmm1, xmmword [rdx + 0x30]
movups xmmword [rdi + 0x30], xmm1
movups xmm0, xmmword [rdx + 0x40]
movups xmmword [rdi + 0x40], xmm0
movups xmm1, xmmword [rdx + 0x50]
movups xmmword [rdi + 0x50], xmm1
movups xmm0, xmmword [rdx + 0x60]
movups xmmword [rdi + 0x60], xmm0
movups xmm1, xmmword [rdx + 0x70]
movups xmmword [rdi + 0x70], xmm1
movups xmm0, xmmword [rdx + 0x80]
movups xmmword [rdi + 0x80], xmm0
movups xmm1, xmmword [rdx + 0x90]
movups xmmword [rdi + 0x90], xmm1
mov rax, qword [rdx + 0xa0]
mov qword [rdi + 0xa0], rax
mov r9d, 0x2a
mov eax, r9d
lea rdx, [rdi + rax*4]
lea eax, [r9 + 0x50]
lea rax, [rdi + rax*4]
lea r8, [0x1400bb1f0]
lea rcx, [0x1400bb0b0]
cmp rdx, r8
ja 0x140003ab6
cmp rax, rcx
jb 0x140003ab6
lea rdx, [rdi + 0xa8]
mov r8d, 0x51
mov r10d, r8d
nop word [rax + rax]
mov eax, dword [rcx]
mov dword [rdx], eax
lea rdx, [rdx + 4]
lea rcx, [rcx + 4]
sub r8, rsi
jne 0x140003aa0
jmp 0x140003b3b
mov ebx, 2
nop dword [rax + rax]
movups xmm0, xmmword [rcx]
movups xmmword [rdx], xmm0
movups xmm1, xmmword [rcx + 0x10]
movups xmmword [rdx + 0x10], xmm1
movups xmm0, xmmword [rcx + 0x20]
movups xmmword [rdx + 0x20], xmm0
movups xmm1, xmmword [rcx + 0x30]
movups xmmword [rdx + 0x30], xmm1
movups xmm0, xmmword [rcx + 0x40]
movups xmmword [rdx + 0x40], xmm0
movups xmm1, xmmword [rcx + 0x50]
movups xmmword [rdx + 0x50], xmm1
movups xmm0, xmmword [rcx + 0x60]
movups xmmword [rdx + 0x60], xmm0
lea rdx, [rdx + 0x80]
movups xmm1, xmmword [rcx + 0x70]
movups xmmword [rdx - 0x10], xmm1
lea rcx, [rcx + 0x80]
sub rbx, rsi
jne 0x140003ac0
movups xmm0, xmmword [rcx]
movups xmmword [rdx], xmm0
movups xmm1, xmmword [rcx + 0x10]
movups xmmword [rdx + 0x10], xmm1
movups xmm0, xmmword [rcx + 0x20]
movups xmmword [rdx + 0x20], xmm0
movups xmm1, xmmword [rcx + 0x30]
movups xmmword [rdx + 0x30], xmm1
mov eax, dword [rcx + 0x40]
mov dword [rdx + 0x40], eax
mov r10d, 0x51
add r9d, r10d
mov edx, r15d
lea r10, [rdi + r9*4]
lea eax, [r9 + 0xb]
lea rax, [rdi + rax*4]
lea rcx, [0x1400bb224]
cmp r10, rcx
ja 0x140003b87
lea r8, [0x1400bb1f8]
cmp rax, r8
jb 0x140003b87
nop word [rax + rax]
lea ecx, [rdx + r9]
mov eax, dword [r8]
mov dword [rdi + rcx*4], eax
inc edx
lea r8, [r8 + 4]
cmp edx, 0xc
jb 0x140003b70
jmp 0x140003baa
movups xmm0, xmmword [0x1400bb1f8]
movups xmmword [r10], xmm0
movups xmm1, xmmword [0x1400bb208]
movups xmmword [r10 + 0x10], xmm1
movups xmm0, xmmword [0x1400bb218]
movups xmmword [r10 + 0x20], xmm0
mov r8d, 0x87
mov rdx, rdi
lea rcx, [rbp - 0x70]
call fcn.140026f20
cmp eax, esi
jbe 0x140003bcc
mov esi, r15d
lea rdx, str.ERROR:_The_System_NvDrsDB_could_not_be_created____n
jmp 0x140003bee
xor edx, edx
lea rcx, [rbp - 0x70]
call fcn.140026cc0
cmp eax, esi
jbe 0x140003be7
mov esi, r15d
lea rdx, str.ERROR:_The_System_NvDrsDB_could_not_be_created____n
jmp 0x140003bee
lea rdx, str.The_System_NvDrsDB_has_been_created_successfully._n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
mov rcx, rdi
call fcn.140028344
jmp 0x140003c1c
mov esi, ebx
jmp 0x140003c1c
mov r8, qword [rsp + 0x68]
lea rdx, str.ERROR:___s__does_not_exist._Terminating_install_now____n
call fcn.140003dd0
mov esi, r15d
lea rcx, [rsp + 0x68]
call fcn.140027e00
nop
lea rcx, [rbp - 0x80]
call fcn.140027e00
nop
lea rcx, [rbp - 0x70]
call fcn.140024140
mov ebx, esi
cmp esi, 1
jne 0x140003ceb
lea rdx, str._setoemkeys
mov rcx, r14
call fcn.14002a2ec
test rax, rax
je 0x140003ceb
lea rdx, str.Running__setOEMkeys_mode._n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
lea rcx, [rbp - 0x70]
call fcn.140001100
lea rcx, [rbp - 0x70]
call fcn.140025c40
cmp eax, 1
jbe 0x140003c93
mov ebx, r15d
lea rdx, str.ERROR:_The_System_NvDrsDB_could_not_be_loaded_to_apply_the_OEM_customization____n
jmp 0x140003cd6
lea rcx, [rbp - 0x70]
call fcn.140002d00
cmp eax, 1
jne 0x140003cca
xor edx, edx
lea rcx, [rbp - 0x70]
call fcn.140026cc0
mov rcx, qword [0x1400bc2d8]
cmp eax, 1
jbe 0x140003cc1
lea rdx, str.ERROR:_The_System_NvDrsDB_could_not_be_saved_appling_the_OEM_customization____n
jmp 0x140003cdd
lea rdx, str.The_OEM_customizations_have_been_applied_successfully._n
jmp 0x140003cdd
cmp eax, 5
je 0x140003ce2
lea rdx, str.ERROR:_Failure_in_SetOEMCustomization_operation__n
mov rcx, qword [0x1400bc2d8]
call fcn.140003dd0
lea rcx, [rbp - 0x70]
call fcn.140024140
mov rcx, qword [0x1400bc2d8]
call fcn.140003fe0
mov edx, 0x6b8
mov rcx, qword [0x1400bc2d8]
call fcn.140028334
mov qword [0x1400bc2d8], r15
mov eax, ebx
mov rcx, qword [rbp + 0x290]
xor rcx, rsp
call fcn.140028460
lea r11, [rsp + 0x3a0]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret