Function at 0x10051cca
Capabilities:
Get keyboard layout

Disassembly:
push 0x30
mov eax, 0x10021ffe
call fcn.1001c71d
mov ebx, ecx
and dword [ebp - 0x38], 0
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x3c], ebx
test ebx, ebx
je 0x10051cf9
mov eax, dword [ebx]
push ebx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x10063524]
call esi
and dword [ebp - 4], 0
sub dword [ebp + 8], 2
jne 0x10052035
mov byte [ebx + 0x48], 0
push dword [ebx + 0x3c]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
and dword [ebx + 0x3c], 0
push dword [ebx + 0x40]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
and dword [ebx + 0x40], 0
push dword [ebx + 0x44]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
xor edx, edx
mov dword [ebx + 0x44], edx
mov dword [ebp - 0x24], edx
mov byte [ebp - 4], 1
mov dword [ebp - 0x34], edx
mov byte [ebp - 4], 2
mov ecx, dword [ebx + 0xfc]
mov dword [ebp - 0x30], edx
test ecx, ecx
je 0x10051d7a
mov eax, dword [ecx]
push dword [ebx + 0x100]
push ecx
mov esi, dword [eax + 0x10]
mov ecx, esi
call dword [0x10063524]
call esi
lea ecx, [ebx + 0xfc]
mov dword [ebp - 0x38], eax
call fcn.100365e8
xor edx, edx
mov dword [ebx + 0x100], edx
lea ecx, [ebx + 0x4c]
cmp dword [ecx], edx
je 0x10051d8a
xor edx, edx
call fcn.100137d6
xor edx, edx
test edi, edi
jne 0x10051dc8
cmp byte [ebx + 0xe0], 0
je 0x10051dad
push edx
push edx
push edx
push edx
mov edx, dword [ebx + 0x5c]
mov cl, 1
call fcn.10018630
xor edx, edx
mov byte [ebx + 0xe0], dl
push 8
pop ecx
xor eax, eax
lea edi, [ebx + 0xc0]
rep stosd dword es:[edi], eax
push edx
push ecx
mov ecx, ebx
call fcn.10054a82
jmp 0x10051fff
mov eax, dword [edi]
lea ecx, [ebp - 0x24]
push ecx
push edi
mov esi, dword [eax + 0x18]
mov ecx, esi
call dword [0x10063524]
call esi
mov ecx, dword [ebp - 0x24]
call fcn.100580ba
test al, al
jne 0x10051f66
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x10051e07
mov ecx, dword [eax]
lea edx, [ebp - 0x34]
push edx
push eax
mov esi, dword [ecx + 0x24]
mov ecx, esi
call dword [0x10063524]
call esi
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10051e22
mov ecx, dword [eax]
lea edx, [ebp - 0x30]
push edx
push eax
mov esi, dword [ecx + 0x18]
mov ecx, esi
call dword [0x10063524]
call esi
push 0
push ecx
mov ecx, ebx
call fcn.10054a82
mov edx, dword [ebx + 0x5c]
test edx, edx
je 0x10051e6e
cmp byte [ebx + 0xe0], 0
je 0x10051e50
xor eax, eax
mov cl, 1
push eax
push eax
push eax
push eax
call fcn.10018630
mov byte [ebx + 0xe0], 0
xor eax, eax
lea edx, [ebx + 0xd0]
mov edi, edx
lea ecx, [ebx + 0xc0]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
jmp 0x10051e7a
lea ecx, [ebx + 0xc0]
lea edx, [ebx + 0xd0]
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x10051ee6
cmp dword [ebx + 0x5c], eax
je 0x10051ea9
xor eax, eax
mov edi, ecx
mov cl, 1
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov edi, edx
xor edx, edx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
push eax
push eax
push eax
push 3
call fcn.10018630
mov eax, dword [ebp - 0x30]
push 0
mov dword [ebx + 0x5c], eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ecx, dword [ebx + 0x5c]
mov edx, eax
call fcn.1005c38d
push 0
push 1
push dword [ebp - 0x24]
mov ecx, ebx
mov byte [ebx + 0x70], al
call fcn.10052f99
push ecx
push dword [ebp - 0x24]
mov ecx, ebx
call fcn.10051935
push dword [ebp - 0x24]
mov ecx, ebx
call fcn.10054d17
jmp 0x10051f63
and dword [ebx + 0x5c], 0
xor eax, eax
mov byte [ebx + 0x70], 0
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov edi, edx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.1003112e
test al, al
jne 0x10051f53
call fcn.100312d9
test al, al
jne 0x10051f53
lea eax, [ebp - 0x20]
push eax
call dword [sym.imp.USER32.dll_SetRectEmpty]
mov eax, dword [0x1006246c]
xor ecx, ecx
test eax, eax
je 0x10051f2e
mov byte [ebp - 0x28], 1
cmp dword [eax + 0x58], ecx
jne 0x10051f31
mov byte [ebp - 0x28], cl
push dword [ebp - 0x28]
lea eax, [ebp - 0x20]
xor dl, dl
push ecx
push ecx
push ecx
push eax
push ecx
push ecx
push ecx
push 1
push ecx
push ecx
xor cl, cl
call fcn.1005c6cf
push ecx
mov ecx, ebx
call fcn.10056392
xor eax, eax
xor edx, edx
push eax
push eax
push eax
push 3
mov cl, 1
call fcn.10018630
mov edi, dword [ebp - 0x2c]
cmp dword [ebx + 0xfc], 0
jne 0x10051fff
and dword [ebp - 0x28], 0
mov byte [ebp - 4], 3
mov ecx, dword [ebx + 0x34]
test ecx, ecx
je 0x10051fe4
mov eax, dword [ecx]
lea edx, [ebp - 0x28]
push edx
push ecx
mov esi, dword [eax + 0x1c]
mov ecx, esi
call dword [0x10063524]
call esi
test eax, eax
js 0x10051fe4
cmp dword [ebp - 0x28], edi
jne 0x10051fe4
and dword [ebp - 0x2c], 0
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 4
push eax
mov ecx, ebx
lea eax, [ebx + 0x100]
neg ecx
lea edx, [ebx + 0xfc]
push edi
push eax
lea eax, [ebx + 0x14]
sbb ecx, ecx
and ecx, eax
call fcn.1005727a
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x10051fe4
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x10063524]
call esi
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x10051fff
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x10063524]
call esi
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x1005201a
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x10063524]
call esi
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x10052035
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x10063524]
call esi
mov dword [ebp - 4], 5
test ebx, ebx
je 0x10052050
mov eax, dword [ebx]
push ebx
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x10063524]
call esi
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
call fcn.1001c6cc
ret 0xc