Function at 0x41aa80
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
jne 0x41aa95
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
push ebx
push esi
mov esi, dword [edi]
call fcn.0041a160
mov ebx, dword [ebp + 8]
test ebx, ebx
js 0x41ad5d
cmp esi, 0xe7
je 0x41ad5d
call fcn.0041a320
push dword [0x5872cc]
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push edi
mov dword [ebp - 4], eax
call fcn.00419d30
add esp, 4
test eax, eax
jne 0x41ad57
push edi
call fcn.00419b40
add esp, 4
test eax, eax
jne 0x41ad57
mov eax, dword [0x5871bc]
cmp dword [eax], 0
jne 0x41ab09
cmp dword [eax + 0x10], 0
je 0x41ad5d
cmp dword [eax + 0x18], 0
je 0x41ad5d
test ebx, ebx
jne 0x41ad5d
test byte [edi + 8], 0x80
jne 0x41ad5d
cmp byte [0x5872d6], bl
jne 0x41ac6e
cmp byte [0x5872d7], bl
jne 0x41ac6e
cmp byte [0x58735b], bl
jne 0x41ac6e
push dword [ebp - 4]
lea eax, [ebp + 0x10]
push ebx
push eax
push 0x5871c0
push dword [edi + 4]
push esi
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov edx, eax
cmp byte [0x586989], bl
je 0x41ac33
cmp esi, 8
je 0x41ad12
movzx ecx, byte [0x575524]
cmp esi, ecx
je 0x41ad12
movzx eax, byte [0x575525]
cmp esi, eax
je 0x41ad12
mov ebx, dword [0x5893a8]
cmp ebx, 0x80
jae 0x41ad12
mov al, byte [ebp + 0x10]
mov ecx, dword [0x5893a0]
mov byte [ebp - 0x10], al
lea eax, [ebx + 1]
shr edx, 0x1f
mov dword [ebp - 0xc], esi
mov byte [ebp - 8], dl
cmp ecx, eax
ja 0x41abd1
push 1
mov ecx, 0x589398
call fcn.0041c9f0
mov ebx, dword [0x5893a8]
mov ecx, dword [0x5893a0]
dec ecx
mov eax, ecx
and eax, dword [0x5893a4]
mov dword [0x5893a4], eax
add eax, ebx
and eax, ecx
mov ecx, dword [0x58939c]
lea esi, [eax*4]
cmp dword [esi + ecx], 0
jne 0x41ac0f
push 0xc
call fcn.004247c8
mov ecx, dword [0x58939c]
add esp, 4
mov dword [esi + ecx], eax
mov ecx, dword [0x58939c]
mov ecx, dword [esi + ecx]
movq xmm0, qword [ebp - 0x10]
mov eax, dword [ebp - 8]
pop esi
movq qword [ecx], xmm0
mov dword [ecx + 8], eax
mov eax, 1
inc dword [0x5893a8]
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
cmp edx, 1
je 0x41acc7
test edx, edx
js 0x41acc7
cmp esi, 0x10
je 0x41ad5d
cmp esi, 0xa0
je 0x41ad5d
cmp esi, 0xa1
je 0x41ad5d
cmp esi, 0x2d
je 0x41ad5d
cmp esi, 0x12
je 0x41ad5d
cmp esi, 0xa4
je 0x41ad5d
cmp esi, 0xa5
je 0x41ad5d
cmp esi, 0x11
je 0x41ad5d
cmp esi, 0xa2
je 0x41ad5d
cmp esi, 0xa3
je 0x41ad5d
cmp byte [0x575526], 0
je 0x41ad5d
call fcn.0041b200
jmp 0x41ad5d
lea eax, [esi - 0x60]
mov ecx, 0x587360
cmp eax, 9
ja 0x41ace0
movzx eax, byte [ebp + 0x10]
push eax
call fcn.004aef30
jmp 0x41ad5d
mov dword [0x5871b4], 0x400
push 0x5871b8
push 0x5871b4
push 0x5869b0
push 0x5871b0
cmp esi, 8
jne 0x41ad2b
call fcn.004af0b0
mov eax, dword [0x5871b0]
cmp eax, 1
jne 0x41ad3a
push edi
push dword [ebp + 0xc]
push 0
push dword [0x58698c]
call dword [sym.imp.USER32.dll_CallNextHookEx]
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret
movzx eax, byte [ebp + 0x10]
push eax
call fcn.004af050
mov eax, dword [0x5871b0]
test eax, eax
jne 0x41ad46
cmp dword [0x5871b4], eax
je 0x41ad5d
call fcn.0041af20
pop esi
pop ebx
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret
test byte [edi + 8], 0x80
je 0x41ad4b
push edi
push dword [ebp + 0xc]
push ebx
push dword [0x58698c]
call dword [sym.imp.USER32.dll_CallNextHookEx]
pop esi
pop ebx
pop edi
mov esp, ebp
pop ebp
ret