Function at 0x415d60
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x210
push ebx
push ebp
push esi
mov esi, dword [esp + 0x224]
mov ebp, ecx
mov byte [esp + 0xf], 0
push edi
mov edi, edx
mov dword [esp + 0x14], edi
lea eax, [esi + 0x12]
test esi, esi
jne 0x415d89
lea eax, [esp + 0x1b]
cmp byte [esp + 0x224], 0
mov dword [esp + 0x1c], eax
jne 0x415dcf
mov edi, ebp
test ebp, ebp
je 0x415e76
mov dl, byte [ebp]
test dl, dl
je 0x415dcb
nop dword [eax + eax]
mov ecx, 0x4c98e4
mov al, 0x20
cmp dl, al
je 0x415e3a
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x415db7
mov dl, byte [edi + 1]
inc edi
test dl, dl
jne 0x415db0
mov edi, dword [esp + 0x14]
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [esp + 0x1f]
mov ecx, ebp
call fcn.0041d950
mov bl, al
add esp, 0xc
test bl, bl
je 0x415f25
cmp byte [esp + 0x224], 0
je 0x415ebb
lea ecx, [ebx + 0x64]
cmp cl, 3
ja 0x415ed8
cmp byte [esp + 0x22c], 0
je 0x415e7d
mov ecx, dword [0x4d995c]
push 1
push 0
push 0xffffffffffffffff
push 0x4c98e8
call fcn.004b04f0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
mov eax, edi
nop dword [eax]
mov cl, byte [eax]
cmp cl, 0x20
je 0x415e4c
cmp cl, 9
jne 0x415e4f
inc eax
jmp 0x415e40
push 0x4c9180
push eax
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsicmp]
add esp, 8
test eax, eax
jne 0x415dcb
test esi, esi
je 0x415e6e
mov byte [esi + 0x16], 1
mov byte [edi], 0
jmp 0x415dcb
mov edi, edx
jmp 0x415dcf
push ebp
push str.__s__is_not_allowed_as_a_prefix_key.
lea eax, [esp + 0x28]
push 0x200
push eax
call fcn.004abdd0
add esp, 0x10
lea eax, [esp + 0x20]
mov ecx, 0x4dba98
push edi
push eax
call fcn.0044da60
test esi, esi
jne 0x415fd3
lea eax, [esi + 4]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
test esi, esi
je 0x415ed8
push 2
push 0x4c9914
push ebp
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsnbicmp]
add esp, 0xc
test eax, eax
sete al
mov byte [esi + 0x17], al
mov al, bl
dec al
cmp al, 5
ja 0x415ee5
cmp bl, 3
jne 0x415eed
mov al, bl
add al, 0x66
cmp al, 5
ja 0x415ef1
mov dl, 1
jmp 0x415ef3
xor dl, dl
mov cl, byte [esp + 0x13]
mov byte [esp + 0x13], cl
test cl, 0x30
je 0x415f0f
mov al, bl
sub al, 0x41
cmp al, 0x19
ja 0x415f0f
and cl, 0xcf
mov byte [esp + 0x13], cl
xor eax, eax
test dl, dl
je 0x416000
mov edx, dword [esp + 0x1c]
mov byte [edx], 2
jmp 0x416000
xor edx, edx
mov ecx, ebp
call fcn.0041d860
movzx eax, ax
test ax, ax
jne 0x415ff8
push 1
lea edx, [esp + 0x18]
mov ecx, ebp
call fcn.004775e0
movzx eax, ax
add esp, 4
test ax, ax
jne 0x415fe0
cmp byte [esp + 0x22c], al
je 0x415f82
mov ecx, dword [0x4d995c]
push 1
push 0
push 0xffffffffffffffff
push 0x4c9918
call fcn.004b04f0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
cmp byte [ebp + 1], 0
jne 0x415fa3
cmp byte [0x4dc0c8], 0
jne 0x415fa3
test esi, esi
jne 0x415fd3
lea eax, [esi + 3]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
test esi, esi
je 0x415fd3
push ebp
push str.__s__is_not_a_valid_key_name.
lea eax, [esp + 0x28]
push 0x200
push eax
call fcn.004abdd0
add esp, 0x10
lea eax, [esp + 0x20]
mov ecx, 0x4dba98
push 0x4c3c29
push eax
call fcn.0044da60
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
inc dword [0x4da450]
mov byte [edx], 4
mov byte [ebx + 0x4da438], 1
mov cl, byte [esp + 0x13]
mov byte [esp + 0x13], cl
test esi, esi
je 0x41606d
cmp byte [esp + 0x224], 0
je 0x416025
mov word [esi + 0xa], ax
mov eax, 1
mov byte [esi + 0x11], bl
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x210
ret
mov word [esi + 8], ax
mov byte [esi + 0x10], bl
mov bl, cl
and bl, 0xd5
mov al, bl
and al, 0xc0
movzx ecx, al
mov al, bl
neg ecx
sbb ecx, ecx
and ecx, 8
mov edx, ecx
or edx, 1
and al, 0xc
mov al, bl
cmove edx, ecx
mov ecx, edx
or ecx, 4
and al, 0x30
cmove ecx, edx
mov eax, ecx
or eax, 2
and bl, 3
cmove eax, ecx
or dword [esi], eax
mov al, byte [esp + 0x13]
and al, 0x2a
or byte [esi + 0xe], al
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x210
ret