Function at 0x4311d0
Capabilities:
Get keyboard layout

Disassembly:
mov eax, 0x44a0
call fcn.0048b740
mov eax, dword [0x4a2b90]
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 0x431220
cmp dword [0x4a4c04], 1
mov dword [0x4a4c04], esi
sete al
test al, al
sete al
movzx ecx, al
push ecx
push ebp
call fcn.0042cb00
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44a0
ret 4
mov edx, dword [0x4a2b44]
mov ebx, dword [0x4a2b4c]
mov edi, dword [0x4a2b48]
push 0xff
lea eax, [esp + 0x1b5]
push esi
push eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x34], ebx
mov dword [0x4a4c04], esi
mov byte [esp + 0x1bc], 0
call fcn.00488440
add esp, 0xc
push 0x1ff
lea ecx, [esp + 0x2b5]
push esi
push ecx
mov byte [esp + 0x2bc], 0
call fcn.00488440
add esp, 0xc
mov byte [esp + 0x15], 0
cmp byte [edi], 0
je 0x4313aa
mov byte [esp + 0x14], 0
mov cl, byte [edi]
movsx eax, cl
sub eax, 0x7b
je 0x4312d0
sub eax, 2
je 0x431395
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 0x43135a
lea eax, [edi + 1]
push 0x7d
push eax
mov dword [esp + 0x34], eax
call fcn.004800d1
mov esi, eax
add esp, 8
test esi, esi
je 0x431395
mov ebp, esi
sub ebp, edi
dec ebp
jne 0x431303
cmp byte [esi + 1], 0x7d
jne 0x431395
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 0x43133e
cmp ebp, 1
jne 0x431355
mov dl, byte [edi]
mov byte [esp + 0x14], dl
jmp 0x431355
mov eax, edi
call fcn.00411630
movzx eax, ax
test ax, ax
je 0x431355
mov byte [esp + eax + 0x2b0], 1
mov byte [esi], 0x7d
mov edi, esi
test bl, bl
je 0x431395
movzx esi, bl
or byte [esp + esi + 0x1b0], 1
cmp byte [esp + 0x14], 0
lea esi, [esp + esi + 0x1b0]
je 0x431395
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x431395
test byte [esp + 0x13], 0x30
je 0x431392
or byte [esi], 2
jmp 0x431395
or byte [esi], 4
inc edi
cmp byte [edi], 0
jne 0x43128a
mov ebp, dword [esp + 0x44b4]
mov ebx, dword [esp + 0x28]
xor esi, esi
mov dword [0x4a4c1c], esi
cmp byte [ebx], 0
je 0x431527
cmp dword [0x4a4c18], esi
jne 0x4313e3
push 0x1000
call fcn.0047f2b9
add esp, 4
mov dword [0x4a4c18], eax
cmp eax, esi
je 0x43143e
mov dword [0x4a4c20], 0x400
mov edi, 3
mov ecx, ebp
call fcn.0041f3b0
inc eax
cmp eax, dword [0x4a4c28]
jbe 0x43145d
mov dword [0x4a4c28], eax
cmp eax, 0x1000
ja 0x43140e
mov dword [0x4a4c28], 0x1000
mov eax, dword [0x4a4c24]
cmp eax, esi
je 0x431420
push eax
call fcn.0047f118
add esp, 4
mov edx, dword [0x4a4c28]
push edx
call fcn.0047f2b9
add esp, 4
mov dword [0x4a4c24], eax
cmp eax, esi
jne 0x431462
mov dword [0x4a4c28], esi
push 0x49281e
push esi
push str.Out_of_memory.
mov ecx, ebp
call fcn.0042ccd0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44a0
ret 4
mov eax, dword [0x4a4c24]
mov ecx, dword [0x4a4c1c]
mov edx, dword [0x4a4c18]
mov dword [edx + ecx*4], eax
cmp byte [ebx], 0
mov esi, dword [0x4a4c24]
mov edi, ebx
je 0x43150a
mov al, byte [edi]
cmp al, 0x2c
je 0x43148d
mov byte [esi], al
inc esi
jmp 0x431500
cmp byte [edi + 1], 0x2c
jne 0x43149a
mov byte [esi], 0x2c
inc esi
inc edi
jmp 0x431500
mov byte [esi], 0
mov ecx, dword [0x4a4c18]
mov eax, dword [0x4a4c1c]
mov edx, dword [ecx + eax*4]
cmp byte [edx], 0
je 0x4314c8
inc eax
mov dword [0x4a4c1c], eax
inc esi
mov dword [ecx + eax*4], esi
mov byte [esi], 0
mov eax, dword [0x4a4c1c]
mov ecx, dword [0x4a4c18]
cmp byte [edi + 1], 0
je 0x431500
mov edx, dword [0x4a4c20]
cmp eax, edx
jb 0x431500
lea eax, [edx*4 + 0x1000]
push eax
push ecx
call fcn.00480687
add esp, 8
test eax, eax
je 0x4315fd
add dword [0x4a4c20], 0x400
mov dword [0x4a4c18], eax
inc edi
cmp byte [edi], 0
jne 0x431482
mov byte [esi], 0
mov ecx, dword [0x4a4c18]
mov edx, dword [0x4a4c1c]
mov eax, dword [ecx + edx*4]
cmp byte [eax], 0
je 0x431527
inc dword [0x4a4c1c]
cmp byte [0x4a2d44], 0
je 0x431565
mov ecx, dword [0x4a2bf0]
push 0xc
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x43154a
mov byte [0x4a2d44], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x431565
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 [0x4a4c2c], 1
mov word [0x4a4c30], 0
mov byte [esp + 0x4bc], 0
call fcn.00488440
mov edi, dword [esp + 0x24]
lea eax, [esp + 0x4bc]
add esp, 0xc
mov dword [0x4a4c34], eax
mov dword [0x4a4c38], ebp
mov dword [0x4a4c3c], ebx
cmp byte [edi], 0
je 0x4316c7
inc edi
nop
movzx esi, byte [edi - 1]
test esi, 0xffffff80
jne 0x4315de
push 2
push esi
call fcn.0048061e
add esp, 8
test eax, eax
je 0x4315de
and esi, 0xffffffdf
mov eax, esi
movsx eax, al
add eax, 0xffffffd6
cmp eax, 0x2c
ja case.0x4315f6.43
movzx ecx, byte [eax + 0x4319a4]
jmp dword [ecx*4 + 0x431980]
push 0x49281e
push 0
push str.Out_of_memory.
mov ecx, ebp
call fcn.0042ccd0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44a0
ret 4
mov byte [0x4a4c2c], 0
jmp case.0x4315f6.43
mov byte [0x4a4c2d], 1
jmp case.0x4315f6.43
mov byte [0x4a4c2e], 1
jmp case.0x4315f6.43
mov byte [0x4a4c2f], 1
jmp case.0x4315f6.43
push edi
call fcn.00480666
add esp, 4
mov dword [0x4a4c3c], eax
cmp eax, ebx
jle case.0x4315f6.43
mov dword [0x4a4c3c], ebx
jmp case.0x4315f6.43
mov eax, edi
call fcn.0040c820
test al, al
je 0x431694
push 0x10
push 0
push edi
call fcn.00480e2f
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
fild qword [esp + 0x24]
add esp, 0xc
fmul qword [0x49a478]
call fcn.0048d930
mov ebp, eax
jmp case.0x4315f6.43
push edi
call fcn.00480f31
fmul qword [0x49a478]
add esp, 4
call fcn.0048d930
mov ebp, eax
jmp case.0x4315f6.43
mov byte [0x4a4c30], 1
jmp case.0x4315f6.43
mov byte [0x4a4c31], 1
inc edi
cmp byte [edi - 1], 0
jne 0x4315c0
or byte [0x4a3501], 1
cmp dword [0x4a2d20], 0
lea edx, [esp + 0x1b0]
lea eax, [esp + 0x2b0]
mov dword [0x4a4c08], edx
mov dword [0x4a4c0c], eax
mov dword [0x4a4c04], 1
mov byte [0x4a2d13], 1
jne 0x431713
mov ecx, dword [0x4a052c]
movzx edx, word [ecx]
push edx
call fcn.004079d0
add esp, 4
test ebp, ebp
jle 0x431750
cmp byte [0x4a2d44], 0
jne 0x431750
mov eax, 0xa
cmp ebp, 0xa
jl 0x43172c
mov eax, ebp
push 0x4033c0
push eax
mov eax, dword [0x4a2bf0]
push 0xc
push eax
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne cl
mov byte [0x4a2d44], cl
jmp 0x431750
push 1
push 0x8000012f
call fcn.00401280
mov eax, dword [0x4a4c04]
add esp, 8
cmp eax, 1
je 0x431750
add eax, 0xfffffffe
cmp eax, 3
ja case.default.0x431775
jmp dword [eax*4 + 0x4319d4]
push 1
push 0
push 0xffffffffffffffff
push str.Timeout
jmp 0x431908
mov eax, dword [0x4a33f4]
push 1
push 0
push 0xffffffffffffffff
push str.Match
push eax
jmp 0x43190f
mov ecx, dword [str.EndKey:]
mov edx, dword [0x49748c]
push 0x78
lea eax, [esp + 0x3c]
push 0
push eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edx
call fcn.00488440
add esp, 0xc
cmp byte [0x4a4c15], 0
je 0x43185d
push 0xff
lea ecx, [esp + 0xb5]
push 0
push ecx
mov byte [esp + 0xbc], 0
call fcn.00488440
or byte [esp + 0xcc], 0x80
add esp, 0xc
call dword [sym.imp.USER32.dll_GetForegroundWindow]
test eax, eax
je 0x431810
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x431812
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
xor edx, edx
cmp dword [0x4a2d7c], edx
push eax
setne dl
lea eax, [esp + 0x3b]
lea ecx, [esp + 0xb4]
xor bl, bl
push edx
movzx edx, byte [0x4a4c10]
push eax
push ecx
push edx
call fcn.00411b10
movzx ecx, byte [0x4a4c10]
movzx eax, ax
add esp, 4
push eax
push ecx
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov byte [esp + eax + 0x37], bl
jmp 0x4318d6
cmp byte [0x4a4c14], 0
je 0x4318bd
mov cx, word [0x4a4c12]
xor eax, eax
nop
cmp word [eax*8 + 0x4a04c4], cx
je 0x43189c
inc eax
cmp eax, 0xd
jl 0x431870
movzx ecx, cx
push ecx
push str.sc_03X
mov esi, 0x79
lea edi, [esp + 0x3f]
call fcn.0046c770
add esp, 8
jmp 0x4318d6
mov edx, dword [eax*8 + 0x4a04c0]
push 0x78
push edx
lea eax, [esp + 0x3f]
push eax
call fcn.00481f40
add esp, 0xc
mov byte [esp + 0xaf], 0
jmp 0x4318d6
mov bl, byte [0x4a4c10]
push 1
mov eax, 0x79
lea ecx, [esp + 0x3b]
call fcn.004115b0
add esp, 4
mov eax, dword [0x4a33f4]
push 1
push 0
push 0xffffffffffffffff
lea edx, [esp + 0x3c]
push edx
push eax
jmp 0x43190f
mov ecx, dword [0x4a33f4]
push 1
push 0
push 0xffffffffffffffff
push 0x497490
push ecx
jmp 0x43190f
push 1
push 0
push 0xffffffffffffffff
push str.NewInput
mov edx, dword [0x4a33f4]
push edx
call fcn.0046f1f0
cmp byte [0x4a2d44], 0
mov dword [0x4a4c04], 0
je 0x43195b
mov eax, dword [0x4a2bf0]
push 0xc
push eax
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x431940
mov byte [0x4a2d44], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x43195b
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.0046f1f0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44a0
ret 4