Function at 0x18007d078
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push rbp
push rdi
push r14
lea rbp, [rsp - 0x350]
sub rsp, 0x450
mov rax, qword [0x1800a98a0]
xor rax, rsp
mov qword [rbp + 0x330], rax
mov r14, rcx
lea rdx, str.RegistryMachineSystemCurrentControlSetControlKeyboard_Layouts_
xor edi, edi
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x30], edi
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rax, [rsp + 0x60]
mov dword [rsp + 0x70], 0x30
xorps xmm0, xmm0
mov qword [rbp - 0x80], rax
lea r8, [rsp + 0x70]
mov qword [rsp + 0x78], rdi
mov edx, 0x20019
mov dword [rbp - 0x78], 0x40
lea rcx, [rsp + 0x38]
movdqu xmmword [rbp - 0x70], xmm0
call qword [sym.imp.ntdll.dll_NtOpenKey]
test eax, eax
js 0x18007d329
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x1c0]
mov qword [rsp + 0x480], rsi
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], 0x2a
mov esi, edi
call qword [sym.imp.ntdll.dll_NtEnumerateKey]
test eax, eax
js 0x18007d30c
mov qword [rsp + 0x448], r12
mov r12d, 0xe000
mov qword [rsp + 0x440], r15
mov r15d, 0xf000
mov qword [rsp + 0x478], rbx
lea rax, [rbp + 0x1d0]
mov edx, 0x10
mov qword [rsp + 0x50], rax
lea r8, [rsp + 0x30]
mov rax, qword [rbp + 0x1cc]
lea rcx, [rsp + 0x48]
mov word [rsp + 0x48], ax
mov word [rsp + 0x4a], ax
call qword [sym.imp.ntdll.dll_RtlUnicodeStringToInteger]
mov eax, dword [rsp + 0x30]
shr eax, 0x10
and ax, r15w
cmp ax, r12w
jne 0x18007d2ba
lea r8, str.RegistryMachineSystemCurrentControlSetControlKeyboard_Layouts_
mov edx, 0x9a
lea rax, [rbp + 0x1f0]
sub r8, rax
lea rcx, [rbp + 0x1f0]
lea rax, [rdx + 0x7fffff64]
test rax, rax
je 0x18007d1e0
movzx eax, word [r8 + rcx]
test ax, ax
je 0x18007d1e0
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x18007d1bd
movzx r9d, word [rsp + 0x48]
lea rax, [rcx - 2]
mov r8, qword [rsp + 0x50]
test rdx, rdx
cmovne rax, rcx
lea rcx, [rbp + 0x1f0]
mov word [rax], di
call fcn.18007d838
lea rdx, [rbp + 0x1f0]
lea rcx, [rsp + 0x60]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
lea rax, [rsp + 0x60]
mov dword [rsp + 0x70], 0x30
xorps xmm0, xmm0
mov qword [rbp - 0x80], rax
lea r8, [rsp + 0x70]
mov qword [rsp + 0x78], rdi
mov edx, 0x20019
mov dword [rbp - 0x78], 0x40
lea rcx, [rsp + 0x40]
movdqu xmmword [rbp - 0x70], xmm0
call qword [sym.imp.ntdll.dll_NtOpenKey]
test eax, eax
js 0x18007d2ba
lea rdx, str.IME_file
lea rcx, [rbp - 0x60]
call qword [sym.imp.ntdll.dll_RtlInitUnicodeString]
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
lea r9, [rbp - 0x50]
mov r8d, 2
mov dword [rsp + 0x20], 0x210
lea rdx, [rbp - 0x60]
call qword [sym.imp.ntdll.dll_NtQueryValueKey]
mov rcx, qword [rsp + 0x40]
mov ebx, eax
call qword [sym.imp.ntdll.dll_NtClose]
test ebx, ebx
js 0x18007d2ba
mov rdx, r14
mov word [rbp + 0x1ba], di
lea rcx, [rbp - 0x44]
call qword [sym.imp.api_ms_win_core_string_obsolete_l1_1_0.dll_lstrcmpiW]
test eax, eax
je 0x18007d2ef
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea r9, [rbp + 0x1c0]
inc esi
mov dword [rsp + 0x20], 0x2a
mov edx, esi
xor r8d, r8d
call qword [sym.imp.ntdll.dll_NtEnumerateKey]
test eax, eax
jns 0x18007d159
jmp 0x18007d2f4
mov edi, 1
mov rbx, qword [rsp + 0x478]
mov r12, qword [rsp + 0x448]
mov r15, qword [rsp + 0x440]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ntdll.dll_NtClose]
mov rsi, qword [rsp + 0x480]
test edi, edi
je 0x18007d329
mov eax, dword [rsp + 0x30]
jmp 0x18007d32b
xor eax, eax
mov rcx, qword [rbp + 0x330]
xor rcx, rsp
call fcn.180033470
add rsp, 0x450
pop r14
pop rdi
pop rbp
ret