Function at 0x140001780
Capabilities:
Check mutex on windows
Query environment variable
Set current directory

Disassembly:
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
sub rsp, 0x280
mov rax, qword [0x14000c390]
xor rax, rsp
mov qword [rsp + 0x270], rax
xor eax, eax
mov rdi, rcx
lea r8, str.NvSmartMax_mutex64
xor r12d, r12d
xor edx, edx
xor ecx, ecx
mov ebp, r9d
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov rsi, rax
test rax, rax
je 0x140001a06
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x1400019fd
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x1400019fd
lea rcx, [rsp + 0x62]
xor edx, edx
mov r8d, 0x206
mov dword [rsp + 0x20], r12d
mov qword [rsp + 0x28], r12
mov word [rsp + 0x60], r12w
call fcn.140001b00
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_IsWow64Process]
mov r11d, dword [rsp + 0x20]
test r11d, r11d
je 0x140001860
lea rcx, [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
test eax, eax
je 0x1400019fd
mov r11d, dword [rsp + 0x20]
lea rax, str.ProgramW6432
test r11d, r11d
lea rcx, str.ProgramFiles
mov qword [rsp + 0x2a8], rbx
mov ebx, 0x104
lea rdx, [rsp + 0x60]
cmovne rcx, rax
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r11, rbx
lea rax, [rsp + 0x60]
cmp word [rax], r12w
je 0x1400018aa
add rax, 2
sub r11, 1
jne 0x140001898
jmp 0x140001904
test r11, r11
je 0x140001904
mov rdx, rbx
mov rcx, rbx
sub rdx, r11
sub rcx, rdx
lea rax, [rsp + rdx*2 + 0x60]
je 0x1400018fc
lea r9, [0x140009548]
lea rdx, [rcx + rdx + 0x7ffffefb]
sub r9, rax
test rdx, rdx
je 0x1400018f7
movzx r8d, word [r9 + rax]
test r8w, r8w
je 0x1400018f7
mov word [rax], r8w
add rax, 2
dec rdx
sub rcx, 1
jne 0x1400018d4
jmp 0x1400018fc
test rcx, rcx
jne 0x140001900
sub rax, 2
mov word [rax], r12w
mov rcx, rbx
lea rax, [rsp + 0x60]
nop dword [rax]
cmp word [rax], r12w
je 0x140001922
add rax, 2
sub rcx, 1
jne 0x140001910
jmp 0x14000197e
test rcx, rcx
je 0x14000197e
mov rdx, rbx
sub rdx, rcx
sub rbx, rdx
lea rax, [rsp + rdx*2 + 0x60]
je 0x140001976
lea r8, str.NVIDIA_CorporationDisplay
lea rcx, [rbx + rdx + 0x7ffffefb]
sub r8, rax
nop dword [rax]
test rcx, rcx
je 0x140001971
movzx edx, word [r8 + rax]
test dx, dx
je 0x140001971
mov word [rax], dx
add rax, 2
dec rcx
sub rbx, 1
jne 0x140001950
jmp 0x140001976
test rbx, rbx
jne 0x14000197a
sub rax, 2
mov word [rax], r12w
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
mov rcx, rdi
call fcn.1400016e0
mov edx, ebp
mov rcx, rdi
call fcn.1400014a0
mov rbx, qword [rsp + 0x2a8]
test eax, eax
je 0x1400019fd
lea rcx, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x1400019fd
nop dword [rax]
lea rcx, [rsp + 0x30]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x30]
call qword [sym.imp.USER32.dll_DispatchMessageW]
lea rcx, [rsp + 0x30]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jne 0x1400019d0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x40]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.140001ad0
mov rbp, qword [rsp + 0x2b0]
add rsp, 0x280
pop r12
pop rdi
pop rsi
ret