Function at 0x140021990
Capabilities:
Get system information on windows
Identify system language via api
Query or enumerate registry value

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
sub rsp, 0x80
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov rbp, rcx
xor r12d, r12d
mov dword [rsp + 0x50], r12d
xor edx, edx
lea r8d, [r12 + 0x2c]
lea rcx, [rsp + 0x54]
call fcn.1400758d0
call fcn.1400472fc
mov rcx, rax
mov edx, r12d
test rax, rax
setne dl
test edx, edx
jne 0x1400219e3
mov ecx, 0x80004005
call fcn.140010c90
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x30], rax
lea rdx, [0x1400a5bd0]
or rbx, 0xffffffffffffffff
test rdx, 0xffffffffffff0000
jne 0x140021a27
movzx edi, dx
mov ecx, edi
call fcn.140047108
test rax, rax
je 0x140021a44
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.140010410
jmp 0x140021a44
xor eax, eax
mov rcx, rbx
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x30]
call fcn.1400109b0
nop
mov qword [rsp + 0x48], r12
mov dword [rsp + 0xb8], r12d
mov word [rbp + 0xe], 0x409
call qword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx edx, ax
test ax, ax
je 0x140021b1c
mov r8w, 0x409
mov eax, r12d
movzx r9d, dx
and r9w, 0x3ff
lea r10, [0x1400cc838]
mov rdi, r10
nop
nop
nop
movzx ecx, word [rdi]
and cx, 0x3ff
cmp r9w, cx
je 0x140021aac
add eax, 1
add rdi, 0x10
cmp eax, 0x21
jb 0x140021a90
jmp 0x140021ab7
cdqe
shl rax, 4
mov r8w, word [rax + r10]
mov ax, dx
and eax, 0x3ff
cmp eax, 4
je 0x140021afd
cmp eax, 0x16
je 0x140021ae1
cmp eax, 0x1a
jne 0x140021b17
and dx, 0xfc00
cmp dx, 0x800
jne 0x140021b17
mov r8w, 0x81a
jmp 0x140021b17
and dx, 0xfc00
mov eax, 0x416
mov r8d, 0x816
cmp dx, 0x400
cmove r8w, ax
jmp 0x140021b17
and dx, 0xfc00
mov ecx, 0x804
mov r8d, 0x404
cmp dx, 0x800
cmove r8w, cx
mov word [rbp + 0xe], r8w
movzx eax, word [rbp + 0xe]
mov word [rbp + 0xc], ax
mov dword [rbp + 8], 1
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp word [rsp + 0x50], 9
jne 0x140021b67
xor eax, eax
mov rcx, rbx
lea rdi, str.SOFTWARERealtekRAVCpl64General
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, str.SOFTWARERealtekRAVCpl64General
lea rcx, [rsp + 0x30]
call fcn.1400109b0
jmp 0x140021b8e
xor eax, eax
mov rcx, rbx
lea rdi, str.SOFTWARERealtekRtHDVCplGeneral
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, str.SOFTWARERealtekRtHDVCplGeneral
lea rcx, [rsp + 0x30]
call fcn.1400109b0
mov qword [rsp + 0x38], r12
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 0x20019
xor r8d, r8d
mov rdi, qword [rsp + 0x30]
mov rdx, rdi
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140021bdf
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], ebx
add ebx, 0xffffffff
test ebx, ebx
jg 0x140021bd8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140021caa
mov dword [rsp + 0xc0], 4
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0xc8]
xor r8d, r8d
lea rdx, str.Language
mov rsi, qword [rsp + 0x38]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140021c80
cmp dword [rsp + 0xc8], 4
jne 0x140021c80
mov eax, dword [rsp + 0xb8]
test ax, ax
je 0x140021c51
movzx edx, ax
mov rcx, rbp
call fcn.140021d20
mov word [rbp + 0xc], ax
mov dword [rbp + 8], r12d
test rsi, rsi
je 0x140021c60
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], ebx
add ebx, 0xffffffff
test ebx, ebx
jg 0x140021c79
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov eax, 1
jmp 0x140021caa
test rsi, rsi
je 0x140021c8f
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], ebx
add ebx, 0xffffffff
test ebx, ebx
jg 0x140021ca8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
add rsp, 0x80
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret