Function at 0x140002008
Capabilities:
Query or enumerate registry key
Query or enumerate registry value
Set registry value

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r13
sub rsp, 0x270
mov rax, qword [0x140064270]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov rsi, rcx
mov rbx, rdx
lea rcx, [rsp + 0xb4]
xor edx, edx
mov r8d, 0x110
mov dword [rsp + 0xb0], 0x114
call fcn.140010930
lea rcx, [rsp + 0xb0]
call fcn.14000270c
xor ebp, ebp
cmp al, bpl
je 0x1400023b4
cmp dword [rsp + 0xb4], 5
jbe 0x1400023b4
lea r8d, [rbp + 0x62]
lea rcx, [rsp + 0x1f2]
xor edx, edx
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x68], rbp
mov qword [rsp + 0x70], rbp
mov word [rsp + 0x1f0], bp
call fcn.140010930
xor eax, eax
mov qword [rsp + 0x1d2], rax
mov qword [rsp + 0x1da], rax
mov word [rsp + 0x1e2], ax
lea rax, [rsp + 0x80]
lea rdx, str.SoftWareMicrosoftCTFSortOrderAssemblyItem0x00000804
mov r9d, 0xf003f
xor r8d, r8d
mov rcx, rbx
mov dword [rsp + 0x60], ebp
mov qword [rsp + 0x20], rax
mov word [rsp + 0x1d0], bp
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebp
jne 0x1400023b4
mov rcx, qword [rsp + 0x80]
lea r9d, [rbp + 0x32]
lea r8, [rsp + 0x1f0]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
cmp eax, ebp
jne 0x140002381
mov rcx, qword [rsp + 0x80]
lea rax, [rsp + 0x68]
lea rdx, [rsp + 0x1f0]
mov r9d, 0xf003f
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebp
jne 0x140002381
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x38], rbp
lea rax, [rsp + 0x60]
mov qword [rsp + 0x30], rbp
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x28], rbp
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
cmp eax, ebp
jne 0x140002381
mov r8d, dword [rsp + 0x60]
mov bl, bpl
mov edi, ebp
lea r13d, [rbp + 1]
cmp r8d, ebp
jbe 0x140002289
lea rdx, str._08x
lea rcx, [rsp + 0x1d0]
mov r8d, edi
call fcn.140003580
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x90]
lea rdx, [rsp + 0x1d0]
mov r9d, 0xf003f
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x90], rbp
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebp
jne 0x14000225c
mov rcx, qword [rsp + 0x90]
lea rax, [rsp + 0x88]
lea r9, [rsp + 0x9c]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x78]
lea rdx, str.KeyboardLayout
xor r8d, r8d
mov dword [rsp + 0x9c], 4
mov dword [rsp + 0x78], ebp
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x88], 4
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebp
jne 0x14000225c
cmp dword [rsp + 0x78], esi
movzx ebx, bl
cmove ebx, r13d
mov rcx, qword [rsp + 0x90]
cmp rcx, rbp
je 0x14000226f
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp bl, bpl
jne 0x140002381
mov r8d, dword [rsp + 0x60]
add edi, r13d
cmp edi, r8d
jb 0x1400021b0
lea rdx, str._08x
lea rcx, [rsp + 0x1d0]
call fcn.140003580
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x98]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0x70]
lea rdx, [rsp + 0x1d0]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rbp
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x28], 0xf003f
mov dword [rsp + 0x98], ebp
mov dword [rsp + 0x20], ebp
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, ebp
jne 0x140002381
lea rbx, str.00000000_0000_0000_0000_000000000000
mov rcx, rbx
call fcn.1400108d4
mov rcx, qword [rsp + 0x70]
lea rdx, [0x14004a630]
add eax, eax
mov r9d, r13d
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, rbx
call fcn.1400108d4
mov rcx, qword [rsp + 0x70]
lea rdx, str.Profile
add eax, eax
mov r9d, r13d
xor r8d, r8d
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0xa0]
lea rdx, str.KeyboardLayout
mov r9d, 4
xor r8d, r8d
mov dword [rsp + 0x28], 4
mov qword [rsp + 0x20], rax
mov dword [rsp + 0xa0], esi
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x80]
cmp rcx, rbp
je 0x140002394
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x68]
cmp rcx, rbp
je 0x1400023a4
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x70]
cmp rcx, rbp
je 0x1400023b4
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.14000fd20
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop rdi
pop rsi
ret