Function at 0x140021504
Capabilities:
Check if file exists
Check mutex on windows
Get common file path
Identify system language via api
Set registry value

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
lea rbp, [rax - 0x218]
sub rsp, 0x300
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1402ee230]
xor rax, rsp
mov qword [rbp + 0x1f0], rax
mov rdi, rcx
xor r12d, r12d
mov qword [0x1402f1420], r12
mov qword [0x1402f1410], r12
lea r13d, [r12 + 1]
mov qword [0x1402f1428], r13
lea rax, [0x1402213d0]
mov qword [0x1402f1430], rax
lea rax, [0x1402f1410]
mov qword [section..data], rax
lea rcx, str.NVCPLUI.EXE
call fcn.14001e1b8
lea r8, str.GlobalInitializeSedona
mov edx, r13d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
cmove rbx, r12
mov qword [rbp - 0x48], rbx
test rbx, rbx
jne 0x1400215bb
xor eax, eax
jmp 0x1400219d4
lea rcx, [rsp + 0x60]
call fcn.14001e640
nop
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.140083d58
mov esi, 0x104
mov edx, esi
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea r8, [0x14022b5d4]
mov edx, esi
lea rcx, [rbp - 0x20]
call fcn.1401c013c
lea r8, str.nvCpl.cpl
mov edx, esi
lea rcx, [rbp - 0x20]
call fcn.1401c013c
lea rcx, [rbp - 0x20]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x14002168a
lea rax, [rsp + 0x54]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x40]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
lea rdx, str.SOFTWARENVIDIA_CorporationGlobalNvCplApiPolicies
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x14002168a
mov dword [rsp + 0x50], r13d
mov dword [rsp + 0x28], 4
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
lea rdx, str.CplGroupUIPolicy
mov rcx, qword [rbp - 0x40]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov word [rsp + 0x54], r12w
mov dword [rsp + 0x50], r12d
xor r8d, r8d
lea rdx, [rsp + 0x50]
lea rcx, str.UserDefinedLocale
call fcn.1400011f8
test eax, eax
jne 0x1400216cd
lea rcx, [rsp + 0x54]
call fcn.14000129c
test eax, eax
jne 0x1400216c3
call qword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
jmp 0x1400216c8
movzx eax, word [rsp + 0x54]
movzx ecx, ax
jmp 0x1400216d1
mov ecx, dword [rsp + 0x50]
call fcn.140001640
mov esi, eax
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetThreadLocale]
call fcn.140055ff4
test eax, eax
je 0x1400216f2
movzx ecx, si
call qword [sym.imp.KERNEL32.dll_SetThreadUILanguage]
mov rcx, rdi
call fcn.140020438
test al, al
jne 0x140021705
mov dword [rdi + 0x240], r12d
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.140021488
test al, al
jne 0x140021738
lea rcx, [rsp + 0x60]
call fcn.140084be4
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400215b4
call qword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.140089ae0
call fcn.140011f84
mov rcx, rdi
call fcn.140085674
call fcn.140089944
test eax, eax
jne 0x140021775
or r8d, 0xffffffff
xor edx, edx
lea ecx, [rax + 0x64]
call fcn.14005ec70
nop
lea rcx, [rsp + 0x60]
call fcn.140084be4
nop
jmp 0x140021721
call fcn.14006b910
mov rcx, qword [rax + 0x80]
mov qword [rcx + 0x48], r12
xor ecx, ecx
call fcn.140089054
lea rdx, [0x14022b4f8]
mov rcx, rdi
call fcn.140087078
mov edx, 7
mov rcx, rdi
call fcn.140083ca8
mov ecx, 0xf8
call fcn.14005a668
mov rsi, rax
mov qword [rbp - 0x40], rax
test rax, rax
je 0x1400217f1
lea rax, str.CSedonaPropPageView
mov qword [rsp + 0x20], rax
lea r9, str.CMainFrame
lea r8, str.CSedonaDoc
mov edx, 0x80
mov rcx, rsi
call fcn.140085ba4
lea r11, vtable.CSedonaSingleDocTemplate.0
mov qword [rsi], r11
jmp 0x1400217f4
mov rsi, r12
mov rdx, rsi
mov rcx, rdi
call fcn.140087d70
mov r8d, r13d
mov edx, 4
lea rsi, [0x1402fce90]
mov rcx, rsi
call fcn.14001e304
test eax, eax
jns 0x14002182a
lea rcx, [rsp + 0x60]
call fcn.140084be4
nop
jmp 0x140021721
cmp dword [rsp + 0x6c], r12d
jne 0x1400219b4
cmp dword [rsp + 0x70], r12d
jne 0x1400219b4
mov eax, dword [rsp + 0x78]
cmp eax, 7
jne 0x1400218b0
lea rax, str.APPID
mov qword [rbp - 0x40], rax
lea rax, str.F8F43C49_895D_4163_8784_03A735FCD286
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], r12
mov qword [rbp - 0x28], r12
lea r9, [rbp - 0x40]
xor r8d, r8d
lea edx, [r8 + 0x67]
mov rcx, qword [0x1402f1038]
call fcn.14000cc28
mov r11, qword [0x1402f1930]
test r11, r11
je 0x140021891
call r11
test eax, eax
js 0x1400218a0
xor r8d, r8d
mov edx, r13d
mov rcx, rsi
call fcn.14001fb28
nop
lea rcx, [rsp + 0x60]
call fcn.140084be4
nop
jmp 0x140021721
cmp eax, 6
jne 0x140021923
lea rax, str.APPID
mov qword [rbp - 0x40], rax
lea rax, str.F8F43C49_895D_4163_8784_03A735FCD286
mov qword [rbp - 0x38], rax
mov qword [rbp - 0x30], r12
mov qword [rbp - 0x28], r12
lea r9, [rbp - 0x40]
mov r8d, r13d
mov edx, 0x67
mov rcx, qword [0x1402f1038]
call fcn.14000cc28
xor r8d, r8d
mov edx, r13d
mov rcx, rsi
call fcn.14001fa68
test eax, eax
js 0x140021913
mov rax, qword [0x1402f1928]
test rax, rax
je 0x140021913
mov rcx, qword [0x1402fce38]
call rax
nop
lea rcx, [rsp + 0x60]
call fcn.140084be4
nop
jmp 0x140021721
mov rcx, rdi
cmp eax, r13d
jne 0x140021950
mov rax, qword [rdi]
xor r8d, r8d
mov rdx, qword [rbp - 0x80]
call qword [rax + 0x140]
test rax, rax
jne 0x14002196e
lea rcx, [rsp + 0x60]
call fcn.140084be4
nop
jmp 0x140021721
lea rdx, [rsp + 0x60]
call fcn.140087b60
test eax, eax
jne 0x14002196e
lea rcx, [rsp + 0x60]
call fcn.140084be4
nop
jmp 0x140021721
mov rcx, rdi
call fcn.14001f128
mov rcx, qword [rdi + 0x40]
mov rax, qword [rcx]
call qword [rax + 0x2d0]
mov r8, qword [rax]
lea rdx, [rbp - 0x40]
mov rcx, rax
call qword [r8 + 0x238]
mov rdx, rax
movzx r9d, r12w
xor r8d, r8d
mov rcx, rdi
call fcn.14001fe20
nop
lea rcx, [rsp + 0x60]
call fcn.140084be4
nop
jmp 0x1400219bf
lea rcx, [rsp + 0x60]
call fcn.140084be4
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r13d
mov rcx, qword [rbp + 0x1f0]
xor rcx, rsp
call fcn.1401bea40
lea r11, [rsp + 0x300]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rbp
ret