Function at 0x140066524
Capabilities:
Contain obfuscated stackstrings
Get keyboard layout
Query or enumerate registry value

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x7b8]
sub rsp, 0x890
mov rax, qword [0x14010a068]
xor rax, rsp
mov qword [rbp + 0x780], rax
call qword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx ecx, ax
call fcn.1400672c0
xor edi, edi
lea rcx, [0x140000000]
lea r13d, [rdi + 0x13]
cmp eax, r13d
jae 0x140066588
cdqe
movzx r15d, word [rcx + rax*2 + 0xf3eb0]
jmp 0x14006658b
mov r15d, edi
lea rcx, [0x1401115a0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov r8d, reloc.OLEAUT32.dll_SafeArrayGetElement
mov byte [rsp + 0x20], 0x11
mov r9b, 0x89
mov dl, 1
lea ebx, [r8 - 0xc]
mov ecx, ebx
call fcn.140066e88
or esi, 0xffffffff
lea eax, [rbx + 0xb]
cmp r15d, 0x3a4
jne 0x1400665da
cmp dword [0x140111fe8], edi
jne 0x1400665ce
mov eax, esi
jmp 0x1400665da
lea rcx, [0x1400f3f60]
call fcn.14006a9ac
mov r9b, 0x8a
mov byte [rsp + 0x20], 0x11
movzx r8d, ax
xor edx, edx
mov ecx, ebx
call fcn.140066e88
cmp r15d, 0x3b5
jne 0x140066614
cmp dword [0x140111fe8], edi
jne 0x140066605
movzx ebx, si
jmp 0x140066614
lea rcx, [0x1400f3f54]
call fcn.14006a9ac
movzx ebx, ax
mov r12d, SafeArrayGetDim
mov byte [rsp + 0x20], 0x31
mov ecx, r12d
mov r9b, 0x89
movzx r8d, bx
mov dl, 1
call fcn.140066e88
mov r9b, 0x8a
mov byte [rsp + 0x20], 0x31
movzx r8d, bx
xor edx, edx
mov ecx, r12d
call fcn.140066e88
lea r14d, [r12 + 0xe]
cmp r15d, 0x3b6
jne 0x140066671
cmp dword [0x140111fe8], edi
jne 0x140066661
mov r14d, esi
jmp 0x140066671
lea rcx, [0x1400f3f48]
call fcn.14006a9ac
movzx r14d, ax
mov ebx, SafeArrayGetDim
mov byte [rsp + 0x20], 0x36
mov ecx, ebx
mov r9b, 0x89
movzx r8d, r14w
mov dl, 1
call fcn.140066e88
mov r9b, 0x8a
mov byte [rsp + 0x20], 0x36
movzx r8d, r14w
xor edx, edx
mov ecx, ebx
call fcn.140066e88
lea eax, [rbx + 0x10]
movzx ebx, ax
cmp r15d, 0x3a8
jne 0x1400666ca
cmp dword [0x140111fe8], edi
jne 0x1400666bb
mov ebx, esi
jmp 0x1400666ca
lea rcx, [0x1400f3f3c]
call fcn.14006a9ac
movzx ebx, ax
mov esi, SafeArrayGetDim
mov byte [rsp + 0x20], 0x36
mov ecx, esi
mov r9b, 0x89
movzx r8d, bx
mov dl, 1
call fcn.140066e88
mov r9b, 0x8a
mov byte [rsp + 0x20], 0x36
movzx r8d, bx
xor edx, edx
mov ecx, esi
call fcn.140066e88
mov esi, 0xa
mov ebx, edi
lea r13d, [rsi + 0x1a]
mov r8d, r13d
mov byte [rsp + 0x20], 0x20
mov r9b, 8
mov dl, 1
mov ecx, ebx
call fcn.140066e88
xor r8d, r8d
mov byte [rsp + 0x20], 0x20
mov r9b, sil
xor edx, edx
mov ecx, ebx
call fcn.140066e88
inc ebx
cmp ebx, 8
jle 0x140066704
mov ebx, 0x28
mov byte [rsp + 0x20], dil
mov r8d, ebx
mov r9b, 8
mov dl, 1
mov ecx, esi
call fcn.140066e88
mov r8d, ebx
mov byte [rsp + 0x20], dil
mov r9b, sil
xor edx, edx
mov ecx, esi
call fcn.140066e88
cmp dword [0x1401117b4], 2
lea r13d, [rbx - 0x15]
jne 0x140066778
cmp dword [0x1401117b0], 5
mov al, 1
jae 0x14006677b
mov al, dil
neg al
mov byte [rsp + 0x20], 0x20
mov esi, 0xb
mov r9b, 8
sbb r8w, r8w
mov dl, 1
and r8w, 0xffef
mov ecx, esi
add r8w, 0x24
call fcn.140066e88
lea r8d, [rsi - 6]
mov byte [rsp + 0x20], 0x20
mov r9b, r12b
xor edx, edx
mov ecx, esi
call fcn.140066e88
lea r12d, [rsi + 0x16]
mov byte [rsp + 0x20], 0x20
lea ebx, [rsi + 0x18]
mov r8d, r12d
mov ecx, ebx
mov r9b, 0x88
mov dl, 1
call fcn.140066e88
mov r8d, r12d
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066e88
mov r8d, r12d
mov byte [rsp + 0x20], 0x20
mov r9b, 0x88
mov dl, 1
mov ecx, r13d
call fcn.140066e88
mov r8d, r12d
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, r13d
call fcn.140066e88
lea ebx, [rsi + 0x13]
mov byte [rsp + 0x20], 0x20
lea r13d, [rsi + 0xe]
mov r8d, ebx
mov ecx, r13d
mov r9b, 0x88
mov dl, 1
call fcn.140066e88
mov r8d, ebx
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, r13d
call fcn.140066e88
lea r12d, [rsi + 0x12]
mov byte [rsp + 0x20], 0x20
mov ecx, r12d
lea r8d, [rsi + 0x1b]
mov r9b, 0x88
mov dl, 1
call fcn.140066e88
lea r8d, [rsi + 0x1b]
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, r12d
call fcn.140066e88
mov r8d, esi
mov byte [rsp + 0x20], 0x20
mov r9b, 0x88
lea ecx, [rsi + 0x11]
mov dl, 1
call fcn.140066e88
mov r8d, esi
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
lea ecx, [rsi + 0x11]
xor edx, edx
call fcn.140066e88
lea r8d, [rsi + 6]
mov byte [rsp + 0x20], 0x20
lea esi, [rbx - 8]
mov r9b, 0x88
mov ecx, esi
mov dl, 1
call fcn.140066e88
lea r8d, [rbx - 0xd]
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, esi
call fcn.140066e88
lea esi, [rbx - 3]
mov byte [rsp + 0x20], 0x20
mov ecx, esi
lea r8d, [rbx - 0xe]
mov r9b, 0x88
mov dl, 1
call fcn.140066e88
lea r8d, [rbx - 0xe]
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, esi
call fcn.140066e88
lea esi, [rbx - 0xf]
mov byte [rsp + 0x20], 0x20
mov r8d, esi
mov r9b, 0x88
mov dl, 1
mov ecx, ebx
call fcn.140066e88
mov r8d, esi
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066e88
lea ebx, [rsi + 0x18]
mov byte [rsp + 0x20], 0x20
lea esi, [rbx - 0x10]
mov r8d, ebx
mov ecx, esi
mov r9b, 0x88
mov dl, 1
call fcn.140066e88
mov r8d, ebx
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, esi
call fcn.140066e88
lea ebx, [rsi + 1]
mov byte [rsp + 0x20], 0x20
mov ecx, ebx
mov r8d, r12d
mov r9b, 0x88
mov dl, 1
call fcn.140066e88
mov r8d, r12d
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066e88
lea ebx, [rsi - 0xe]
mov byte [rsp + 0x20], 0x20
lea esi, [rbx + 0xb]
mov r8d, ebx
mov ecx, esi
mov r9b, 0x88
mov dl, 1
call fcn.140066e88
mov r8d, ebx
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, esi
call fcn.140066e88
mov r8d, r13d
lea ebx, [rsi + 1]
mov byte [rsp + 0x20], 0x20
mov ecx, ebx
mov r9b, 0x88
mov dl, 1
call fcn.140066e88
mov r8d, r13d
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
lea r13d, [r8 + 7]
mov byte [rsp + 0x20], r13b
call fcn.140066e88
lea ebx, [rsi - 6]
mov byte [rsp + 0x20], r13b
lea esi, [rbx + 0xc]
mov r8d, ebx
mov ecx, esi
mov r9b, 0x88
mov dl, 1
call fcn.140066e88
mov r8d, ebx
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, esi
call fcn.140066e88
lea ebx, [rsi - 0xd]
mov byte [rsp + 0x20], r13b
lea r12d, [r13 - 1]
mov r8d, ebx
mov ecx, r12d
mov r9b, 0x88
mov dl, 1
call fcn.140066e88
mov r8d, ebx
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, r12d
call fcn.140066e88
lea ebx, [rsi - 0x12]
mov byte [rsp + 0x20], r13b
mov r8d, ebx
mov r9b, 0x87
mov dl, 1
mov ecx, r13d
call fcn.140066e88
mov r8d, ebx
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, r13d
call fcn.140066e88
lea ebx, [rsi - 8]
mov byte [rsp + 0x20], r13b
lea r12d, [r13 + 1]
mov r8d, ebx
mov ecx, r12d
mov r9b, 0x8b
mov dl, 1
call fcn.140066e88
mov r8d, ebx
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, r12d
call fcn.140066e88
lea r8d, [r13 - 0x1f]
mov byte [rsp + 0x20], r13b
lea ebx, [rsi + 8]
mov dl, r8b
mov r9b, 0x88
mov ecx, ebx
call fcn.140066e88
lea r8d, [r13 - 0x1f]
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066e88
lea ebx, [rsi + 0xb]
mov byte [rsp + 0x20], r13b
mov ecx, ebx
mov r8d, esi
mov r9b, 0x88
mov dl, 1
call fcn.140066e88
mov r8d, esi
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066e88
lea r12d, [r13 - 5]
mov byte [rsp + 0x20], r13b
lea r13d, [rsi + 0xc]
mov r8d, r12d
mov ecx, r13d
mov r9b, 0x88
mov dl, 1
call fcn.140066e88
mov r8d, r12d
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, r13d
call fcn.140066e88
lea r12d, [rsi + 0xd]
mov r9b, 0x88
lea r13d, [rsi + 6]
mov ecx, r12d
lea r8d, [rsi - 0x10]
mov byte [rsp + 0x20], r13b
mov dl, 1
call fcn.140066e88
lea r8d, [rsi - 0x10]
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, r12d
call fcn.140066e88
mov r8d, esi
mov byte [rsp + 0x20], r13b
mov r9b, 0x88
mov dl, 1
mov ecx, ebx
call fcn.140066e88
mov r8d, esi
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066e88
lea esi, [rbx - 0x1e]
mov byte [rsp + 0x20], r13b
lea ebx, [rsi + 0x23]
mov r8d, esi
mov ecx, ebx
mov r9b, 0x8b
mov dl, 1
call fcn.140066e88
mov r8d, esi
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066e88
lea esi, [rbx - 0x14]
mov byte [rsp + 0x20], r13b
lea ebx, [rsi + 0x15]
mov r8d, esi
mov ecx, ebx
mov r9b, 0x8b
mov dl, 1
call fcn.140066e88
mov r8d, esi
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066e88
lea esi, [rbx - 0x17]
mov byte [rsp + 0x20], r13b
lea ebx, [rsi + 0x19]
mov r8d, esi
mov ecx, ebx
mov r9b, 0x8b
mov dl, 1
call fcn.140066e88
mov r8d, esi
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066e88
lea ebx, [rsi + 1]
mov byte [rsp + 0x20], r13b
lea esi, [rbx + 0x19]
mov r8d, ebx
mov ecx, esi
mov r9b, 0x8c
mov dl, 1
call fcn.140066e88
mov r8d, ebx
mov byte [rsp + 0x20], r13b
mov r9b, 0x8c
xor edx, edx
mov ecx, esi
call fcn.140066e88
movzx esi, r13w
cmp r15d, 0x3a8
jne 0x140066c5e
cmp dword [0x140111fe8], edi
jne 0x140066c4f
or r12d, 0xffffffff
mov esi, r12d
jmp 0x140066c62
lea rcx, [0x1400f3f28]
call fcn.14006a9ac
movzx esi, ax
or r12d, 0xffffffff
mov ebx, 0x33
mov byte [rsp + 0x20], r13b
mov ecx, ebx
mov r9b, 0x89
movzx r8d, si
mov dl, 1
call fcn.140066e88
mov r9b, 0x8a
mov byte [rsp + 0x20], r13b
movzx r8d, si
xor edx, edx
mov ecx, ebx
call fcn.140066e88
mov ebx, 4
mov byte [rsp + 0x20], reloc.OLEAUT32.dll_SafeArrayGetDim
mov r8d, ebx
mov r9b, 0xa
xor edx, edx
lea ecx, [rbx + 0x30]
call fcn.140066e88
mov r8d, ebx
mov byte [rsp + 0x20], reloc.OLEAUT32.dll_SafeArrayGetDim
mov r9b, 0xa
lea ecx, [rbx + 0x31]
xor edx, edx
call fcn.140066e88
cmp dword [0x1401117b4], 2
mov ebx, edi
jne 0x140066d84
lea rax, [rsp + 0x38]
mov qword [rsp + 0x38], rdi
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SOFTWAREMicrosoftWindows_NTCurrentVersionLanguagePackSurrogateFallback
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140066d84
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x34]
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x30]
lea rax, [rbp + 0x740]
mov dword [rsp + 0x30], edi
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.Plane2
mov dword [rsp + 0x34], 0x40
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x140066d70
cmp dword [rsp + 0x30], 1
jne 0x140066d70
cmp dword [0x140111fe8], edi
jne 0x140066d58
movzx esi, r12w
jmp 0x140066d67
lea rcx, [rbp + 0x740]
call fcn.14006a9ac
movzx esi, ax
movzx r14d, si
mov ebx, 1
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140066d80
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x140066db7
cmp dword [0x140111fe8], edi
jne 0x140066d92
movzx esi, r12w
jmp 0x140066db3
cmp r15d, 0x3a8
lea rax, [0x1400f3f10]
lea rcx, str.Simsun__Founder_Extended_
cmove rcx, rax
call fcn.14006a9ac
movzx esi, ax
movzx r14d, si
mov r15d, 0x2f
cmp r15d, 0x30
mov byte [rsp + 0x20], r13b
movzx ebx, r14w
mov r9b, 0x89
cmove bx, si
mov dl, 1
movzx r8d, bx
mov ecx, r15d
call fcn.140066e88
mov r9b, 0x8a
mov byte [rsp + 0x20], r13b
movzx r8d, bx
xor edx, edx
mov ecx, r15d
call fcn.140066e88
inc r15d
cmp r15d, 0x33
jl 0x140066dbd
lea rdx, [rsp + 0x40]
mov ecx, 0x100
call qword [sym.imp.USER32.dll_GetKeyboardLayoutList]
movsxd r9, eax
test eax, eax
jle 0x140066e43
lea r10, [0x140000000]
movzx ecx, word [rsp + rdi*8 + 0x40]
call fcn.1400672c0
cmp eax, 0x2e
ja 0x140066e3b
movsxd rdx, eax
mov rax, qword [rsp + rdi*8 + 0x40]
mov qword [r10 + rdx*8 + 0x111630], rax
inc rdi
cmp rdi, r9
jl 0x140066e1c
lea rcx, [0x1401115a0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp + 0x780]
xor rcx, rsp
call fcn.1400e3680
lea r11, [rsp + 0x890]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret