Function at 0x1400224a0
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x190]
sub rsp, 0x290
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov rax, qword [0x14016ca00]
xor rax, rsp
mov qword [rbp + 0x180], rax
mov rbx, r8
mov rsi, rdx
mov rdi, rcx
cmp qword [r8 + 0x10], 0
jne 0x1400224e7
xor al, al
jmp 0x140022758
call fcn.14002ab40
mov rdx, rsi
mov rcx, rdi
call fcn.14002b3e0
test eax, eax
je 0x1400224e0
mov qword [rsp + 0x60], 7
xor edi, edi
mov qword [rsp + 0x58], rdi
mov word [rsp + 0x48], di
mov r9d, eax
lea r8, str.SystemCurrentControlSetControlKeyboard_Layouts
lea rdx, str._s_08X
lea rcx, [rsp + 0x48]
call fcn.140061ab0
mov qword [rsp + 0x38], rdi
lea rdx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rdx, qword [rsp + 0x48]
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r9d, 0xf003f
xor r8d, r8d
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x14002261a
mov ecx, 0x800
call fcn.1400bbc88
mov rdi, rax
mov ecx, 0x800
call fcn.1400bbc88
mov rbx, rax
test rdi, rdi
je 0x140022605
test rax, rax
je 0x1400225fd
xor edx, edx
mov r8d, 0x800
mov rcx, rdi
call fcn.1400c2130
lea rax, [0x140125cd8]
mov qword [rsp + 0x20], rax
lea r9, str.RC::RCInputImeInstaller::UpdateImeDisplayText
lea r8, str._s__:__s
mov edx, 0x400
mov rcx, rdi
call fcn.140007140
xor edx, edx
mov r8d, 0x800
mov rcx, rbx
call fcn.1400c2130
lea r9, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae r9, qword [rsp + 0x48]
mov r8, rdi
mov edx, 0x400
mov rcx, rbx
call fcn.140007140
mov rcx, rbx
call fcn.140015100
mov rcx, rdi
call fcn.1400bd2dc
test rbx, rbx
je 0x140022612
mov rcx, rbx
call fcn.1400bd2dc
xor sil, sil
jmp 0x140022742
xor sil, sil
mov word [rsp + 0x70], di
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x72]
call fcn.1400c2130
mov dword [rsp + 0x30], 0x206
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.Layout_Text
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
or r14, 0xffffffffffffffff
cmp word [rsp + 0x70], 0
jne 0x140022679
mov rcx, rdi
jmp 0x14002268b
lea rax, [rsp + 0x70]
mov rcx, r14
inc rcx
cmp word [rax + rcx*2], 0
jne 0x140022681
mov r10, qword [rbx + 0x10]
mov r11, qword [rbx + 0x18]
cmp r11, 8
jb 0x14002269e
mov rdx, qword [rbx]
jmp 0x1400226a1
mov rdx, rbx
mov r9, rcx
cmp r10, rcx
cmovb r9, r10
test r9, r9
je 0x1400226dc
lea r8, [rsp + 0x70]
movzx eax, word [r8]
cmp word [rdx], ax
jne 0x1400226cd
add rdx, 2
add r8, 2
dec r9
jne 0x1400226b5
jmp 0x1400226dc
mov r9d, 1
cmp word [rdx], ax
cmovb r9d, r14d
jmp 0x1400226df
mov r9d, edi
movsxd rax, r9d
test r9d, r9d
jne 0x1400226f7
cmp r10, rcx
jae 0x1400226f1
mov eax, r14d
jmp 0x1400226f7
setne dil
mov eax, edi
test eax, eax
je 0x140022736
lea eax, [r10 + r10]
mov dword [rsp + 0x30], eax
cmp r11, 8
jb 0x14002270c
mov rbx, qword [rbx]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov r9d, 1
xor r8d, r8d
lea rdx, str.Layout_Text
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
sete sil
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
cmp qword [rsp + 0x60], 8
jb 0x140022754
mov rcx, qword [rsp + 0x48]
call fcn.1400bd20c
movzx eax, sil
mov rcx, qword [rbp + 0x180]
xor rcx, rsp
call fcn.1400bcae0
add rsp, 0x290
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret