Function at 0x140021044
Capabilities:
Identify system language via api

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r13
push r14
lea rbp, [rax - 0x5c8]
sub rsp, 0x6a0
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x1402ef1f8]
xor rax, rsp
mov qword [rbp + 0x590], rax
mov rdi, rcx
mov r14d, 0x104
mov r13d, 1
xor r12d, r12d
cmp qword [rcx + 0x230], r12
jne 0x1400211a2
mov word [rsp + 0x20], r12w
mov dword [rsp + 0x24], r12d
xor r8d, r8d
lea rdx, [rsp + 0x24]
lea rcx, str.UserDefinedLocale
call fcn.140001570
test eax, eax
jne 0x1400210ea
lea rcx, [rsp + 0x20]
call fcn.140001614
test eax, eax
jne 0x1400210dc
call qword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov word [rsp + 0x20], ax
jmp 0x1400210e1
movzx eax, word [rsp + 0x20]
movzx ecx, ax
mov dword [rsp + 0x24], ecx
jmp 0x1400210ee
mov ecx, dword [rsp + 0x24]
call fcn.1400019b8
mov ebx, eax
movzx esi, ax
mov eax, 0x3ff
and si, ax
shr bx, 0xa
mov word [rsp + 0x60], r12w
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x62]
call fcn.1401bfd60
call fcn.1400678dc
mov r8d, r14d
lea rdx, [rsp + 0x60]
mov rcx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x140021167
lea ecx, [rax - 1]
movsxd rax, ecx
test ecx, ecx
js 0x140021167
cmp word [rsp + rax*2 + 0x60], 0x5c
je 0x14002115e
sub ecx, r13d
sub rax, r13
jns 0x14002114c
jmp 0x140021167
movsxd rax, ecx
mov word [rsp + rax*2 + 0x62], r12w
lea rdx, str.nvCplUIR.dll
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_lstrcatW]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [rdi + 0x230], rax
test rax, rax
je 0x14002119b
test si, si
jne 0x1400211a2
cmp bx, r13w
jne 0x1400211a2
xor al, al
jmp 0x1400214a0
call fcn.140069a9c
mov r11, rax
mov ecx, r12d
test rax, rax
setne cl
test ecx, ecx
jne 0x1400211c2
mov ecx, 0x80004005
call fcn.1400013b4
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x28], rax
lea rcx, [rsp + 0x28]
call fcn.140001d6c
call fcn.140069a9c
mov r11, rax
mov ecx, r12d
test rax, rax
setne cl
test ecx, ecx
jne 0x1400211fe
mov ecx, 0x80004005
call fcn.1400013b4
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x30]
call fcn.140001d6c
mov word [rbp + 0x170], r12w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x172]
call fcn.1401bfd60
mov r8d, r14d
lea rdx, [rbp + 0x170]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea r8, [rbp + 0x170]
mov rdx, r14
lea rcx, [rbp + 0x380]
call fcn.1401c0390
lea rcx, [rbp + 0x170]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea r8, [0x140225068]
mov rdx, r14
lea rcx, [rbp + 0x170]
call fcn.1401c0d1c
lea r8, str.nvCplUIR.dll
mov rdx, r14
lea rcx, [rbp + 0x170]
call fcn.1401c0d1c
lea r8, [0x140224cc8]
lea rdx, [rbp + 0x380]
lea rcx, [rsp + 0x40]
call fcn.14005a6b0
nop
mov rdx, rax
lea rcx, [rsp + 0x28]
call fcn.140002844
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or esi, 0xffffffff
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, esi
test eax, eax
jg 0x1400212e0
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea r8, [0x140224cc8]
lea rdx, [rbp + 0x170]
lea rcx, [rsp + 0x48]
call fcn.14005a6b0
nop
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.140002844
nop
mov rdx, qword [rsp + 0x48]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, esi
test eax, eax
jg 0x140021326
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
call fcn.140069a9c
mov r11, rax
mov ecx, r12d
test rax, rax
setne cl
test ecx, ecx
jne 0x140021346
mov ecx, 0x80004005
call fcn.1400013b4
int3
mov rax, qword [rax]
mov rcx, r11
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x38]
call fcn.140001d6c
mov rbx, qword [rsp + 0x30]
mov r9, rbx
mov r8, qword [rsp + 0x28]
lea rdx, str.___n___Client_version:__s__Resource_binary_version:__s
lea rcx, [rsp + 0x38]
call fcn.1400029ec
mov r11d, r12d
test rbx, rbx
setne r11b
test r11d, r11d
jne 0x14002139a
mov ecx, 0x80004005
call fcn.1400013b4
int3
mov rdx, rbx
mov rcx, qword [rsp + 0x28]
call fcn.1401c05a4
test eax, eax
je 0x14002141f
mov rcx, rdi
call fcn.14001f2b8
test eax, eax
jne 0x14002141f
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, esi
test eax, eax
jg 0x1400213d7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, esi
test eax, eax
jg 0x1400213f7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x28]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, esi
test eax, eax
jg 0x14002119b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x14002119b
mov rbx, qword [rdi + 0x230]
call fcn.1400678dc
mov qword [rax + 0x18], rbx
mov rax, qword [rdi + 0x230]
xchg qword [0x1402fdea0], rax
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, esi
test eax, eax
jg 0x14002145d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, esi
test eax, eax
jg 0x14002147d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rax, qword [rsp + 0x28]
lea rdx, [rax - 0x18]
mov ecx, esi
lock xadd dword [rdx + 0x10], ecx
add ecx, esi
test ecx, ecx
jg 0x14002149d
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov al, r13b
mov rcx, qword [rbp + 0x590]
xor rcx, rsp
call fcn.1401be840
lea r11, [rsp + 0x6a0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rbp
ret