Function at 0x51e55b84
Capabilities:
Get keyboard layout
Identify system language via api

Disassembly:
push ebx
push ebp
push esi
push edi
xor edi, edi
inc edi
push 0
mov dword [0x51eb3d00], edi
mov dword [0x51eb3c5c], edi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ebx, eax
push 0x14
push ebx
call sub.IMM32.dll_ImmGetProperty
test al, 2
je 0x51e55bb9
test al, 4
je 0x51e55bb9
mov dword [0x51eb3c60], edi
jmp 0x51e55bc0
and dword [0x51eb3c60], 0
mov ecx, dword [0x51e8b69c]
test ecx, ecx
mov esi, dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
jne 0x51e55be4
call esi
mov ecx, dword [0x51e8b69c]
sub ax, 0x404
neg ax
sbb eax, eax
inc eax
jmp 0x51e55bf3
xor eax, eax
cmp dword [ecx + 0x53ac], 0x404
sete al
test eax, eax
mov ebp, 0x804
jne 0x51e55c24
test ecx, ecx
jne 0x51e55c0d
call esi
sub ax, bp
neg ax
sbb eax, eax
inc eax
jmp 0x51e55c18
xor eax, eax
cmp dword [ecx + 0x53ac], ebp
sete al
test eax, eax
jne 0x51e55c24
mov dword [0x51eb3c5c], edi
jmp 0x51e55c3c
push 4
push ebx
mov dword [0x51eb3c54], ebx
call sub.IMM32.dll_ImmGetProperty
shr eax, 0x10
and eax, edi
mov dword [0x51eb3c5c], eax
call fcn.51e55a3d
mov eax, dword [0x51e8b69c]
test eax, eax
jne 0x51e55c5c
call esi
mov edi, 0x411
sub ax, di
neg ax
sbb eax, eax
inc eax
jmp 0x51e55c6e
xor ecx, ecx
mov edi, 0x411
cmp dword [eax + 0x53a8], edi
sete cl
mov eax, ecx
test eax, eax
je 0x51e55c85
push 0
call fcn.51e653f1
push 0
call fcn.51e65419
call fcn.51e6a105
mov eax, dword [0x51e8b69c]
test eax, eax
mov ebx, 0x3c0000
jne 0x51e55cb3
call esi
cmp ax, di
je 0x51e55cd6
call esi
cmp ax, 0x404
je 0x51e55cd6
call esi
cmp ax, 0x412
je 0x51e55cd6
call esi
cmp ax, bp
jne 0x51e55cc4
jmp 0x51e55cd6
cmp dword [eax + 0x53bc], 0
jne 0x51e55cd6
test dword [eax + 0x53b4], ebx
jne 0x51e55cd6
cmp dword [0x51e8b568], 2
jne 0x51e55ce6
cmp dword [0x51e8a118], 4
jbe 0x51e55ce6
push 0x51e55f1c
call dword [0x51e851b8]
mov dword [0x51eb3c74], eax
mov eax, dword [0x51e8b69c]
test eax, eax
jne 0x51e55d0f
call esi
cmp ax, di
je 0x51e55d20
call esi
cmp ax, 0x404
je 0x51e55d20
call esi
cmp ax, 0x412
je 0x51e55d20
call esi
cmp ax, bp
jne 0x51e55d84
jmp 0x51e55d20
cmp dword [eax + 0x53bc], 0
jne 0x51e55d20
test dword [eax + 0x53b4], ebx
je 0x51e55d84
cmp dword [0x51eb3c78], 0
jne 0x51e55d39
push 0x51e55efc
call dword [0x51e851b8]
mov dword [0x51eb3c78], eax
cmp dword [0x51eb3c7c], 0
jne 0x51e55d52
push 0x51e55ed0
call dword [0x51e851b8]
mov dword [0x51eb3c7c], eax
cmp dword [0x51eb3c90], 0
jne 0x51e55d6b
push 0x51e55eac
call dword [0x51e851b8]
mov dword [0x51eb3c90], eax
cmp dword [0x51eb3c94], 0
jne 0x51e55d84
push 0x51e55e84
call dword [0x51e851b8]
mov dword [0x51eb3c94], eax
mov eax, dword [0x51e8b69c]
test eax, eax
jne 0x51e55d9a
call esi
sub ax, di
neg ax
sbb eax, eax
inc eax
jmp 0x51e55da7
xor ecx, ecx
cmp dword [eax + 0x53a8], edi
sete cl
mov eax, ecx
test eax, eax
je 0x51e55e40
push 0
push 0
push 0xf7
call fcn.51e6ccfb
xor edi, edi
cmp eax, edi
mov dword [0x51eb3ca0], eax
je 0x51e55e40
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x51e55e74
push eax
call esi
cmp eax, edi
mov dword [0x51eb3c48], eax
jne 0x51e55df3
push dword [0x51eb3ca0]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x51eb3ca0], edi
jmp 0x51e55e40
push 0x51e55e64
push dword [0x51eb3ca0]
call esi
cmp eax, edi
mov dword [0x51eb3c3c], eax
je 0x51e55ddf
push 0x51e55e54
push dword [0x51eb3ca0]
call esi
cmp eax, edi
mov dword [0x51eb3c38], eax
je 0x51e55ddf
push 0x51e55e4c
push dword [0x51eb3ca0]
call esi
cmp eax, edi
mov dword [0x51eb3c40], eax
je 0x51e55ddf
push 0x2e442980
call dword [0x51eb3c48]
call fcn.51e52852
pop edi
pop esi
pop ebp
pop ebx
ret 4