Function at 0x42c8c0
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x1c
mov dh, byte [esp + 0x24]
mov eax, ecx
push ebx
push ebp
push esi
push edi
xor edi, edi
mov dword [esp + 0x28], eax
xor esi, esi
mov dword [esp + 0x14], edi
xor ecx, ecx
mov dword [esp + 0x20], esi
mov word [esp + 0x1a], cx
test dh, dh
je 0x42c8f1
cmp byte [eax + 0x44], cl
je 0x42c8f1
mov dl, 1
jmp 0x42c8f3
xor dl, dl
mov ebx, dword [esp + 0x30]
lea ecx, [eax + 0x54]
mov dword [esp + 0x24], ecx
mov ebp, ebx
lea ecx, [eax + 0x154]
mov byte [esp + 0x11], dl
mov dword [esp + 0x1c], ecx
cmp word [ebx], si
je 0x42cc62
mov bh, byte [esp + 0x38]
mov bl, byte [esp + 0x34]
nop
xor eax, eax
mov word [esp + 0x18], ax
movzx ecx, word [ebp]
mov eax, ecx
sub eax, 0x7b
je 0x42c975
sub eax, 2
je 0x42c9b1
test dl, dl
je 0x42c942
inc esi
mov dword [esp + 0x20], esi
jmp 0x42c9b1
push 0
mov word [esp + 0x1c], cx
mov byte [esp + 0x16], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [esp + 0x1e]
lea ecx, [esp + 0x24]
call fcn.00413120
mov dh, al
add esp, 0xc
mov byte [esp + 0x38], dh
xor bl, bl
jmp 0x42cb35
lea edi, [ebp + 2]
push 0x7d
push edi
call fcn.0049515e
mov esi, eax
add esp, 8
test esi, esi
je 0x42c9a5
mov ecx, esi
sub ecx, ebp
sar ecx, 1
sub ecx, 1
jne 0x42ca22
add esi, 2
cmp word [esi], 0x7d
je 0x42ca27
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
mov dl, byte [esp + 0x11]
add ebp, 2
cmp word [ebp], 0
jne 0x42c920
mov ebx, dword [esp + 0x30]
test esi, esi
je 0x42cc5a
mov edi, dword [esp + 0x28]
mov eax, dword [edi + 0x1c]
cmp esi, eax
jbe 0x42cbe1
test eax, eax
je 0x42c9e9
push dword [edi + 0x18]
call fcn.00497f48
add esp, 4
lea eax, [esi*2 + 2]
push eax
call fcn.00497ab4
add esp, 4
mov dword [edi + 0x18], eax
test eax, eax
jne 0x42cbde
push 0x4b431c
push str.Out_of_memory.
mov ecx, 0x4dcd68
call fcn.00428f20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x10
cmp ecx, 1
jne 0x42ca49
mov dl, byte [esp + 0x11]
test dl, dl
je 0x42ca41
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
inc esi
mov dword [esp + 0x20], esi
jmp 0x42c9b1
mov ax, word [edi]
mov word [esp + 0x18], ax
xor eax, eax
push eax
mov word [esi], ax
mov byte [esp + 0x17], al
mov byte [esp + 0x16], al
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [esp + 0x1e]
mov ecx, edi
call fcn.00413120
add esp, 0xc
mov byte [esp + 0x38], al
test al, al
je 0x42cb11
movzx eax, word [edi]
mov edi, eax
test eax, 0xffffff80
je 0x42ca8b
xor eax, eax
jmp 0x42ca94
push eax
call fcn.00498650
add esp, 4
mov ecx, edi
and ecx, 0xffdf
test eax, eax
movzx edx, cx
mov ecx, edi
cmove edx, ecx
cmp dx, 0x56
jne 0x42cae6
movzx eax, word [ebp + 4]
mov edi, eax
test eax, 0xffffff80
je 0x42cabd
xor eax, eax
jmp 0x42cac6
push eax
call fcn.00498650
add esp, 4
mov ecx, edi
and ecx, 0xffdf
test eax, eax
movzx edx, cx
mov ecx, edi
cmove edx, ecx
cmp dx, 0x4b
jne 0x42cae6
mov edi, dword [esp + 0x14]
mov bl, 1
jmp 0x42cb23
mov cl, byte [esp + 0x38]
mov dl, 1
xor bl, bl
call fcn.00413780
movzx edi, ax
mov dword [esp + 0x14], edi
test di, di
je 0x42cb23
xor edi, 0x100
xor dh, dh
mov dword [esp + 0x14], edi
mov byte [esp + 0x38], dh
jmp 0x42cb27
lea edx, [esp + 0x13]
mov ecx, edi
call fcn.00413030
movzx edi, ax
mov dword [esp + 0x14], edi
mov dh, byte [esp + 0x38]
mov eax, 0x7d
mov ebp, esi
mov word [esi], ax
mov esi, dword [esp + 0x20]
test dh, dh
je 0x42cb6f
cmp word [esp + 0x18], 0
je 0x42cb9d
cmp byte [esp + 0x34], 0
je 0x42cb9d
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x42cb99
movzx eax, byte [esp + 0x38]
mov ecx, dword [esp + 0x24]
add ecx, eax
mov al, byte [esp + 0x12]
and al, 0x30
neg al
sbb al, al
add al, 2
or byte [ecx], al
mov edx, dword [esp + 0x1c]
test di, di
jne 0x42cb83
cmp byte [esp + 0x13], 0
je 0x42c9ad
movzx ecx, di
mov al, bh
not al
and al, byte [ecx + edx]
or al, byte [esp + 0x3c]
mov byte [ecx + edx], al
jmp 0x42c9ad
mov dh, byte [esp + 0x38]
mov ecx, dword [esp + 0x24]
mov dl, bh
movzx eax, dh
not dl
add ecx, eax
mov byte [esp + 0x38], dl
mov al, byte [ecx]
and al, dl
or al, byte [esp + 0x3c]
mov byte [ecx], al
test bh, bh
je 0x42cb6f
test bl, bl
jne 0x42cb6f
xor dl, dl
mov cl, dh
call fcn.00413780
mov edx, dword [esp + 0x1c]
movzx eax, ax
test ax, ax
je 0x42cb73
mov cl, byte [esp + 0x38]
and byte [eax + edx], cl
jmp 0x42cb73
mov dword [edi + 0x1c], esi
movzx eax, word [ebx]
mov esi, dword [edi + 0x18]
test ax, ax
je 0x42cc46
mov ecx, eax
nop
movzx eax, cx
sub eax, 0x7b
je 0x42cc05
sub eax, 2
je 0x42cc38
mov word [esi], cx
add esi, 2
jmp 0x42cc38
lea edi, [ebx + 2]
push 0x7d
push edi
call fcn.0049515e
add esp, 8
test eax, eax
je 0x42cc38
cmp eax, edi
jne 0x42cc26
cmp word [eax + 2], 0x7d
lea ecx, [eax + 2]
cmove eax, ecx
lea ecx, [ebx + 4]
cmp eax, ecx
jne 0x42cc36
mov cx, word [edi]
mov word [esi], cx
add esi, 2
mov ebx, eax
movzx eax, word [ebx + 2]
add ebx, 2
mov ecx, eax
test ax, ax
jne 0x42cbf0
xor eax, eax
mov word [esi], ax
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x10
mov eax, dword [esp + 0x28]
mov dh, byte [esp + 0x34]
test dh, dh
je 0x42cc88
cmp dword [eax + 0x1c], 0
je 0x42cc81
mov eax, dword [eax + 0x18]
xor ecx, ecx
mov word [eax], cx
lea eax, [ecx + 1]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x10
mov dword [eax + 0x18], 0x4b431c
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1c
ret 0x10