Function at 0x140022110
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 [0x1402ef1f8]
xor rax, rsp
mov qword [rbp + 0x1f0], rax
mov rdi, rcx
xor r12d, r12d
mov qword [0x1402f2460], r12
mov qword [0x1402f2450], r12
lea r13d, [r12 + 1]
mov qword [0x1402f2468], r13
lea rax, [0x1402227b0]
mov qword [0x1402f2470], rax
lea rax, [0x1402f2450]
mov qword [0x1402e40b0], rax
lea rcx, str.NVCPLUI.EXE
call fcn.14001ee10
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 0x1400221c7
xor eax, eax
jmp 0x1400225e0
lea rcx, [rsp + 0x60]
call fcn.14001f290
nop
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.1400847c0
mov esi, 0x104
mov edx, esi
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea r8, [0x14022ca44]
mov edx, esi
lea rcx, [rbp - 0x20]
call fcn.1401c0d1c
lea r8, str.nvCpl.cpl
mov edx, esi
lea rcx, [rbp - 0x20]
call fcn.1401c0d1c
lea rcx, [rbp - 0x20]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140022296
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 0x140022296
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.140001570
test eax, eax
jne 0x1400222d9
lea rcx, [rsp + 0x54]
call fcn.140001614
test eax, eax
jne 0x1400222cf
call qword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
jmp 0x1400222d4
movzx eax, word [rsp + 0x54]
movzx ecx, ax
jmp 0x1400222dd
mov ecx, dword [rsp + 0x50]
call fcn.1400019b8
mov esi, eax
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetThreadLocale]
call fcn.14005699c
test eax, eax
je 0x1400222fe
movzx ecx, si
call qword [sym.imp.KERNEL32.dll_SetThreadUILanguage]
mov rcx, rdi
call fcn.140021044
test al, al
jne 0x140022311
mov dword [rdi + 0x240], r12d
lea rdx, [rsp + 0x60]
mov rcx, rdi
call fcn.140022094
test al, al
jne 0x140022344
lea rcx, [rsp + 0x60]
call fcn.140085654
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400221c0
call qword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.14008a590
call fcn.140012bbc
mov rcx, rdi
call fcn.140086114
call fcn.14008a3f4
test eax, eax
jne 0x140022381
or r8d, 0xffffffff
xor edx, edx
lea ecx, [rax + 0x64]
call fcn.14006a448
nop
lea rcx, [rsp + 0x60]
call fcn.140085654
nop
jmp 0x14002232d
call fcn.14006d538
mov rcx, qword [rax + 0x80]
mov qword [rcx + 0x48], r12
xor ecx, ecx
call fcn.140089b04
lea rdx, [0x14022c968]
mov rcx, rdi
call fcn.140087b28
mov edx, 7
mov rcx, rdi
call fcn.140084710
mov ecx, 0xf8
call fcn.14005b2a8
mov rsi, rax
mov qword [rbp - 0x40], rax
test rax, rax
je 0x1400223fd
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.140086644
lea r11, vtable.CSedonaSingleDocTemplate.0
mov qword [rsi], r11
jmp 0x140022400
mov rsi, r12
mov rdx, rsi
mov rcx, rdi
call fcn.140088820
mov r8d, r13d
mov edx, 4
lea rsi, [0x1402fdef0]
mov rcx, rsi
call fcn.14001ef5c
test eax, eax
jns 0x140022436
lea rcx, [rsp + 0x60]
call fcn.140085654
nop
jmp 0x14002232d
cmp dword [rsp + 0x6c], r12d
jne 0x1400225c0
cmp dword [rsp + 0x70], r12d
jne 0x1400225c0
mov eax, dword [rsp + 0x78]
cmp eax, 7
jne 0x1400224bc
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 [0x1402f2078]
call fcn.14000d838
mov r11, qword [0x1402f2970]
test r11, r11
je 0x14002249d
call r11
test eax, eax
js 0x1400224ac
xor r8d, r8d
mov edx, r13d
mov rcx, rsi
call fcn.140020718
nop
lea rcx, [rsp + 0x60]
call fcn.140085654
nop
jmp 0x14002232d
cmp eax, 6
jne 0x14002252f
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 [0x1402f2078]
call fcn.14000d838
xor r8d, r8d
mov edx, r13d
mov rcx, rsi
call fcn.140020658
test eax, eax
js 0x14002251f
mov rax, qword [0x1402f2968]
test rax, rax
je 0x14002251f
mov rcx, qword [0x1402fde98]
call rax
nop
lea rcx, [rsp + 0x60]
call fcn.140085654
nop
jmp 0x14002232d
mov rcx, rdi
cmp eax, r13d
jne 0x14002255c
mov rax, qword [rdi]
xor r8d, r8d
mov rdx, qword [rbp - 0x80]
call qword [rax + 0x140]
test rax, rax
jne 0x14002257a
lea rcx, [rsp + 0x60]
call fcn.140085654
nop
jmp 0x14002232d
lea rdx, [rsp + 0x60]
call fcn.140088610
test eax, eax
jne 0x14002257a
lea rcx, [rsp + 0x60]
call fcn.140085654
nop
jmp 0x14002232d
mov rcx, rdi
call fcn.14001fd48
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.140020a10
nop
lea rcx, [rsp + 0x60]
call fcn.140085654
nop
jmp 0x1400225cb
lea rcx, [rsp + 0x60]
call fcn.140085654
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.1401be840
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