Function at 0x14001ed50
Capabilities:
Get keyboard layout

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x48
mov qword [rsp + 0x30], 0xfffffffffffffffe
mov rsi, rcx
xor edi, edi
mov ebp, edi
mov dword [rsp + 0x80], edi
cmp qword [rcx + 0x98], rdi
je 0x14001ed8a
cmp qword [rcx + 0xa0], rdi
jne 0x14001eeca
cmp qword [rcx + 0x88], rdi
jne 0x14001edb7
mov rax, qword [rcx + 0x40]
mov qword [rcx + 0x88], rax
test rax, rax
jne 0x14001edb7
mov r8d, 0x1006
xor edx, edx
call fcn.14001703c
cdqe
jmp 0x14001f102
lea rcx, str.editBox
call qword [sym.imp.DUI70.dll_StrToID]
movzx edx, ax
mov rcx, qword [rsi + 0x88]
call qword [sym.imp.DUI70.dll_public:_class_DirectUI::Element____ptr64___cdecl_DirectUI::Element::FindDescendent_unsigned_short_int____ptr64]
mov qword [rsi + 0x98], rax
test rax, rax
jne 0x14001ede5
mov rcx, rsi
jmp 0x14001eda3
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.DUI70.dll_public:_long_int___cdecl_DirectUI::Element::AddListener_struct_DirectUI::IElementListener____ptr64____ptr64]
test eax, eax
js 0x14001ede0
lea rcx, str.clearButton
call qword [sym.imp.DUI70.dll_StrToID]
movzx edx, ax
mov rcx, qword [rsi + 0x88]
call qword [sym.imp.DUI70.dll_public:_class_DirectUI::Element____ptr64___cdecl_DirectUI::Element::FindDescendent_unsigned_short_int____ptr64]
mov qword [rsi + 0xa0], rax
test rax, rax
je 0x14001ede0
mov rcx, qword [0x140054f08]
mov rax, qword [rcx]
mov rax, qword [rax + 0x168]
call qword [0x14003d100]
test eax, eax
je 0x14001ee70
mov rcx, qword [rsi + 0x98]
mov rax, qword [rcx]
mov rax, qword [rax + 0x168]
call qword [0x14003d100]
mov rcx, rax
mov r8d, 8
lea rdx, str.PIP_Handwriting_Factoid_Data
call qword [sym.imp.USER32.dll_SetPropW]
mov dword [rsi + 0xb8], 1
lea r14, [rsi + 0xb0]
mov qword [rsp + 0x20], r14
lea r9, [0x140040ac8]
xor edx, edx
lea r8d, [rdx + 7]
lea rcx, [0x140040ab8]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x14001eeca
mov rax, qword [r14]
mov rbx, qword [rax]
add rbx, 0x20
mov rcx, qword [rsi + 0x98]
mov rax, qword [rcx]
mov rax, qword [rax + 0x168]
call qword [0x14003d100]
mov rdx, rax
mov rcx, qword [r14]
mov rax, qword [rbx]
call qword [0x14003d100]
lea rdx, str.charCount
lea rcx, [rsp + 0x80]
call fcn.140003244
nop
lea rdx, [rsp + 0x80]
mov rcx, qword [rsi + 0x70]
call fcn.14001a904
mov r14, rax
mov rdx, qword [rsp + 0x80]
add rdx, 0xffffffffffffffe8
or r15, 0xffffffffffffffff
mov ecx, r15d
lock xadd dword [rdx + 0x10], ecx
add ecx, r15d
test ecx, ecx
jg 0x14001ef22
mov rcx, qword [rdx]
mov r8, qword [rcx]
mov rax, qword [r8 + 8]
call qword [0x14003d100]
test r14, r14
je 0x14001ef58
lea rdx, str.data
lea rcx, [rsp + 0x88]
call fcn.140003244
mov ebp, 1
lea rdx, [rsp + 0x88]
mov rcx, r14
call fcn.14000cd44
cmp qword [rax], rdi
mov bl, bpl
jne 0x14001ef5b
mov bl, dil
test bpl, 1
je 0x14001ef8c
mov rdx, qword [rsp + 0x88]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x14001ef8c
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x14003d100]
test bl, bl
je 0x14001effa
lea rdx, str.data
lea rcx, [rsp + 0x90]
call fcn.140003244
lea rdx, [rsp + 0x90]
mov rcx, r14
call fcn.14000cd44
mov rbx, qword [rax]
mov rdx, qword [rsp + 0x90]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x14001efe2
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x14003d100]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll__wtoi]
mov edx, eax
mov rcx, qword [rsi + 0x98]
call qword [sym.imp.DUI70.dll_public:_long_int___cdecl_DirectUI::Edit::SetMaxLength_int____ptr64]
xor r8d, r8d
lea rdx, [rsp + 0x98]
mov rcx, rsi
call fcn.14001f918
nop
lea rcx, [rsi + 0xa8]
mov rdx, rax
call fcn.14000c454
nop
mov rdx, qword [rsp + 0x98]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x14001f049
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [0x14003d100]
cmp qword [rsi + 0xb0], rdi
je 0x14001f086
mov rcx, qword [0x140054f08]
mov rax, qword [rcx]
mov rax, qword [rax + 0x168]
call qword [0x14003d100]
neg eax
sbb edx, edx
and edx, 2
inc edx
mov rcx, qword [rsi + 0xb0]
mov rax, qword [rcx]
mov rax, qword [rax + 0x50]
call qword [0x14003d100]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.USER32.dll_GetKeyboardLayoutList]
mov ebp, eax
test eax, eax
je 0x14001f0fa
mov eax, 8
mul rbp
cmovo rax, r15
mov rcx, rax
call fcn.140031f0c
mov rbx, rax
test rax, rax
je 0x14001f0fa
mov rdx, rax
mov ecx, ebp
call qword [sym.imp.USER32.dll_GetKeyboardLayoutList]
test eax, eax
je 0x14001f0f1
mov rcx, qword [0x140054f08]
mov edx, dword [rcx + 0x15c]
mov r8d, edi
movzx ecx, word [rbx + r8*8]
cmp ecx, edx
je 0x14001f0e2
inc edi
cmp edi, eax
jb 0x14001f0ce
jmp 0x14001f0f1
mov edx, 0x100
mov rcx, qword [rbx + r8*8]
call qword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void____ptr64_]
mov rcx, rsi
call fcn.140017080
add rsp, 0x48
pop r15
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret