Function at 0x4442e0
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x18
mov al, byte [esp + 0x20]
mov edx, ecx
push ebx
push ebp
push esi
push edi
xor esi, esi
mov dword [esp + 0x24], edx
xor edi, edi
mov dword [esp + 0x18], esi
mov dword [esp + 0x20], edi
mov byte [esp + 0x1d], 0
test al, al
je 0x444310
cmp byte [edx + 0x45], 0
je 0x444310
mov ch, 1
jmp 0x444312
xor ch, ch
mov ebx, dword [esp + 0x2c]
mov ebp, ebx
mov byte [esp + 0x14], ch
cmp byte [ebx], 0
je 0x444670
mov ebx, edx
nop word [eax + eax]
mov byte [esp + 0x1c], 0
mov cl, byte [ebp]
movsx eax, cl
sub eax, 0x7b
je 0x444380
sub eax, 2
je 0x4443b3
test ch, ch
je 0x444350
inc edi
mov dword [esp + 0x20], edi
jmp 0x4443b3
push 0
mov byte [esp + 0x20], cl
mov byte [esp + 0x19], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [esp + 0x21]
lea ecx, [esp + 0x28]
call fcn.00415c70
mov dh, al
add esp, 0xc
mov byte [esp + 0x13], dh
jmp 0x44454c
lea esi, [ebp + 1]
push 0x7d
push esi
call fcn.004b87b6
mov edi, eax
add esp, 8
test edi, edi
je 0x4443a7
mov ecx, edi
sub ecx, ebp
sub ecx, 1
jne 0x444421
inc edi
cmp byte [edi], 0x7d
je 0x444426
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
mov ch, byte [esp + 0x14]
inc ebp
cmp byte [ebp], 0
jne 0x444330
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
test edi, edi
je 0x44466c
mov eax, dword [edx + 0x1c]
cmp edi, eax
jbe 0x444600
test eax, eax
je 0x4443e8
push dword [edx + 0x18]
call fcn.004b6427
add esp, 4
lea eax, [edi + 1]
push eax
call fcn.004b6720
mov edx, dword [esp + 0x28]
add esp, 4
mov dword [edx + 0x18], eax
test eax, eax
jne 0x4445fd
push 0x4d5231
push str.Out_of_memory.
mov ecx, 0x4ed830
call fcn.0043ed90
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
cmp ecx, 1
jne 0x444446
mov ch, byte [esp + 0x14]
test ch, ch
je 0x444440
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
inc edi
mov dword [esp + 0x20], edi
jmp 0x4443b3
mov al, byte [esi]
mov byte [esp + 0x1c], al
push 0
mov byte [edi], 0
mov byte [esp + 0x1b], 0
mov byte [esp + 0x19], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [esp + 0x21]
mov ecx, esi
call fcn.00415c70
add esp, 0xc
mov byte [esp + 0x13], al
test al, al
je 0x444527
mov ch, byte [esi]
movzx eax, ch
mov byte [esp + 0x16], ch
test eax, 0xffffff80
je 0x44448d
xor eax, eax
jmp 0x44449c
push 2
push eax
call fcn.004b8e5e
mov ch, byte [esp + 0x1e]
add esp, 8
mov cl, ch
and cl, 0xdf
test eax, eax
movzx edx, cl
movzx ecx, ch
cmove edx, ecx
cmp dl, 0x56
jne 0x4444ee
mov ch, byte [ebp + 2]
movzx eax, ch
mov byte [esp + 0x16], ch
test eax, 0xffffff80
je 0x4444c6
xor eax, eax
jmp 0x4444d5
push 2
push eax
call fcn.004b8e5e
mov ch, byte [esp + 0x1e]
add esp, 8
mov cl, ch
and cl, 0xdf
test eax, eax
movzx edx, cl
movzx ecx, ch
cmove edx, ecx
cmp dl, 0x4b
jne 0x4444ee
mov al, 1
jmp 0x4444f0
xor al, al
cmp dword [ebx + 8], 0
mov byte [esp + 0x16], al
je 0x44453b
test al, al
jne 0x44453b
mov cl, byte [esp + 0x13]
mov dl, 1
call fcn.00416230
movzx esi, ax
mov dword [esp + 0x18], esi
test si, si
je 0x44453f
xor esi, 0x100
xor dh, dh
mov dword [esp + 0x18], esi
mov byte [esp + 0x13], dh
jmp 0x444543
lea edx, [esp + 0x17]
mov ecx, esi
call fcn.00415b80
movzx esi, ax
mov dword [esp + 0x18], esi
jmp 0x44453f
mov esi, dword [esp + 0x18]
mov dh, byte [esp + 0x13]
mov byte [edi], 0x7d
mov ebp, edi
mov edi, dword [esp + 0x20]
test dh, dh
je 0x4445cd
cmp byte [esp + 0x1c], 0
je 0x44458a
cmp byte [esp + 0x30], 0
je 0x44458a
push dword [esp + 0x1c]
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x444586
movzx eax, byte [esp + 0x13]
lea ecx, [ebx + 0x54]
add ecx, eax
mov al, byte [esp + 0x15]
and al, 0x30
neg al
sbb al, al
add al, 2
or byte [ecx], al
jmp 0x4445cd
mov dh, byte [esp + 0x13]
mov dl, byte [esp + 0x34]
lea ecx, [ebx + 0x54]
movzx eax, dh
add ecx, eax
mov al, dl
not al
mov byte [esp + 0x15], al
and al, byte [ecx]
or al, byte [esp + 0x38]
mov byte [ecx], al
test dl, dl
je 0x4445d1
cmp byte [esp + 0x16], 0
jne 0x4445d1
xor dl, dl
mov cl, dh
call fcn.00416230
movzx eax, ax
test ax, ax
je 0x4445cd
mov cl, byte [esp + 0x15]
and byte [eax + ebx + 0x154], cl
mov dl, byte [esp + 0x34]
test si, si
jne 0x4445e1
cmp byte [esp + 0x17], 0
je 0x4443af
movzx eax, si
lea ecx, [ebx + 0x154]
add ecx, eax
mov al, dl
not al
and al, byte [ecx]
or al, byte [esp + 0x38]
mov byte [ecx], al
jmp 0x4443af
mov dword [edx + 0x1c], edi
mov cl, byte [ebx]
mov esi, dword [edx + 0x18]
test cl, cl
je 0x44465a
nop dword [eax]
movsx eax, cl
sub eax, 0x7b
je 0x444622
sub eax, 2
je 0x444652
mov byte [esi], cl
inc esi
jmp 0x444652
lea edi, [ebx + 1]
push 0x7d
push edi
call fcn.004b87b6
mov edx, eax
add esp, 8
test edx, edx
je 0x444652
cmp edx, edi
jne 0x444644
cmp byte [edx + 1], 0x7d
lea ecx, [edx + 1]
cmove edx, ecx
lea eax, [ebx + 2]
cmp edx, eax
jne 0x444650
mov al, byte [edi]
mov byte [esi], al
inc esi
mov ebx, edx
mov cl, byte [ebx + 1]
inc ebx
test cl, cl
jne 0x444610
pop edi
mov byte [esi], 0
mov eax, 1
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
mov al, byte [esp + 0x30]
test al, al
je 0x444696
cmp dword [edx + 0x1c], 0
je 0x44468f
mov eax, dword [edx + 0x18]
pop edi
pop esi
pop ebp
mov byte [eax], 0
mov eax, 1
pop ebx
add esp, 0x18
ret 0x10
mov dword [edx + 0x18], 0x4d5231
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret 0x10