Function at 0x452ed0
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 0x452f00
cmp byte [edx + 0x45], 0
je 0x452f00
mov ch, 1
jmp 0x452f02
xor ch, ch
mov ebx, dword [esp + 0x2c]
mov ebp, ebx
mov byte [esp + 0x14], ch
cmp byte [ebx], 0
je 0x453260
mov ebx, edx
nop word [eax + eax]
mov byte [esp + 0x1c], 0
mov cl, byte [ebp]
movsx eax, cl
sub eax, 0x7b
je 0x452f70
sub eax, 2
je 0x452fa3
test ch, ch
je 0x452f40
inc edi
mov dword [esp + 0x20], edi
jmp 0x452fa3
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.0041d8d0
mov dh, al
add esp, 0xc
mov byte [esp + 0x13], dh
jmp 0x45313c
lea esi, [ebp + 1]
push 0x7d
push esi
call fcn.004ca733
mov edi, eax
add esp, 8
test edi, edi
je 0x452f97
mov ecx, edi
sub ecx, ebp
sub ecx, 1
jne 0x453011
inc edi
cmp byte [edi], 0x7d
je 0x453016
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
mov ch, byte [esp + 0x14]
inc ebp
cmp byte [ebp], 0
jne 0x452f20
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
test edi, edi
je 0x45325c
mov eax, dword [edx + 0x1c]
cmp edi, eax
jbe 0x4531f0
test eax, eax
je 0x452fd8
push dword [edx + 0x18]
call fcn.004c4247
add esp, 4
lea eax, [edi + 1]
push eax
call fcn.004c4e35
mov edx, dword [esp + 0x28]
add esp, 4
mov dword [edx + 0x18], eax
test eax, eax
jne 0x4531ed
push 0x4e3371
push str.Out_of_memory.
mov ecx, 0x4fda88
call fcn.0044dd10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
cmp ecx, 1
jne 0x453036
mov ch, byte [esp + 0x14]
test ch, ch
je 0x453030
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x18]
inc edi
mov dword [esp + 0x20], edi
jmp 0x452fa3
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.0041d8d0
add esp, 0xc
mov byte [esp + 0x13], al
test al, al
je 0x453117
mov ch, byte [esi]
movzx eax, ch
mov byte [esp + 0x16], ch
test eax, 0xffffff80
je 0x45307d
xor eax, eax
jmp 0x45308c
push 2
push eax
call fcn.004c7451
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 0x4530de
mov ch, byte [ebp + 2]
movzx eax, ch
mov byte [esp + 0x16], ch
test eax, 0xffffff80
je 0x4530b6
xor eax, eax
jmp 0x4530c5
push 2
push eax
call fcn.004c7451
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 0x4530de
mov al, 1
jmp 0x4530e0
xor al, al
cmp dword [ebx + 8], 0
mov byte [esp + 0x16], al
je 0x45312b
test al, al
jne 0x45312b
mov cl, byte [esp + 0x13]
mov dl, 1
call fcn.0041de90
movzx esi, ax
mov dword [esp + 0x18], esi
test si, si
je 0x45312f
xor esi, 0x100
xor dh, dh
mov dword [esp + 0x18], esi
mov byte [esp + 0x13], dh
jmp 0x453133
lea edx, [esp + 0x17]
mov ecx, esi
call fcn.0041d7e0
movzx esi, ax
mov dword [esp + 0x18], esi
jmp 0x45312f
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 0x4531bd
cmp byte [esp + 0x1c], 0
je 0x45317a
cmp byte [esp + 0x30], 0
je 0x45317a
push dword [esp + 0x1c]
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x453176
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 0x4531bd
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 0x4531c1
cmp byte [esp + 0x16], 0
jne 0x4531c1
xor dl, dl
mov cl, dh
call fcn.0041de90
movzx eax, ax
test ax, ax
je 0x4531bd
mov cl, byte [esp + 0x15]
and byte [eax + ebx + 0x154], cl
mov dl, byte [esp + 0x34]
test si, si
jne 0x4531d1
cmp byte [esp + 0x17], 0
je 0x452f9f
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 0x452f9f
mov dword [edx + 0x1c], edi
mov cl, byte [ebx]
mov esi, dword [edx + 0x18]
test cl, cl
je 0x45324a
nop dword [eax]
movsx eax, cl
sub eax, 0x7b
je 0x453212
sub eax, 2
je 0x453242
mov byte [esi], cl
inc esi
jmp 0x453242
lea edi, [ebx + 1]
push 0x7d
push edi
call fcn.004ca733
mov edx, eax
add esp, 8
test edx, edx
je 0x453242
cmp edx, edi
jne 0x453234
cmp byte [edx + 1], 0x7d
lea ecx, [edx + 1]
cmove edx, ecx
lea eax, [ebx + 2]
cmp edx, eax
jne 0x453240
mov al, byte [edi]
mov byte [esi], al
inc esi
mov ebx, edx
mov cl, byte [ebx + 1]
inc ebx
test cl, cl
jne 0x453200
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 0x453286
cmp dword [edx + 0x1c], 0
je 0x45327f
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], 0x4e3371
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x18
ret 0x10