Function at 0x10041cae
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push esi
movzx eax, byte [ebp + 0x28]
test eax, eax
je 0x10041cec
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x90]
movzx eax, byte [eax]
test eax, eax
je 0x10041ce7
push 0x1649
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
jmp 0x10041faf
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 0x30]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0x38]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp + 0x34]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0xc], eax
push 1
mov ecx, dword [ebp - 4]
call fcn.10016537
cmp dword [eax], 0
jne 0x10041f6c
mov eax, 0xb1857497
test eax, eax
jne 0x10041f6c
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
mov dword [ebp - 0x94], eax
push 3
mov ecx, dword [ebp - 8]
call fcn.10016537
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
neg eax
je 0x10041dd2
push 3
mov ecx, dword [ebp - 8]
call fcn.10016537
cmp dword [eax], 0
je 0x10041dd2
mov dword [ebp - 0x14], 1
jmp 0x10041dd6
and dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
cmp dword [ebp - 0x14], 0xfffffff6
je 0x10041ded
mov dword [ebp - 0x10], 1
jmp 0x10041df1
and dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x10]
mov dword [eax], ecx
cmp dword [ebp - 0x10], 0x384f7a32
je 0x10041e0b
mov dword [ebp - 0x44], 1
jmp 0x10041e0f
and dword [ebp - 0x44], 0
push 2
mov ecx, dword [ebp - 0xc]
call fcn.10016537
mov esi, dword [ebp - 0x44]
imul esi, dword [eax]
push 1
mov ecx, dword [ebp - 4]
call fcn.10016537
push dword [eax]
mov ecx, dword [ebp - 8]
call fcn.10016537
cmp esi, dword [eax]
jge 0x10041e4f
push 2
mov ecx, dword [ebp - 4]
call fcn.10016537
cmp dword [eax], 0
je 0x10041e4f
mov dword [ebp - 0x24], 1
jmp 0x10041e53
and dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x24]
neg eax
mov dword [ebp - 0x1c], eax
push 0
mov ecx, dword [ebp - 0x74]
call fcn.10016537
mov ecx, dword [ebp - 0x1c]
mov dword [eax], ecx
cmp dword [ebp - 0x1c], 0
jne 0x10041e86
mov eax, dword [ebp - 0x18]
cmp dword [eax], 0
jne 0x10041e86
mov eax, dword [ebp - 0x2c]
cmp dword [eax], 0
jne 0x10041e86
and dword [ebp - 0x3c], 0
jmp 0x10041e8d
mov dword [ebp - 0x3c], 1
imul eax, dword [ebp - 0x3c], 0x3d7e
mov ecx, dword [ebp - 0x34]
mov dword [ecx], eax
mov eax, dword [ebp - 0x34]
mov esi, dword [eax]
push 1
mov ecx, dword [ebp - 0xc]
call fcn.10016537
cmp esi, dword [eax]
jg 0x10041ed7
push 1
mov ecx, dword [ebp - 4]
call fcn.10016537
push dword [eax]
mov ecx, dword [ebp - 8]
call fcn.10016537
cmp dword [eax], 0
je 0x10041ed7
mov eax, 0x9653
test eax, eax
je 0x10041ed7
mov dword [ebp - 0x7c], 1
jmp 0x10041edb
and dword [ebp - 0x7c], 0
push 1
mov ecx, dword [ebp - 4]
call fcn.10016537
push dword [eax]
mov ecx, dword [ebp - 8]
call fcn.10016537
push 0
mov ecx, dword [ebp - 4]
call fcn.10016537
push 1
mov ecx, dword [ebp - 4]
call fcn.10016537
mov esi, eax
push 0
mov ecx, dword [ebp - 4]
call fcn.10016537
mov ecx, 0xff814908
sub ecx, dword [eax]
cmp dword [esi], ecx
jl 0x10041f23
mov dword [ebp - 0x28], 1
jmp 0x10041f27
and dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
cmp dword [ebp - 0x28], eax
jg 0x10041f3a
mov dword [ebp - 0x30], 1
jmp 0x10041f3e
and dword [ebp - 0x30], 0
push 2
mov ecx, dword [ebp - 0xc]
call fcn.10016537
mov ecx, dword [ebp - 0x30]
sub ecx, dword [eax]
mov eax, dword [ebp - 0x84]
mov dword [eax], ecx
push 2
mov ecx, dword [ebp - 0xc]
call fcn.10016537
push 0xfffffffffffffffe
pop eax
test eax, eax
jne 0x10041f6c
and dword [ebp - 0x38], 0
jmp 0x10041f73
mov dword [ebp - 0x38], 1
cmp dword [ebp - 0x38], 0x8a038aa1
jne 0x10041f85
mov dword [ebp - 0x40], 1
jmp 0x10041f89
and dword [ebp - 0x40], 0
imul eax, dword [ebp - 0x40], 0xfffe
mov ecx, dword [ebp - 0x18]
cmp eax, dword [ecx]
jg 0x10041fa0
mov dword [ebp - 0x48], 1
jmp 0x10041fa4
and dword [ebp - 0x48], 0
mov eax, dword [ebp - 0x8c]
mov ecx, dword [ebp - 0x48]
mov dword [eax], ecx
pop esi
mov esp, ebp
pop ebp
ret