Function at 0x444400
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 0x444430
cmp byte [edx + 0x45], 0
je 0x444430
mov ch, 1
jmp 0x444432
xor ch, ch
mov ebx, dword [esp + 0x2c]
mov ebp, ebx
mov byte [esp + 0x14], ch
cmp byte [ebx], 0
je 0x444793
mov ebx, edx
nop word [eax + eax]
mov byte [esp + 0x1c], 0
mov cl, byte [ebp]
movsx eax, cl
sub eax, 0x7b
je 0x4444a0
sub eax, 2
je 0x4444d8
test ch, ch
je 0x444470
inc edi
mov dword [esp + 0x20], edi
jmp 0x4444d8
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.00415d30
mov dh, al
add esp, 0xc
mov byte [esp + 0x13], dh
jmp 0x444673
lea esi, [ebp + 1]
push 0x7d
push esi
call dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbschr]
mov edi, eax
add esp, 8
test edi, edi
je 0x4444cc
mov ecx, edi
sub ecx, ebp
sub ecx, 1
jne 0x444548
inc edi
cmp byte [edi], 0x7d
je 0x44454d
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
mov ch, byte [esp + 0x14]
inc ebp
cmp byte [ebp], 0
jne 0x444450
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
test edi, edi
je 0x44478f
mov eax, dword [edx + 0x1c]
cmp edi, eax
jbe 0x444727
test eax, eax
je 0x44450e
push dword [edx + 0x18]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
lea eax, [edi + 1]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edx, dword [esp + 0x28]
add esp, 4
mov dword [edx + 0x18], eax
test eax, eax
jne 0x444724
push 0x4b6ba9
push str.Out_of_memory.
mov ecx, 0x4cc848
call fcn.0043ee10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
cmp ecx, 1
jne 0x44456d
mov ch, byte [esp + 0x14]
test ch, ch
je 0x444567
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
inc edi
mov dword [esp + 0x20], edi
jmp 0x4444d8
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.00415d30
add esp, 0xc
mov byte [esp + 0x13], al
test al, al
je 0x44464e
mov ch, byte [esi]
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
movzx eax, ch
mov byte [esp + 0x16], ch
test eax, 0xffffff80
je 0x4445ba
xor eax, eax
jmp 0x4445c6
push 2
push eax
call esi
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 0x444615
mov ch, byte [ebp + 2]
movzx eax, ch
mov byte [esp + 0x16], ch
test eax, 0xffffff80
je 0x4445f0
xor eax, eax
jmp 0x4445fc
push 2
push eax
call esi
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 0x444615
mov al, 1
jmp 0x444617
xor al, al
cmp dword [ebx + 8], 0
mov byte [esp + 0x16], al
je 0x444662
test al, al
jne 0x444662
mov cl, byte [esp + 0x13]
mov dl, 1
call fcn.004162f0
movzx esi, ax
mov dword [esp + 0x18], esi
test si, si
je 0x444666
xor esi, 0x100
xor dh, dh
mov dword [esp + 0x18], esi
mov byte [esp + 0x13], dh
jmp 0x44466a
lea edx, [esp + 0x17]
mov ecx, esi
call fcn.00415c40
movzx esi, ax
mov dword [esp + 0x18], esi
jmp 0x444666
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 0x4446f4
cmp byte [esp + 0x1c], 0
je 0x4446b1
cmp byte [esp + 0x30], 0
je 0x4446b1
push dword [esp + 0x1c]
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x4446ad
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 0x4446f4
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 0x4446f8
cmp byte [esp + 0x16], 0
jne 0x4446f8
xor dl, dl
mov cl, dh
call fcn.004162f0
movzx eax, ax
test ax, ax
je 0x4446f4
mov cl, byte [esp + 0x15]
and byte [eax + ebx + 0x154], cl
mov dl, byte [esp + 0x34]
test si, si
jne 0x444708
cmp byte [esp + 0x17], 0
je 0x4444d4
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 0x4444d4
mov dword [edx + 0x1c], edi
mov cl, byte [ebx]
mov esi, dword [edx + 0x18]
test cl, cl
je 0x44477d
mov ebp, dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbschr]
movsx eax, cl
sub eax, 0x7b
je 0x444748
sub eax, 2
je 0x444775
mov byte [esi], cl
inc esi
jmp 0x444775
lea edi, [ebx + 1]
push 0x7d
push edi
call ebp
mov edx, eax
add esp, 8
test edx, edx
je 0x444775
cmp edx, edi
jne 0x444767
cmp byte [edx + 1], 0x7d
lea ecx, [edx + 1]
cmove edx, ecx
lea eax, [ebx + 2]
cmp edx, eax
jne 0x444773
mov al, byte [edi]
mov byte [esi], al
inc esi
mov ebx, edx
mov cl, byte [ebx + 1]
inc ebx
test cl, cl
jne 0x444736
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 0x4447b9
cmp dword [edx + 0x1c], 0
je 0x4447b2
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], 0x4b6ba9
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret 0x10