Function at 0x4118c0
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x40c
push ebx
push ebp
mov ebp, dword [esp + 0x420]
push esi
push edi
xor edi, edi
mov esi, ecx
mov byte [esp + 0x12], 0
test ebp, ebp
je 0x4118e7
lea eax, [ebp + 0x12]
mov dword [esp + 0x14], eax
jmp 0x4118ef
lea ecx, [esp + 0x13]
mov dword [esp + 0x14], ecx
cmp byte [esp + 0x424], 0
jne 0x411941
mov ebx, 0x4b3acc
mov eax, esi
call fcn.0040558a
mov ebx, eax
test ebx, ebx
je 0x411941
mov ecx, ebx
lea ecx, [ecx]
movzx eax, word [ecx]
cmp eax, 0x20
je 0x41191d
cmp eax, 9
jne 0x411922
add ecx, 2
jmp 0x411910
push 0x4b1188
push ecx
call fcn.00499c29
add esp, 8
test eax, eax
jne 0x411941
test ebp, ebp
je 0x41193c
mov byte [ebp + 0x16], 1
xor edx, edx
mov word [ebx], dx
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
lea eax, [esp + 0x16]
push 1
push eax
mov eax, esi
call fcn.004193d0
mov bl, al
add esp, 0xc
mov byte [esp + 0x13], bl
test bl, bl
je 0x411a4d
cmp byte [esp + 0x424], 0
je 0x4119ef
lea ecx, [ebx + 0x64]
cmp cl, 3
ja 0x411a0b
cmp byte [esp + 0x42c], 0
je 0x4119ad
mov edx, dword [0x4d9f14]
push 1
push 0
push 0xffffffffffffffff
push 0x4b3ad4
push edx
call fcn.00483320
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40c
ret
push esi
push 0x4b3ad8
mov esi, 0x200
lea edi, [esp + 0x24]
call fcn.0047ffb0
mov eax, dword [esp + 0x428]
add esp, 8
push eax
mov ecx, edi
push ecx
mov ecx, 0x4da728
call fcn.0043a420
test ebp, ebp
jne 0x411a9f
pop edi
pop esi
lea eax, [ebp + 4]
pop ebp
pop ebx
add esp, 0x40c
ret
test ebp, ebp
je 0x411a0b
push 2
push 0x4b3b24
push esi
call fcn.0049a3aa
add esp, 0xc
test eax, eax
sete dl
mov byte [ebp + 0x17], dl
lea eax, [ebx - 1]
cmp al, 5
ja 0x411a17
cmp bl, 3
jne 0x411a1f
lea ecx, [ebx + 0x66]
cmp cl, 5
ja 0x411a23
mov al, 1
jmp 0x411a25
xor al, al
mov dl, byte [esp + 0x12]
test dl, 0x30
je 0x411a39
lea ecx, [ebx - 0x41]
cmp cl, 0x19
ja 0x411a39
and dl, 0xcf
test al, al
je 0x411b35
mov eax, dword [esp + 0x14]
mov byte [eax], 2
jmp 0x411b35
xor ebx, ebx
mov eax, esi
call fcn.00419310
movzx edi, ax
test di, di
jne 0x411b2d
push 1
lea ebx, [esp + 0x1c]
mov eax, esi
call fcn.0045b320
movzx edi, ax
add esp, 4
test di, di
jne 0x411b0d
cmp byte [esp + 0x42c], 0
je 0x411aac
mov edx, dword [0x4d9f14]
push 1
push 0
push 0xffffffffffffffff
push 0x4b3b2c
push edx
call fcn.00483320
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40c
ret
cmp word [esi + 2], 0
jne 0x411ad3
cmp byte [0x4db20c], 0
jne 0x411ad3
mov eax, ebp
neg eax
pop edi
sbb eax, eax
pop esi
and eax, 0xfffffffd
pop ebp
add eax, 3
pop ebx
add esp, 0x40c
ret
test ebp, ebp
je 0x411b00
push esi
push 0x4b3b30
mov esi, 0x200
lea edi, [esp + 0x24]
call fcn.0047ffb0
add esp, 8
push 0x4b0cf8
mov eax, edi
push eax
mov ecx, 0x4da728
call fcn.0043a420
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40c
ret
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, 1
add dword [0x4d9f7c], ecx
mov byte [edx], 4
mov byte [eax + 0x4d9f6c], cl
mov bl, al
jmp 0x411b31
mov bl, byte [esp + 0x13]
mov dl, byte [esp + 0x12]
cmp byte [esp + 0x424], 0
je 0x411b5a
test ebp, ebp
je 0x411b92
mov word [ebp + 0xa], di
pop edi
pop esi
mov byte [ebp + 0x11], bl
pop ebp
mov eax, 1
pop ebx
add esp, 0x40c
ret
test ebp, ebp
je 0x411b92
mov al, dl
and al, 0xd5
xor ecx, ecx
mov byte [ebp + 0x10], bl
mov word [ebp + 8], di
test al, 0xc0
je 0x411b74
mov ecx, 8
test al, 0xc
je 0x411b7b
or ecx, 1
test al, 0x30
je 0x411b82
or ecx, 4
test al, 3
je 0x411b89
or ecx, 2
or dword [ebp], ecx
and dl, 0x2a
or byte [ebp + 0xe], dl
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x40c
ret