Function at 0x405530
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
sub rsp, 0xf58
mov rax, qword [0x0042a560]
xor rax, rsp
mov qword [rsp + 0xf10], rax
mov qword [r11 - 0x18], r12
mov qword [r11 - 0x20], r13
mov qword [r11 - 0x28], r14
mov r14, rcx
mov r13, rdx
lea rcx, [r11 - 0x886]
mov r8d, 0x206
xor edx, edx
mov qword [r11 - 0x30], r15
mov word [rsp + 0x6d0], 0
call fcn.0040e3f0
lea rcx, [rsp + 0x2b2]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x2b0], 0
call fcn.0040e3f0
lea r8, str.Keyboard_LayoutPreload
lea rdx, [0x00421b28]
lea rcx, [rsp + 0x6d0]
call fcn.0040e620
lea r8, str.SystemCurrentControlSetControlKeyboard_Layouts_
lea rdx, [0x00421b28]
lea rcx, [rsp + 0x2b0]
call fcn.0040e620
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 0x405994
mov qword [rsp + 0xf78], rbp
mov qword [rsp + 0xf70], rbx
mov qword [rsp + 0xf50], rsi
mov qword [rsp + 0xf48], rdi
mov ebp, r15d
lea rcx, [rsp + 0xd02]
xor edx, edx
mov r8d, 0x206
add ebp, 1
mov word [rsp + 0xd00], r15w
call fcn.0040e3f0
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.0040e3f0
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 0x405969
lea rcx, [rsp + 0xaf2]
xor edx, edx
mov r8d, 0x206
add r12d, 1
mov word [rsp + 0xaf0], r15w
call fcn.0040e3f0
lea r9, [rsp + 0xa0]
lea r8, [rsp + 0x2b0]
lea rdx, str._s_s
lea rcx, [rsp + 0xaf0]
call fcn.0040e620
lea r8, [rsp + 0x58]
lea rdx, [rsp + 0xaf0]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x40595d
lea rcx, [rsp + 0x8e2]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x8e0], r15w
call fcn.0040e3f0
lea rcx, [rsp + 0x4c2]
xor edx, edx
mov r8d, 0x206
mov dword [rsp + 0x48], 0x104
mov word [rsp + 0x4c0], r15w
call fcn.0040e3f0
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.0040fad0
mov 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 0x40582b
mov rdi, r13
mov rcx, rsi
sub rdi, rsi
nop
nop
movzx edx, word [rcx]
movzx eax, word [rcx + rdi]
sub edx, eax
jne 0x405823
add rcx, 2
test eax, eax
jne 0x405810
test edx, edx
je 0x40595d
mov ecx, pe_nt_image_headers64
call fcn.0040ede0
lea r8, [rsp + 0xa0]
lea rdx, [0x00421b28]
mov rcx, rax
mov rbx, rax
mov qword [rsp + 0x68], rax
call fcn.0040e620
lea rcx, [rbx + 0x8c]
lea r8, [rsp + 0x8e0]
lea rdx, [0x00421b28]
call fcn.0040e620
lea rcx, [rbx + 0x28]
lea rdx, [0x00421b28]
mov r8, rsi
call fcn.0040e620
mov rdi, qword [r14 + 0x48]
mov rdx, qword [rdi + 8]
test rdx, rdx
jne 0x405894
mov rcx, r15
jmp 0x40589f
mov rcx, qword [rdi + 0x10]
sub rcx, rdx
sar rcx, 3
test rdx, rdx
je 0x4058c9
mov rax, qword [rdi + 0x18]
sub rax, rdx
sar rax, 3
cmp rcx, rax
jae 0x4058c9
mov rax, qword [rdi + 0x10]
add rax, 8
mov qword [rax - 8], rbx
mov qword [rdi + 0x10], rax
jmp 0x40595d
mov rbx, qword [rdi + 0x10]
cmp rdx, rbx
jbe 0x4058d7
call fcn.0040ed00
mov rsi, qword [rdi + 8]
mov qword [rsp + 0x70], rdi
mov qword [rsp + 0x78], rbx
test rsi, rsi
je 0x40590d
mov rcx, qword [rdi + 0x10]
mov rax, rcx
sub rax, rsi
sar rax, 3
je 0x40590d
cmp rsi, rcx
jbe 0x405904
call fcn.0040ed00
sub rbx, rsi
sar rbx, 3
jmp 0x405910
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.00404fd0
mov rsi, qword [rdi + 8]
cmp rsi, qword [rdi + 0x10]
jbe 0x405948
call fcn.0040ed00
lea rax, [rsi + rbx*8]
cmp rax, qword [rdi + 0x10]
ja 0x405958
cmp rax, qword [rdi + 8]
jae 0x40595d
call fcn.0040ed00
cmp ebp, 0x2710
jl 0x405620
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, qword [rsp + 0xf48]
mov rsi, qword [rsp + 0xf50]
mov rbp, qword [rsp + 0xf78]
mov rbx, qword [rsp + 0xf70]
mov r15, qword [rsp + 0xf28]
mov r14, qword [rsp + 0xf30]
mov r13, qword [rsp + 0xf38]
mov r12, qword [rsp + 0xf40]
mov rcx, qword [rsp + 0xf10]
xor rcx, rsp
call fcn.0040e5d0
add rsp, 0xf58
ret