Function at 0x140007660
Capabilities:
Query or enumerate registry value

Disassembly:
push r12
push r13
push r14
push r15
sub rsp, 0xf28
mov rax, qword [0x140039680]
xor rax, rsp
mov qword [rsp + 0xf10], rax
mov r14, rcx
mov r13, rdx
lea rcx, [rsp + 0x6d2]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x6d0], 0
call fcn.140011ab0
lea rcx, [rsp + 0x2b2]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x2b0], 0
call fcn.140011ab0
lea r8, str.Keyboard_LayoutPreload
lea rdx, [0x14002efd8]
lea rcx, [rsp + 0x6d0]
call fcn.140011ce0
lea r8, str.SystemCurrentControlSetControlKeyboard_Layouts_
lea rdx, [0x14002efd8]
lea rcx, [rsp + 0x2b0]
call fcn.140011ce0
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x6d0]
xor r15d, r15d
mov rcx, 0xffffffff80000001
mov r12d, r15d
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x140007ac4
mov qword [rsp + 0xf60], rbp
mov qword [rsp + 0xf20], rdi
mov qword [rsp + 0xf58], rbx
mov qword [rsp + 0xf68], rsi
mov ebp, r15d
nop
nop
nop
lea rcx, [rsp + 0xd02]
xor edx, edx
mov r8d, 0x206
add ebp, 1
mov word [rsp + 0xd00], r15w
call fcn.140011ab0
lea rcx, [rsp + 0xa2]
xor edx, edx
mov r8d, 0x206
mov dword [rsp + 0x40], 1
mov dword [rsp + 0x50], 0x104
mov word [rsp + 0xa0], r15w
call fcn.140011ab0
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x4c]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0xa0]
lea r9, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
lea r8, [rsp + 0xd00]
mov qword [rsp + 0x28], rax
mov edx, r12d
mov dword [rsp + 0x4c], 0x104
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x140007a99
lea rcx, [rsp + 0xaf2]
xor edx, edx
mov r8d, 0x206
add r12d, 1
mov word [rsp + 0xaf0], r15w
call fcn.140011ab0
lea r9, [rsp + 0xa0]
lea r8, [rsp + 0x2b0]
lea rdx, str._s_s
lea rcx, [rsp + 0xaf0]
call fcn.140011ce0
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0xaf0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x140007a8d
lea rcx, [rsp + 0x8e2]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x8e0], r15w
call fcn.140011ab0
lea rcx, [rsp + 0x4c2]
xor edx, edx
mov r8d, 0x206
mov dword [rsp + 0x48], 0x104
mov word [rsp + 0x4c0], r15w
call fcn.140011ab0
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x48]
lea r9, [rsp + 0x40]
lea rdx, str.Layout_text
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x8e0]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x44], 0x104
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x58]
lea rdx, [rsp + 0x44]
lea rax, [rsp + 0x4c0]
mov qword [rsp + 0x28], rdx
lea r9, [rsp + 0x40]
lea rdx, str.Ime_File
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea rcx, [rsp + 0x4c0]
call fcn.140013190
or rcx, 0xffffffffffffffff
mov rdi, r13
mov rsi, rax
xor eax, eax
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
test ecx, ecx
je 0x14000795b
mov rdi, r13
mov rcx, rsi
sub rdi, rsi
nop
nop
nop
movzx edx, word [rcx]
movzx eax, word [rcx + rdi]
sub edx, eax
jne 0x140007953
add rcx, 2
test eax, eax
jne 0x140007940
test edx, edx
je 0x140007a8d
mov ecx, pe_nt_image_headers64
call fcn.140012470
lea r8, [rsp + 0xa0]
lea rdx, [0x14002efd8]
mov rcx, rax
mov rbx, rax
mov qword [rsp + 0x68], rax
call fcn.140011ce0
lea rcx, [rbx + 0x8c]
lea r8, [rsp + 0x8e0]
lea rdx, [0x14002efd8]
call fcn.140011ce0
lea rcx, [rbx + 0x28]
lea rdx, [0x14002efd8]
mov r8, rsi
call fcn.140011ce0
mov rdi, qword [r14 + 0x48]
mov rdx, qword [rdi + 8]
test rdx, rdx
jne 0x1400079c4
mov rcx, r15
jmp 0x1400079cf
mov rcx, qword [rdi + 0x10]
sub rcx, rdx
sar rcx, 3
test rdx, rdx
je 0x1400079f9
mov rax, qword [rdi + 0x18]
sub rax, rdx
sar rax, 3
cmp rcx, rax
jae 0x1400079f9
mov rax, qword [rdi + 0x10]
add rax, 8
mov qword [rax - 8], rbx
mov qword [rdi + 0x10], rax
jmp 0x140007a8d
mov rbx, qword [rdi + 0x10]
cmp rdx, rbx
jbe 0x140007a07
call fcn.140012380
mov rsi, qword [rdi + 8]
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x78], rbx
test rsi, rsi
je 0x140007a3d
mov rcx, qword [rdi + 0x10]
mov rax, rcx
sub rax, rsi
sar rax, 3
je 0x140007a3d
cmp rsi, rcx
jbe 0x140007a34
call fcn.140012380
sub rbx, rsi
sar rbx, 3
jmp 0x140007a40
mov rbx, r15
movaps xmm0, xmmword [rsp + 0x70]
lea r9, [rsp + 0x68]
lea rdx, [rsp + 0x90]
mov r8d, 1
mov rcx, rdi
movdqa xmmword [rsp + 0x90], xmm0
call fcn.140007140
mov rsi, qword [rdi + 8]
cmp rsi, qword [rdi + 0x10]
jbe 0x140007a78
call fcn.140012380
lea rax, [rsi + rbx*8]
cmp rax, qword [rdi + 0x10]
ja 0x140007a88
cmp rax, qword [rdi + 8]
jae 0x140007a8d
call fcn.140012380
cmp ebp, 0x2710
jl 0x140007750
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, qword [rsp + 0xf20]
mov rsi, qword [rsp + 0xf68]
mov rbp, qword [rsp + 0xf60]
mov rbx, qword [rsp + 0xf58]
mov rcx, qword [rsp + 0xf10]
xor rcx, rsp
call fcn.140011c90
add rsp, 0xf28
pop r15
pop r14
pop r13
pop r12
ret