Function at 0x43ed10
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
xor eax, eax
push esi
push edi
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov word [esp + 0x16], ax
cmp byte [esp + 0x30], al
je 0x43ed42
mov byte [esp + 0x12], 1
cmp byte [ebx + 0x44], al
jne 0x43ed46
mov byte [esp + 0x12], al
mov ebp, dword [esp + 0x2c]
cmp word [ebp], ax
je 0x43f095
xor ecx, ecx
mov word [esp + 0x14], cx
movzx eax, word [ebp]
mov ecx, eax
sub ecx, 0x7b
je 0x43edba
sub ecx, 2
je 0x43efbe
cmp byte [esp + 0x12], 0
je 0x43ed7f
inc dword [esp + 0x1c]
jmp 0x43efbe
push 0
mov word [esp + 0x18], ax
mov byte [esp + 0x14], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
lea edx, [esp + 0x14]
push 1
push edx
lea eax, [esp + 0x20]
call fcn.004192c0
mov bl, al
add esp, 0xc
mov byte [esp + 0x18], bl
mov byte [esp + 0x11], 0
mov byte [esp + 0x13], 0
jmp 0x43eee1
lea esi, [ebp + 2]
push 0x7d
push esi
call fcn.0049a7fe
mov edi, eax
add esp, 8
test edi, edi
je 0x43efbe
sub eax, ebp
sar eax, 1
dec eax
jne 0x43ede9
cmp word [edi + 2], 0x7d
jne 0x43efbe
add edi, 2
jmp 0x43edee
cmp eax, 1
jne 0x43ee06
cmp byte [esp + 0x12], 0
je 0x43edfe
inc dword [esp + 0x1c]
jmp 0x43efbe
mov ax, word [esi]
mov word [esp + 0x14], ax
xor ecx, ecx
push ecx
mov word [edi], cx
mov byte [esp + 0x17], cl
mov byte [esp + 0x14], cl
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
lea edx, [esp + 0x14]
push 1
push edx
mov eax, esi
call fcn.004192c0
add esp, 0xc
mov byte [esp + 0x18], al
test al, al
je 0x43eec1
movzx esi, word [esi]
test esi, 0xffffff80
jne 0x43ee55
push 2
push esi
call fcn.0049b7fc
add esp, 8
test eax, eax
je 0x43ee55
and esi, 0xffffffdf
cmp si, 0x56
jne 0x43ee84
movzx esi, word [ebp + 4]
test esi, 0xffffff80
jne 0x43ee79
push 2
push esi
call fcn.0049b7fc
add esp, 8
test eax, eax
je 0x43ee79
and esi, 0xffffffdf
mov byte [esp + 0x11], 1
cmp si, 0x4b
je 0x43ee89
mov byte [esp + 0x11], 0
cmp dword [ebx + 8], 0
je 0x43eed3
cmp byte [esp + 0x11], 0
jne 0x43eed3
mov eax, dword [esp + 0x18]
push eax
mov bl, 1
call fcn.00419840
movzx eax, ax
add esp, 4
mov dword [esp + 0x20], eax
test ax, ax
je 0x43eed3
xor eax, 0x100
mov dword [esp + 0x20], eax
mov byte [esp + 0x18], 0
jmp 0x43eed3
lea ebx, [esp + 0x13]
mov eax, esi
call fcn.00419200
movzx ecx, ax
mov dword [esp + 0x20], ecx
mov bl, byte [esp + 0x18]
mov edx, 0x7d
mov word [edi], dx
mov ebp, edi
test bl, bl
je 0x43ef8f
cmp word [esp + 0x14], 0
je 0x43ef32
cmp byte [esp + 0x30], 0
je 0x43ef32
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x43ef32
test byte [esp + 0x10], 0x30
je 0x43ef20
mov edx, dword [esp + 0x28]
movzx ecx, bl
or byte [ecx + edx + 0x54], 1
lea eax, [ecx + edx + 0x54]
jmp 0x43ef8f
mov ecx, dword [esp + 0x28]
movzx eax, bl
or byte [eax + ecx + 0x54], 2
lea eax, [eax + ecx + 0x54]
jmp 0x43ef8f
mov eax, dword [esp + 0x28]
movzx edx, bl
mov bl, byte [edx + eax + 0x54]
lea eax, [edx + eax + 0x54]
mov dl, byte [esp + 0x34]
mov cl, dl
not cl
and bl, cl
or bl, byte [esp + 0x38]
mov byte [esp + 0x10], cl
mov byte [eax], bl
test dl, dl
je 0x43ef8f
cmp byte [esp + 0x11], 0
jne 0x43ef8f
mov ecx, dword [esp + 0x18]
push ecx
xor bl, bl
call fcn.00419840
movzx eax, ax
add esp, 4
test ax, ax
je 0x43ef8f
mov cl, byte [esp + 0x10]
mov edx, eax
mov eax, dword [esp + 0x28]
and byte [edx + eax + 0x154], cl
lea eax, [edx + eax + 0x154]
mov eax, dword [esp + 0x20]
test ax, ax
jne 0x43ef9e
cmp byte [esp + 0x13], al
je 0x43efba
mov cl, byte [esp + 0x34]
movzx edx, ax
mov eax, dword [esp + 0x28]
lea eax, [edx + eax + 0x154]
not cl
and cl, byte [eax]
or cl, byte [esp + 0x38]
mov byte [eax], cl
mov ebx, dword [esp + 0x28]
add ebp, 2
cmp word [ebp], 0
jne 0x43ed54
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x43f095
mov eax, dword [ebx + 0x1c]
cmp esi, eax
jbe 0x43f024
test eax, eax
je 0x43efef
mov edx, dword [ebx + 0x18]
push edx
call fcn.0049a07d
add esp, 4
lea eax, [esi + esi + 2]
push eax
call fcn.00499fde
add esp, 4
mov dword [ebx + 0x18], eax
test eax, eax
jne 0x43f021
push 0x4b0cf8
push str.Out_of_memory.
mov ecx, 0x4da728
call fcn.0043a310
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x14
mov dword [ebx + 0x1c], esi
mov esi, dword [esp + 0x2c]
cmp word [esi], 0
mov ebx, dword [ebx + 0x18]
je 0x43f083
movzx ecx, word [esi]
mov eax, ecx
sub eax, 0x7b
je 0x43f048
sub eax, 2
je 0x43f07a
mov word [ebx], cx
add ebx, 2
jmp 0x43f07a
lea edi, [esi + 2]
push 0x7d
push edi
call fcn.0049a7fe
add esp, 8
test eax, eax
je 0x43f07a
cmp eax, edi
jne 0x43f068
cmp word [eax + 2], 0x7d
jne 0x43f068
add eax, 2
add esi, 4
cmp eax, esi
jne 0x43f078
mov cx, word [edi]
mov word [ebx], cx
add ebx, 2
mov esi, eax
add esi, 2
cmp word [esi], 0
jne 0x43f031
pop edi
pop esi
xor edx, edx
pop ebp
mov word [ebx], dx
lea eax, [edx + 1]
pop ebx
add esp, 0x14
ret 0x14
cmp byte [esp + 0x30], 0
je 0x43f0be
cmp dword [ebx + 0x1c], 0
je 0x43f0b7
mov eax, dword [ebx + 0x18]
pop edi
pop esi
xor ecx, ecx
pop ebp
mov word [eax], cx
lea eax, [ecx + 1]
pop ebx
add esp, 0x14
ret 0x14
mov dword [ebx + 0x18], 0x4b0cf8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x14
ret 0x14