Function at 0x431430
Capabilities:
Get keyboard layout

Disassembly:
mov eax, 0x44a0
call fcn.0048d590
mov eax, dword [0x4a5c10]
push ebx
push ebp
mov ebp, dword [esp + 0x44ac]
push esi
xor esi, esi
push edi
mov dword [esp + 0x24], eax
cmp eax, esi
jne 0x431480
cmp dword [0x4a7c88], 1
mov dword [0x4a7c88], esi
sete al
test al, al
sete al
movzx ecx, al
push ecx
push ebp
call fcn.0042c960
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44a0
ret 4
mov edx, dword [0x4a5bc4]
mov ebx, dword [0x4a5bcc]
mov edi, dword [0x4a5bc8]
push 0xff
lea eax, [esp + 0x1b5]
push esi
push eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x34], ebx
mov dword [0x4a7c88], esi
mov byte [esp + 0x1bc], 0
call fcn.0048a290
add esp, 0xc
push 0x1ff
lea ecx, [esp + 0x2b5]
push esi
push ecx
mov byte [esp + 0x2bc], 0
call fcn.0048a290
add esp, 0xc
mov byte [esp + 0x15], 0
cmp byte [edi], 0
je 0x43160a
mov byte [esp + 0x14], 0
mov cl, byte [edi]
movsx eax, cl
sub eax, 0x7b
je 0x431530
sub eax, 2
je 0x4315f5
push 0
mov byte [esp + 0x18], cl
mov byte [esp + 0x17], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push 1
mov ecx, eax
push 1
lea edx, [esp + 0x1b]
lea eax, [esp + 0x1c]
call fcn.004116d0
add esp, 8
mov bl, al
jmp 0x4315ba
lea eax, [edi + 1]
push 0x7d
push eax
mov dword [esp + 0x34], eax
call fcn.00481f21
mov esi, eax
add esp, 8
test esi, esi
je 0x4315f5
mov ebp, esi
sub ebp, edi
dec ebp
jne 0x431563
cmp byte [esi + 1], 0x7d
jne 0x4315f5
inc esi
mov ebp, 1
push 0
mov byte [esi], 0
mov byte [esp + 0x17], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov edi, dword [esp + 0x2c]
push 1
mov ecx, eax
push 1
lea edx, [esp + 0x1b]
mov eax, edi
call fcn.004116d0
mov bl, al
add esp, 8
test bl, bl
je 0x43159e
cmp ebp, 1
jne 0x4315b5
mov dl, byte [edi]
mov byte [esp + 0x14], dl
jmp 0x4315b5
mov eax, edi
call fcn.00411630
movzx eax, ax
test ax, ax
je 0x4315b5
mov byte [esp + eax + 0x2b0], 1
mov byte [esi], 0x7d
mov edi, esi
test bl, bl
je 0x4315f5
movzx esi, bl
or byte [esp + esi + 0x1b0], 1
cmp byte [esp + 0x14], 0
lea esi, [esp + esi + 0x1b0]
je 0x4315f5
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x4315f5
test byte [esp + 0x13], 0x30
je 0x4315f2
or byte [esi], 2
jmp 0x4315f5
or byte [esi], 4
inc edi
cmp byte [edi], 0
jne 0x4314ea
mov ebp, dword [esp + 0x44b4]
mov ebx, dword [esp + 0x28]
xor esi, esi
mov dword [0x4a7ca0], esi
cmp byte [ebx], 0
je 0x431787
cmp dword [0x4a7c9c], esi
jne 0x431643
push 0x1000
call fcn.00481109
add esp, 4
mov dword [0x4a7c9c], eax
cmp eax, esi
je 0x43169e
mov dword [0x4a7ca4], 0x400
mov edi, 3
mov ecx, ebp
call fcn.0041f250
inc eax
cmp eax, dword [0x4a7cac]
jbe 0x4316bd
mov dword [0x4a7cac], eax
cmp eax, 0x1000
ja 0x43166e
mov dword [0x4a7cac], 0x1000
mov eax, dword [0x4a7ca8]
cmp eax, esi
je 0x431680
push eax
call fcn.00480f68
add esp, 4
mov edx, dword [0x4a7cac]
push edx
call fcn.00481109
add esp, 4
mov dword [0x4a7ca8], eax
cmp eax, esi
jne 0x4316c2
mov dword [0x4a7cac], esi
push 0x4947f9
push esi
push str.Out_of_memory.
mov ecx, ebp
call fcn.0042cb30
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44a0
ret 4
mov eax, dword [0x4a7ca8]
mov ecx, dword [0x4a7ca0]
mov edx, dword [0x4a7c9c]
mov dword [edx + ecx*4], eax
cmp byte [ebx], 0
mov esi, dword [0x4a7ca8]
mov edi, ebx
je 0x43176a
mov al, byte [edi]
cmp al, 0x2c
je 0x4316ed
mov byte [esi], al
inc esi
jmp 0x431760
cmp byte [edi + 1], 0x2c
jne 0x4316fa
mov byte [esi], 0x2c
inc esi
inc edi
jmp 0x431760
mov byte [esi], 0
mov ecx, dword [0x4a7c9c]
mov eax, dword [0x4a7ca0]
mov edx, dword [ecx + eax*4]
cmp byte [edx], 0
je 0x431728
inc eax
mov dword [0x4a7ca0], eax
inc esi
mov dword [ecx + eax*4], esi
mov byte [esi], 0
mov eax, dword [0x4a7ca0]
mov ecx, dword [0x4a7c9c]
cmp byte [edi + 1], 0
je 0x431760
mov edx, dword [0x4a7ca4]
cmp eax, edx
jb 0x431760
lea eax, [edx*4 + 0x1000]
push eax
push ecx
call fcn.004824d7
add esp, 8
test eax, eax
je 0x43185d
add dword [0x4a7ca4], 0x400
mov dword [0x4a7c9c], eax
inc edi
cmp byte [edi], 0
jne 0x4316e2
mov byte [esi], 0
mov ecx, dword [0x4a7c9c]
mov edx, dword [0x4a7ca0]
mov eax, dword [ecx + edx*4]
cmp byte [eax], 0
je 0x431787
inc dword [0x4a7ca0]
cmp byte [0x4a5dc4], 0
je 0x4317c5
mov ecx, dword [0x4a5c70]
push 0xc
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x4317aa
mov byte [0x4a5dc4], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x4317c5
push 1
push 0xffffffffffffffff
call fcn.00401280
add esp, 8
mov ebx, 0x3fff
push ebx
xor ebp, ebp
lea edx, [esp + 0x4b5]
push ebp
push edx
mov dword [0x4a7cb0], 1
mov word [0x4a7cb4], 0
mov byte [esp + 0x4bc], 0
call fcn.0048a290
mov edi, dword [esp + 0x24]
lea eax, [esp + 0x4bc]
add esp, 0xc
mov dword [0x4a7cb8], eax
mov dword [0x4a7cbc], ebp
mov dword [0x4a7cc0], ebx
cmp byte [edi], 0
je 0x431927
inc edi
nop
movzx esi, byte [edi - 1]
test esi, 0xffffff80
jne 0x43183e
push 2
push esi
call fcn.0048246e
add esp, 8
test eax, eax
je 0x43183e
and esi, 0xffffffdf
mov eax, esi
movsx eax, al
add eax, 0xffffffd6
cmp eax, 0x2c
ja case.0x431856.43
movzx ecx, byte [eax + 0x431c04]
jmp dword [ecx*4 + 0x431be0]
push 0x4947f9
push 0
push str.Out_of_memory.
mov ecx, ebp
call fcn.0042cb30
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44a0
ret 4
mov byte [0x4a7cb0], 0
jmp case.0x431856.43
mov byte [0x4a7cb1], 1
jmp case.0x431856.43
mov byte [0x4a7cb2], 1
jmp case.0x431856.43
mov byte [0x4a7cb3], 1
jmp case.0x431856.43
push edi
call fcn.004824b6
add esp, 4
mov dword [0x4a7cc0], eax
cmp eax, ebx
jle case.0x431856.43
mov dword [0x4a7cc0], ebx
jmp case.0x431856.43
mov eax, edi
call fcn.0040c820
test al, al
je 0x4318f4
push 0x10
push 0
push edi
call fcn.00482c7f
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
fild qword [esp + 0x24]
add esp, 0xc
fmul qword [0x49c628]
call fcn.0048f780
mov ebp, eax
jmp case.0x431856.43
push edi
call fcn.00482d81
fmul qword [0x49c628]
add esp, 4
call fcn.0048f780
mov ebp, eax
jmp case.0x431856.43
mov byte [0x4a7cb4], 1
jmp case.0x431856.43
mov byte [0x4a7cb5], 1
inc edi
cmp byte [edi - 1], 0
jne 0x431820
or byte [0x4a6581], 1
cmp dword [0x4a5da0], 0
lea edx, [esp + 0x1b0]
lea eax, [esp + 0x2b0]
mov dword [0x4a7c8c], edx
mov dword [0x4a7c90], eax
mov dword [0x4a7c88], 1
mov byte [0x4a5d93], 1
jne 0x431973
mov ecx, dword [0x4a352c]
movzx edx, word [ecx]
push edx
call fcn.004079d0
add esp, 4
test ebp, ebp
jle 0x4319b0
cmp byte [0x4a5dc4], 0
jne 0x4319b0
mov eax, 0xa
cmp ebp, 0xa
jl 0x43198c
mov eax, ebp
push 0x4033c0
push eax
mov eax, dword [0x4a5c70]
push 0xc
push eax
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne cl
mov byte [0x4a5dc4], cl
jmp 0x4319b0
push 1
push 0x8000012f
call fcn.00401280
mov eax, dword [0x4a7c88]
add esp, 8
cmp eax, 1
je 0x4319b0
add eax, 0xfffffffe
cmp eax, 3
ja case.default.0x4319d5
jmp dword [eax*4 + 0x431c34]
push 1
push 0
push 0xffffffffffffffff
push str.Timeout
jmp 0x431b68
mov eax, dword [0x4a6474]
push 1
push 0
push 0xffffffffffffffff
push str.Match
push eax
jmp 0x431b6f
mov ecx, dword [str.EndKey:]
mov edx, dword [0x499594]
push 0x78
lea eax, [esp + 0x3c]
push 0
push eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edx
call fcn.0048a290
add esp, 0xc
cmp byte [0x4a7c99], 0
je 0x431abd
push 0xff
lea ecx, [esp + 0xb5]
push 0
push ecx
mov byte [esp + 0xbc], 0
call fcn.0048a290
or byte [esp + 0xcc], 0x80
add esp, 0xc
call dword [sym.imp.USER32.dll_GetForegroundWindow]
test eax, eax
je 0x431a70
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x431a72
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
xor edx, edx
cmp dword [0x4a5dfc], edx
push eax
setne dl
lea eax, [esp + 0x3b]
lea ecx, [esp + 0xb4]
xor bl, bl
push edx
movzx edx, byte [0x4a7c94]
push eax
push ecx
push edx
call fcn.00411b10
movzx ecx, byte [0x4a7c94]
movzx eax, ax
add esp, 4
push eax
push ecx
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov byte [esp + eax + 0x37], bl
jmp 0x431b36
cmp byte [0x4a7c98], 0
je 0x431b1d
mov cx, word [0x4a7c96]
xor eax, eax
nop
cmp word [eax*8 + 0x4a34c4], cx
je 0x431afc
inc eax
cmp eax, 0xd
jl 0x431ad0
movzx ecx, cx
push ecx
push str.sc_03X
mov esi, 0x79
lea edi, [esp + 0x3f]
call fcn.0046e530
add esp, 8
jmp 0x431b36
mov edx, dword [eax*8 + 0x4a34c0]
push 0x78
push edx
lea eax, [esp + 0x3f]
push eax
call fcn.00483d90
add esp, 0xc
mov byte [esp + 0xaf], 0
jmp 0x431b36
mov bl, byte [0x4a7c94]
push 1
mov eax, 0x79
lea ecx, [esp + 0x3b]
call fcn.004115b0
add esp, 4
mov eax, dword [0x4a6474]
push 1
push 0
push 0xffffffffffffffff
lea edx, [esp + 0x3c]
push edx
push eax
jmp 0x431b6f
mov ecx, dword [0x4a6474]
push 1
push 0
push 0xffffffffffffffff
push 0x499598
push ecx
jmp 0x431b6f
push 1
push 0
push 0xffffffffffffffff
push str.NewInput
mov edx, dword [0x4a6474]
push edx
call fcn.00471040
cmp byte [0x4a5dc4], 0
mov dword [0x4a7c88], 0
je 0x431bbb
mov eax, dword [0x4a5c70]
push 0xc
push eax
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x431ba0
mov byte [0x4a5dc4], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x431bbb
push 1
push 0xffffffffffffffff
call fcn.00401280
add esp, 8
mov edx, dword [esp + 0x24]
push 1
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x4bc]
push ecx
push edx
call fcn.00471040
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44a0
ret 4