Function at 0x140065cac
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 [0x14010a078]
xor rax, rsp
mov qword [rbp + 0x780], rax
call qword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
movzx ecx, ax
call fcn.140066a1c
xor edi, edi
lea rcx, [0x140000000]
lea r13d, [rdi + 0x13]
cmp eax, r13d
jae 0x140065d10
cdqe
movzx r15d, word [rcx + rax*2 + 0xf2fc0]
jmp 0x140065d13
mov r15d, edi
lea rcx, [0x140111570]
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.140066608
or esi, 0xffffffff
lea eax, [rbx + 0xb]
cmp r15d, 0x3a4
jne 0x140065d62
cmp dword [0x140111fc0], edi
jne 0x140065d56
mov eax, esi
jmp 0x140065d62
lea rcx, [0x1400f3070]
call fcn.140069f90
mov r9b, 0x8a
mov byte [rsp + 0x20], 0x11
movzx r8d, ax
xor edx, edx
mov ecx, ebx
call fcn.140066608
cmp r15d, 0x3b5
jne 0x140065d9c
cmp dword [0x140111fc0], edi
jne 0x140065d8d
movzx ebx, si
jmp 0x140065d9c
lea rcx, [0x1400f3064]
call fcn.140069f90
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.140066608
mov r9b, 0x8a
mov byte [rsp + 0x20], 0x31
movzx r8d, bx
xor edx, edx
mov ecx, r12d
call fcn.140066608
lea r14d, [r12 + 0xe]
cmp r15d, 0x3b6
jne 0x140065df9
cmp dword [0x140111fc0], edi
jne 0x140065de9
mov r14d, esi
jmp 0x140065df9
lea rcx, [0x1400f3058]
call fcn.140069f90
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.140066608
mov r9b, 0x8a
mov byte [rsp + 0x20], 0x36
movzx r8d, r14w
xor edx, edx
mov ecx, ebx
call fcn.140066608
lea eax, [rbx + 0x10]
movzx ebx, ax
cmp r15d, 0x3a8
jne 0x140065e52
cmp dword [0x140111fc0], edi
jne 0x140065e43
mov ebx, esi
jmp 0x140065e52
lea rcx, [0x1400f304c]
call fcn.140069f90
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.140066608
mov r9b, 0x8a
mov byte [rsp + 0x20], 0x36
movzx r8d, bx
xor edx, edx
mov ecx, esi
call fcn.140066608
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.140066608
xor r8d, r8d
mov byte [rsp + 0x20], 0x20
mov r9b, sil
xor edx, edx
mov ecx, ebx
call fcn.140066608
inc ebx
cmp ebx, 8
jle 0x140065e8c
mov ebx, 0x28
mov byte [rsp + 0x20], dil
mov r8d, ebx
mov r9b, 8
mov dl, 1
mov ecx, esi
call fcn.140066608
mov r8d, ebx
mov byte [rsp + 0x20], dil
mov r9b, sil
xor edx, edx
mov ecx, esi
call fcn.140066608
cmp dword [0x140111784], 2
lea r13d, [rbx - 0x15]
jne 0x140065f00
cmp dword [0x14011177c], 5
mov al, 1
jae 0x140065f03
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.140066608
lea r8d, [rsi - 6]
mov byte [rsp + 0x20], 0x20
mov r9b, r12b
xor edx, edx
mov ecx, esi
call fcn.140066608
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.140066608
mov r8d, r12d
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066608
mov r8d, r12d
mov byte [rsp + 0x20], 0x20
mov r9b, 0x88
mov dl, 1
mov ecx, r13d
call fcn.140066608
mov r8d, r12d
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, r13d
call fcn.140066608
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.140066608
mov r8d, ebx
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, r13d
call fcn.140066608
lea r12d, [rsi + 0x12]
mov byte [rsp + 0x20], 0x20
mov ecx, r12d
lea r8d, [rsi + 0x1b]
mov r9b, 0x88
mov dl, 1
call fcn.140066608
lea r8d, [rsi + 0x1b]
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, r12d
call fcn.140066608
mov r8d, esi
mov byte [rsp + 0x20], 0x20
mov r9b, 0x88
lea ecx, [rsi + 0x11]
mov dl, 1
call fcn.140066608
mov r8d, esi
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
lea ecx, [rsi + 0x11]
xor edx, edx
call fcn.140066608
lea r8d, [rsi + 6]
mov byte [rsp + 0x20], 0x20
lea esi, [rbx - 8]
mov r9b, 0x88
mov ecx, esi
mov dl, 1
call fcn.140066608
lea r8d, [rbx - 0xd]
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, esi
call fcn.140066608
lea esi, [rbx - 3]
mov byte [rsp + 0x20], 0x20
mov ecx, esi
lea r8d, [rbx - 0xe]
mov r9b, 0x88
mov dl, 1
call fcn.140066608
lea r8d, [rbx - 0xe]
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, esi
call fcn.140066608
lea esi, [rbx - 0xf]
mov byte [rsp + 0x20], 0x20
mov r8d, esi
mov r9b, 0x88
mov dl, 1
mov ecx, ebx
call fcn.140066608
mov r8d, esi
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066608
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.140066608
mov r8d, ebx
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, esi
call fcn.140066608
lea ebx, [rsi + 1]
mov byte [rsp + 0x20], 0x20
mov ecx, ebx
mov r8d, r12d
mov r9b, 0x88
mov dl, 1
call fcn.140066608
mov r8d, r12d
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066608
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.140066608
mov r8d, ebx
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, esi
call fcn.140066608
mov r8d, r13d
lea ebx, [rsi + 1]
mov byte [rsp + 0x20], 0x20
mov ecx, ebx
mov r9b, 0x88
mov dl, 1
call fcn.140066608
mov r8d, r13d
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
lea r13d, [r8 + 7]
mov byte [rsp + 0x20], r13b
call fcn.140066608
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.140066608
mov r8d, ebx
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, esi
call fcn.140066608
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.140066608
mov r8d, ebx
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, r12d
call fcn.140066608
lea ebx, [rsi - 0x12]
mov byte [rsp + 0x20], r13b
mov r8d, ebx
mov r9b, 0x87
mov dl, 1
mov ecx, r13d
call fcn.140066608
mov r8d, ebx
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, r13d
call fcn.140066608
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.140066608
mov r8d, ebx
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, r12d
call fcn.140066608
lea r8d, [r13 - 0x1f]
mov byte [rsp + 0x20], r13b
lea ebx, [rsi + 8]
mov dl, r8b
mov r9b, 0x88
mov ecx, ebx
call fcn.140066608
lea r8d, [r13 - 0x1f]
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066608
lea ebx, [rsi + 0xb]
mov byte [rsp + 0x20], r13b
mov ecx, ebx
mov r8d, esi
mov r9b, 0x88
mov dl, 1
call fcn.140066608
mov r8d, esi
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066608
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.140066608
mov r8d, r12d
mov byte [rsp + 0x20], 0x20
mov r9b, 0x8a
xor edx, edx
mov ecx, r13d
call fcn.140066608
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.140066608
lea r8d, [rsi - 0x10]
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, r12d
call fcn.140066608
mov r8d, esi
mov byte [rsp + 0x20], r13b
mov r9b, 0x88
mov dl, 1
mov ecx, ebx
call fcn.140066608
mov r8d, esi
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066608
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.140066608
mov r8d, esi
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066608
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.140066608
mov r8d, esi
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066608
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.140066608
mov r8d, esi
mov byte [rsp + 0x20], r13b
mov r9b, 0x8a
xor edx, edx
mov ecx, ebx
call fcn.140066608
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.140066608
mov r8d, ebx
mov byte [rsp + 0x20], r13b
mov r9b, 0x8c
xor edx, edx
mov ecx, esi
call fcn.140066608
movzx esi, r13w
cmp r15d, 0x3a8
jne 0x1400663e6
cmp dword [0x140111fc0], edi
jne 0x1400663d7
or r12d, 0xffffffff
mov esi, r12d
jmp 0x1400663ea
lea rcx, [0x1400f3038]
call fcn.140069f90
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.140066608
mov r9b, 0x8a
mov byte [rsp + 0x20], r13b
movzx r8d, si
xor edx, edx
mov ecx, ebx
call fcn.140066608
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.140066608
mov r8d, ebx
mov byte [rsp + 0x20], reloc.OLEAUT32.dll_SafeArrayGetDim
mov r9b, 0xa
lea ecx, [rbx + 0x31]
xor edx, edx
call fcn.140066608
cmp dword [0x140111784], 2
mov ebx, edi
jne 0x14006650c
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 0x14006650c
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 0x1400664f8
cmp dword [rsp + 0x30], 1
jne 0x1400664f8
cmp dword [0x140111fc0], edi
jne 0x1400664e0
movzx esi, r12w
jmp 0x1400664ef
lea rcx, [rbp + 0x740]
call fcn.140069f90
movzx esi, ax
movzx r14d, si
mov ebx, 1
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140066508
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x14006653f
cmp dword [0x140111fc0], edi
jne 0x14006651a
movzx esi, r12w
jmp 0x14006653b
cmp r15d, 0x3a8
lea rax, [0x1400f3020]
lea rcx, str.Simsun__Founder_Extended_
cmove rcx, rax
call fcn.140069f90
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.140066608
mov r9b, 0x8a
mov byte [rsp + 0x20], r13b
movzx r8d, bx
xor edx, edx
mov ecx, r15d
call fcn.140066608
inc r15d
cmp r15d, 0x33
jl 0x140066545
lea rdx, [rsp + 0x40]
mov ecx, 0x100
call qword [sym.imp.USER32.dll_GetKeyboardLayoutList]
movsxd r9, eax
test eax, eax
jle 0x1400665cb
lea r10, [0x140000000]
movzx ecx, word [rsp + rdi*8 + 0x40]
call fcn.140066a1c
cmp eax, 0x2e
ja 0x1400665c3
movsxd rdx, eax
mov rax, qword [rsp + rdi*8 + 0x40]
mov qword [r10 + rdx*8 + 0x111600], rax
inc rdi
cmp rdi, r9
jl 0x1400665a4
lea rcx, [0x140111570]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rbp + 0x780]
xor rcx, rsp
call fcn.1400e27e0
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