Function at 0x140003958
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r13
push r14
lea rbp, [rsp - 0x400]
sub rsp, 0x500
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp + 0x3f0], rax
mov esi, edx
mov r14, rcx
xor edx, edx
lea rcx, [rbp - 0x80]
lea r8d, [rdx + 0x50]
call fcn.140005bf0
xor ebx, ebx
lea rcx, str.SmartMaxApp64
lea rax, [rbp - 0x80]
lea rdx, [rbp - 0x80]
sub rcx, rax
lea r8d, [rbx + 0x28]
lea rax, [r8 + 0x7fffffd6]
test rax, rax
je 0x1400039d2
movzx eax, word [rcx + rdx]
test ax, ax
je 0x1400039d2
mov word [rdx], ax
add rdx, 2
sub r8, 1
jne 0x1400039b0
test r8, r8
lea rax, [rdx - 2]
lea r8, str.GlobalCplShutdown_8D5475ED_3A12_4f45_9ACE_23289E49C0DF
mov ecx, 0x100000
cmovne rax, rdx
xor edx, edx
mov word [rax], bx
call qword [sym.imp.KERNEL32.dll_OpenEventW]
mov qword [0x14001d2a8], rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r13d, 0x208
lea rcx, [rbp + 0x1e0]
mov r8d, r13d
xor edx, edx
call fcn.140005bf0
mov dword [rsp + 0x60], ebx
mov qword [rsp + 0x78], rbx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_IsWow64Process]
lea rcx, [rbp + 0x1e0]
mov edi, 0x104
lea rax, [rbp + 0x1e0]
mov edx, edi
cmp dword [rsp + 0x60], ebx
jne 0x140003a7f
lea r8, str.nvsmartmax64.dll
sub r8, rax
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x140003aac
movzx eax, word [r8 + rcx]
test ax, ax
je 0x140003aac
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x140003a5a
jmp 0x140003aac
lea r8, str.nvsmartmax.dll
sub r8, rax
lea rax, [rdx + 0x7ffffefa]
test rax, rax
je 0x140003aac
movzx eax, word [r8 + rcx]
test ax, ax
je 0x140003aac
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x140003a89
test rdx, rdx
lea rax, [rcx - 2]
mov r8, r13
cmovne rax, rcx
xor edx, edx
lea rcx, [rbp - 0x30]
mov word [rax], bx
call fcn.140005bf0
lea rax, [rsp + 0x70]
mov dword [rsp + 0x6c], ebx
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SYSTEMCurrentControlSetServices_nvlddmkmFTS
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140003b3d
mov rcx, qword [rsp + 0x70]
lea r9, [rsp + 0x68]
mov eax, 4
lea rdx, str.EnableRID72201
mov dword [rsp + 0x64], eax
xor r8d, r8d
mov dword [rsp + 0x68], eax
lea rax, [rsp + 0x64]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x6c]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rsp + 0x6c], ebx
je 0x140003bc1
lea rax, [rsp + 0x70]
mov dword [rsp + 0x64], 1
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x68], r13d
lea rdx, str.SYSTEMCurrentControlSetServices_nvlddmkmGlobalNVTweak
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140003c36
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x64]
lea rax, [rbp - 0x30]
xor r8d, r8d
lea rdx, str.InstalledDisplayServers
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140003c36
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140003c36
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x140003bdc
lea rcx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
test eax, eax
je 0x140003c36
mov eax, dword [rsp + 0x60]
test eax, eax
lea rdx, str.ProgramW6432
lea rcx, str.ProgramFiles
mov r8d, edi
cmovne rcx, rdx
lea rdx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea r8, [0x1400187dc]
mov rdx, r13
lea rcx, [rbp - 0x30]
call fcn.140001148
lea r8, str.NVIDIA_CorporationDisplay
mov rdx, r13
lea rcx, [rbp - 0x30]
call fcn.140001148
lea r8, [0x1400187dc]
mov rdx, rdi
lea rcx, [rbp - 0x30]
call fcn.140001148
lea r8, [rbp + 0x1e0]
mov rdx, r13
lea rcx, [rbp - 0x30]
call fcn.140001148
lea rcx, [rbp - 0x30]
call fcn.140001654
mov qword [0x14001d2b0], rax
test rax, rax
je 0x140003cd8
lea rdx, str.NvSmartMaxNotifyAppHWND
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rsp + 0x58], rbx
lea r8, [rbp - 0x80]
mov qword [rsp + 0x50], r14
lea rdx, str.NVSmartMaxappWindowClass
mov qword [rsp + 0x48], rbx
mov r9d, 0xcf0000
mov qword [rsp + 0x40], rbx
xor ecx, ecx
mov dword [rsp + 0x38], ebx
mov qword [0x14001d2b8], rax
mov eax, 0x80000000
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], eax
call qword [sym.imp.USER32.dll_CreateWindowExW]
mov rdi, rax
test rax, rax
je 0x140003cd8
mov edx, esi
mov rcx, rax
call qword [sym.imp.USER32.dll_ShowWindow]
mov rcx, rdi
call qword [sym.imp.USER32.dll_UpdateWindow]
mov ebx, 1
mov eax, ebx
mov rcx, qword [rbp + 0x3f0]
xor rcx, rsp
call fcn.140004920
mov rbx, qword [rsp + 0x540]
add rsp, 0x500
pop r14
pop r13
pop rdi
pop rsi
pop rbp
ret