Function at 0x443d00
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0x18
push ebx
push ebp
xor eax, eax
mov edx, ecx
push esi
mov word [esp + 0x1a], ax
xor esi, esi
mov al, byte [esp + 0x2c]
push edi
xor edi, edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x18], esi
mov dword [esp + 0x20], edi
test al, al
je 0x443d33
cmp byte [edx + 0x45], 0
mov byte [esp + 0x15], 1
jne 0x443d38
mov byte [esp + 0x15], 0
mov ebx, dword [esp + 0x2c]
mov ebp, ebx
cmp word [ebx], si
je 0x4440ab
mov ebx, ecx
nop dword [eax]
xor eax, eax
mov word [esp + 0x1c], ax
movzx ecx, word [ebp]
mov eax, ecx
sub eax, 0x7b
je 0x443da6
sub eax, 2
je 0x443ddf
cmp byte [esp + 0x15], 0
je 0x443d75
inc edi
mov dword [esp + 0x20], edi
jmp 0x443ddf
push 0
mov word [esp + 0x20], cx
mov byte [esp + 0x18], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [esp + 0x20]
lea ecx, [esp + 0x28]
call fcn.004162a0
mov dh, al
add esp, 0xc
mov byte [esp + 0x13], dh
jmp 0x443f7a
lea esi, [ebp + 2]
push 0x7d
push esi
call dword [sym.imp.VCRUNTIME140.dll_wcschr]
mov edi, eax
add esp, 8
test edi, edi
je 0x443dd7
mov ecx, edi
sub ecx, ebp
sar ecx, 1
sub ecx, 1
jne 0x443e56
add edi, 2
cmp word [edi], 0x7d
je 0x443e5b
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
add ebp, 2
cmp word [ebp], 0
jne 0x443d50
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
test edi, edi
je 0x4440a7
mov eax, dword [edx + 0x1c]
cmp edi, eax
jbe 0x44402d
test eax, eax
je 0x443e18
push dword [edx + 0x18]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
lea eax, [edi*2 + 2]
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 0x44402a
push 0x4bfba0
push str.Out_of_memory.
mov ecx, 0x4eb958
call fcn.0043ec50
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
cmp ecx, 1
jne 0x443e78
cmp byte [esp + 0x15], 0
je 0x443e70
mov edi, dword [esp + 0x20]
inc edi
mov dword [esp + 0x20], edi
jmp 0x443ddb
mov ax, word [esi]
mov word [esp + 0x1c], ax
xor eax, eax
push eax
mov word [edi], ax
mov byte [esp + 0x1b], al
mov byte [esp + 0x18], al
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [esp + 0x20]
mov ecx, esi
call fcn.004162a0
add esp, 0xc
mov byte [esp + 0x13], al
test al, al
je 0x443f50
movzx eax, word [esi]
mov esi, eax
test eax, 0xffffff80
je 0x443eba
xor eax, eax
jmp 0x443ec6
push 2
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
add esp, 8
mov ecx, esi
and ecx, 0xffdf
test eax, eax
movzx edx, cx
mov ecx, esi
cmove edx, ecx
cmp dx, 0x56
jne 0x443f17
movzx eax, word [ebp + 4]
mov esi, eax
test eax, 0xffffff80
je 0x443eef
xor eax, eax
jmp 0x443efb
push 2
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
add esp, 8
mov ecx, esi
and ecx, 0xffdf
test eax, eax
movzx edx, cx
mov ecx, esi
cmove edx, ecx
cmp dx, 0x4b
jne 0x443f17
mov al, 1
jmp 0x443f19
xor al, al
cmp dword [ebx + 8], 0
mov byte [esp + 0x16], al
je 0x443f64
test al, al
jne 0x443f64
mov cl, byte [esp + 0x13]
mov dl, 1
call fcn.00416870
movzx esi, ax
mov dword [esp + 0x18], esi
test si, si
je 0x443f68
xor esi, 0x100
xor dh, dh
mov dword [esp + 0x18], esi
mov byte [esp + 0x13], dh
jmp 0x443f6c
lea edx, [esp + 0x17]
mov ecx, esi
call fcn.004161b0
movzx esi, ax
mov dword [esp + 0x18], esi
jmp 0x443f68
mov esi, dword [esp + 0x18]
mov dh, byte [esp + 0x13]
mov eax, 0x7d
mov ebp, edi
mov word [edi], ax
mov edi, dword [esp + 0x20]
test dh, dh
je 0x443ff8
cmp word [esp + 0x1c], 0
je 0x443fb6
cmp byte [esp + 0x30], 0
je 0x443fb6
push dword [esp + 0x1c]
call dword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x443fb2
mov al, byte [esp + 0x14]
movzx ecx, byte [esp + 0x13]
and al, 0x30
neg al
sbb al, al
add al, 2
or byte [ecx + ebx + 0x54], al
jmp 0x443ff8
mov dh, byte [esp + 0x13]
mov dl, byte [esp + 0x34]
movzx ecx, dh
mov al, dl
not al
mov byte [esp + 0x14], al
and al, byte [ecx + ebx + 0x54]
or al, byte [esp + 0x38]
mov byte [ecx + ebx + 0x54], al
test dl, dl
je 0x443ffc
cmp byte [esp + 0x16], 0
jne 0x443ffc
xor dl, dl
mov cl, dh
call fcn.00416870
movzx eax, ax
test ax, ax
je 0x443ff8
mov cl, byte [esp + 0x14]
and byte [eax + ebx + 0x154], cl
mov dl, byte [esp + 0x34]
test si, si
jne 0x44400c
cmp byte [esp + 0x17], 0
je 0x443ddf
movzx ecx, si
mov al, dl
not al
and al, byte [ecx + ebx + 0x154]
or al, byte [esp + 0x38]
mov byte [ecx + ebx + 0x154], al
jmp 0x443ddf
mov dword [edx + 0x1c], edi
movzx eax, word [ebx]
mov esi, dword [edx + 0x18]
test ax, ax
je 0x444093
mov ebp, dword [sym.imp.VCRUNTIME140.dll_wcschr]
mov ecx, eax
movzx eax, cx
sub eax, 0x7b
je 0x444055
sub eax, 2
je 0x444085
mov word [esi], cx
add esi, 2
jmp 0x444085
lea edi, [ebx + 2]
push 0x7d
push edi
call ebp
add esp, 8
test eax, eax
je 0x444085
cmp eax, edi
jne 0x444073
cmp word [eax + 2], 0x7d
lea ecx, [eax + 2]
cmove eax, ecx
lea ecx, [ebx + 4]
cmp eax, ecx
jne 0x444083
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 0x444040
xor eax, eax
pop edi
mov word [esi], ax
mov eax, 1
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
mov al, byte [esp + 0x30]
test al, al
je 0x4440d1
cmp dword [edx + 0x1c], 0
je 0x4440ca
mov eax, dword [edx + 0x18]
xor ecx, ecx
pop edi
pop esi
pop ebp
mov word [eax], cx
lea eax, [ecx + 1]
pop ebx
add esp, 0x18
ret 0x10
mov dword [edx + 0x18], 0x4bfba0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret 0x10