Function at 0x140021554
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.14001e208
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 0x14002160b
xor eax, eax
jmp 0x140021a24
lea rcx, [rsp + 0x60]
call fcn.14001e690
nop
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.140083ca4
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.1401c00ac
lea r8, str.nvCpl.cpl
mov edx, esi
lea rcx, [rbp - 0x20]
call fcn.1401c00ac
lea rcx, [rbp - 0x20]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1400216da
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 0x1400216da
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.140001194
test eax, eax
jne 0x14002171d
lea rcx, [rsp + 0x54]
call fcn.140001238
test eax, eax
jne 0x140021713
call qword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
jmp 0x140021718
movzx eax, word [rsp + 0x54]
movzx ecx, ax
jmp 0x140021721
mov ecx, dword [rsp + 0x50]
call fcn.1400015dc
mov esi, eax
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetThreadLocale]
call fcn.140055fcc
test eax, eax
je 0x140021742
movzx ecx, si
call qword [sym.imp.KERNEL32.dll_SetThreadUILanguage]
mov rcx, rdi
call fcn.140020488
test al, al
jne 0x140021755
mov dword [rdi + 0x240], r12d
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.1400214d8
test al, al
jne 0x140021788
lea rcx, [rsp + 0x60]
call fcn.140084b38
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140021604
call qword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.140089a34
call fcn.140011f58
mov rcx, rdi
call fcn.1400855c8
call fcn.140089898
test eax, eax
jne 0x1400217c5
or r8d, 0xffffffff
xor edx, edx
lea ecx, [rax + 0x64]
call fcn.14005ebf0
nop
lea rcx, [rsp + 0x60]
call fcn.140084b38
nop
jmp 0x140021771
call fcn.14006b870
mov rcx, qword [rax + 0x80]
mov qword [rcx + 0x48], r12
xor ecx, ecx
call fcn.140088fa8
lea rdx, [0x14022b4f8]
mov rcx, rdi
call fcn.140086fcc
mov edx, 7
mov rcx, rdi
call fcn.140083bf4
mov ecx, 0xf8
call fcn.14005a5d8
mov rsi, rax
mov qword [rbp - 0x40], rax
test rax, rax
je 0x140021841
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.140085af8
lea r11, vtable.CSedonaSingleDocTemplate.0
mov qword [rsi], r11
jmp 0x140021844
mov rsi, r12
mov rdx, rsi
mov rcx, rdi
call fcn.140087cc4
mov r8d, r13d
mov edx, 4
lea rsi, [0x1402fce90]
mov rcx, rsi
call fcn.14001e354
test eax, eax
jns 0x14002187a
lea rcx, [rsp + 0x60]
call fcn.140084b38
nop
jmp 0x140021771
cmp dword [rsp + 0x6c], r12d
jne 0x140021a04
cmp dword [rsp + 0x70], r12d
jne 0x140021a04
mov eax, dword [rsp + 0x78]
cmp eax, 7
jne 0x140021900
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.14000cbcc
mov r11, qword [0x1402f1930]
test r11, r11
je 0x1400218e1
call r11
test eax, eax
js 0x1400218f0
xor r8d, r8d
mov edx, r13d
mov rcx, rsi
call fcn.14001fb78
nop
lea rcx, [rsp + 0x60]
call fcn.140084b38
nop
jmp 0x140021771
cmp eax, 6
jne 0x140021973
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.14000cbcc
xor r8d, r8d
mov edx, r13d
mov rcx, rsi
call fcn.14001fab8
test eax, eax
js 0x140021963
mov rax, qword [0x1402f1928]
test rax, rax
je 0x140021963
mov rcx, qword [0x1402fce38]
call rax
nop
lea rcx, [rsp + 0x60]
call fcn.140084b38
nop
jmp 0x140021771
mov rcx, rdi
cmp eax, r13d
jne 0x1400219a0
mov rax, qword [rdi]
xor r8d, r8d
mov rdx, qword [rbp - 0x80]
call qword [rax + 0x140]
test rax, rax
jne 0x1400219be
lea rcx, [rsp + 0x60]
call fcn.140084b38
nop
jmp 0x140021771
lea rdx, [rsp + 0x60]
call fcn.140087ab4
test eax, eax
jne 0x1400219be
lea rcx, [rsp + 0x60]
call fcn.140084b38
nop
jmp 0x140021771
mov rcx, rdi
call fcn.14001f178
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.14001fe70
nop
lea rcx, [rsp + 0x60]
call fcn.140084b38
nop
jmp 0x140021a0f
lea rcx, [rsp + 0x60]
call fcn.140084b38
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.1401be9b0
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