Function at 0x4311d0
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x449c
call fcn.0048af20
mov eax, dword [0x4a2bd0]
push ebx
push esi
push edi
xor edi, edi
mov dword [esp + 0x10], eax
cmp eax, edi
jne 0x43121d
cmp dword [0x4a4c48], 1
mov edx, dword [ebp + 8]
sete al
test al, al
sete al
movzx ecx, al
push ecx
push edx
mov dword [0x4a4c48], edi
call fcn.0042cad0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x4a2b84]
mov esi, dword [0x4a2b8c]
mov ebx, dword [0x4a2b88]
push 0xff
lea ecx, [esp + 0x1ad]
push edi
push ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], esi
mov dword [0x4a4c48], edi
mov byte [esp + 0x1b4], 0
call fcn.00487c20
add esp, 0xc
push 0x1ff
lea edx, [esp + 0x2ad]
push edi
push edx
mov byte [esp + 0x2b4], 0
call fcn.00487c20
add esp, 0xc
mov byte [esp + 0x21], 0
cmp byte [ebx], 0
je 0x4313a5
mov byte [esp + 0x20], 0
mov cl, byte [ebx]
movsx eax, cl
sub eax, 0x7b
je 0x4312ca
sub eax, 2
je 0x431397
push 0
mov byte [esp + 0x24], cl
mov byte [esp + 0x13], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push 1
mov ecx, eax
push 1
lea edx, [esp + 0x17]
lea eax, [esp + 0x28]
call fcn.00411510
add esp, 8
jmp 0x43135c
lea eax, [ebx + 1]
push 0x7d
push eax
mov dword [esp + 0x1c], eax
call fcn.0047fa01
mov edi, eax
add esp, 8
test edi, edi
je 0x431397
mov esi, edi
sub esi, ebx
dec esi
jne 0x4312fd
cmp byte [edi + 1], 0x7d
jne 0x431397
inc edi
mov esi, 1
push 0
mov byte [edi], 0
mov byte [esp + 0x13], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ebx, dword [esp + 0x14]
push 1
mov ecx, eax
push 1
lea edx, [esp + 0x17]
mov eax, ebx
call fcn.00411510
add esp, 8
mov byte [esp + 0x14], al
test al, al
je 0x43133a
cmp esi, 1
jne 0x431353
mov al, byte [ebx]
mov byte [esp + 0x20], al
jmp 0x431353
mov eax, ebx
call fcn.00411470
movzx eax, ax
test ax, ax
je 0x431353
mov ecx, eax
mov byte [esp + ecx + 0x2a8], 1
mov al, byte [esp + 0x14]
mov byte [edi], 0x7d
mov ebx, edi
test al, al
je 0x431397
movzx edi, al
or byte [esp + edi + 0x1a8], 1
cmp byte [esp + 0x20], 0
lea edi, [esp + edi + 0x1a8]
je 0x431397
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x431397
test byte [esp + 0xf], 0x30
je 0x431394
or byte [edi], 2
jmp 0x431397
or byte [edi], 4
inc ebx
cmp byte [ebx], 0
jne 0x431286
mov esi, dword [esp + 0x18]
mov dword [0x4a4c60], 0
cmp byte [esi], 0
je 0x431545
cmp dword [0x4a4c5c], 0
jne 0x4313fe
push 0x1000
call fcn.0047ebe9
add esp, 4
mov dword [0x4a4c5c], eax
test eax, eax
jne 0x4313f4
mov ecx, dword [ebp + 8]
push 0x4927e9
push 0
push str.Out_of_memory.
call fcn.0042cd00
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [0x4a4c64], 0x400
mov ebx, dword [ebp + 8]
mov edi, 3
mov ecx, ebx
call fcn.0041f350
inc eax
cmp eax, dword [0x4a4c6c]
jbe 0x431475
mov dword [0x4a4c6c], eax
cmp eax, 0x1000
ja 0x43142c
mov dword [0x4a4c6c], 0x1000
mov eax, dword [0x4a4c68]
test eax, eax
je 0x43143e
push eax
call fcn.0047ea48
add esp, 4
mov eax, dword [0x4a4c6c]
push eax
call fcn.0047ebe9
add esp, 4
mov dword [0x4a4c68], eax
test eax, eax
jne 0x43147a
push 0x4927e9
push eax
push str.Out_of_memory.
mov ecx, ebx
mov dword [0x4a4c6c], eax
call fcn.0042cd00
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x4a4c68]
mov ecx, dword [0x4a4c60]
mov edx, dword [0x4a4c5c]
mov dword [edx + ecx*4], eax
cmp byte [esi], 0
mov edi, dword [0x4a4c68]
mov ebx, esi
je 0x431528
lea ebx, [ebx]
mov al, byte [ebx]
cmp al, 0x2c
je 0x4314ab
mov byte [edi], al
inc edi
jmp 0x43151e
cmp byte [ebx + 1], 0x2c
jne 0x4314b8
mov byte [edi], 0x2c
inc edi
inc ebx
jmp 0x43151e
mov byte [edi], 0
mov ecx, dword [0x4a4c5c]
mov eax, dword [0x4a4c60]
mov edx, dword [ecx + eax*4]
cmp byte [edx], 0
je 0x4314e6
inc eax
mov dword [0x4a4c60], eax
inc edi
mov dword [ecx + eax*4], edi
mov byte [edi], 0
mov eax, dword [0x4a4c60]
mov ecx, dword [0x4a4c5c]
cmp byte [ebx + 1], 0
je 0x43151e
mov edx, dword [0x4a4c64]
cmp eax, edx
jb 0x43151e
lea eax, [edx*4 + 0x1000]
push eax
push ecx
call fcn.0047ffb7
add esp, 8
test eax, eax
je 0x4313d7
add dword [0x4a4c64], 0x400
mov dword [0x4a4c5c], eax
inc ebx
cmp byte [ebx], 0
jne 0x4314a0
mov byte [edi], 0
mov ecx, dword [0x4a4c5c]
mov edx, dword [0x4a4c60]
mov eax, dword [ecx + edx*4]
cmp byte [eax], 0
je 0x431545
inc dword [0x4a4c60]
cmp byte [0x4a2d84], 0
je 0x431583
mov ecx, dword [0x4a2c30]
push 0xc
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x431568
mov byte [0x4a2d84], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x431583
push 1
push 0xffffffffffffffff
call fcn.004012a0
add esp, 8
push 0x3fff
xor esi, esi
lea edx, [esp + 0x4ad]
push esi
push edx
mov dword [0x4a4c70], 1
mov word [0x4a4c74], 0
mov byte [esp + 0x4b4], 0
call fcn.00487c20
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x4b4]
add esp, 0xc
mov dword [0x4a4c78], eax
mov dword [0x4a4c7c], esi
mov dword [0x4a4c80], 0x3fff
cmp byte [ecx], 0
je 0x4316d6
mov ebx, ecx
inc ebx
movzx edi, byte [ebx - 1]
test edi, 0xffffff80
jne 0x431600
push 2
push edi
call fcn.0047ff4e
add esp, 8
test eax, eax
je 0x431600
and edi, 0xffffffdf
mov eax, edi
movsx eax, al
add eax, 0xffffffd6
cmp eax, 0x2c
ja case.0x431618.43
movzx edx, byte [eax + 0x431ce4]
jmp dword [edx*4 + 0x431cc0]
mov byte [0x4a4c70], 0
jmp case.0x431618.43
mov byte [0x4a4c71], 1
jmp case.0x431618.43
mov byte [0x4a4c72], 1
jmp case.0x431618.43
mov byte [0x4a4c73], 1
jmp case.0x431618.43
push ebx
call fcn.0047ff96
add esp, 4
mov dword [0x4a4c80], eax
cmp eax, 0x3fff
jle case.0x431618.43
mov dword [0x4a4c80], 0x3fff
jmp case.0x431618.43
mov eax, ebx
call fcn.0040c650
test al, al
je 0x4316a3
push 0x10
push 0
push ebx
call fcn.0048075f
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
fild qword [esp + 0x24]
add esp, 0xc
fmul qword [0x49a2b0]
call fcn.0048d110
mov esi, eax
jmp case.0x431618.43
push ebx
call fcn.00480861
fmul qword [0x49a2b0]
add esp, 4
call fcn.0048d110
mov esi, eax
jmp case.0x431618.43
mov byte [0x4a4c74], 1
jmp case.0x431618.43
mov byte [0x4a4c75], 1
inc ebx
cmp byte [ebx - 1], 0
jne 0x4315e2
or byte [0x4a3541], 1
cmp dword [0x4a2d60], 0
lea eax, [esp + 0x1a8]
lea ecx, [esp + 0x2a8]
mov dword [0x4a4c4c], eax
mov dword [0x4a4c50], ecx
mov dword [0x4a4c48], 1
mov byte [0x4a2d53], 1
jne 0x431722
mov edx, dword [0x4a0580]
movzx eax, word [edx]
push eax
call fcn.00407970
add esp, 4
test esi, esi
jle 0x431760
cmp byte [0x4a2d84], 0
jne 0x431760
mov eax, 0xa
cmp esi, 0xa
jl 0x43173b
mov eax, esi
mov ecx, dword [0x4a2c30]
push 0x403360
push eax
push 0xc
push ecx
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne dl
mov byte [0x4a2d84], dl
jmp 0x431760
push 1
push 0x8000012f
call fcn.004012a0
mov eax, dword [0x4a4c48]
add esp, 8
cmp eax, 1
je 0x431760
add eax, 0xfffffffe
cmp eax, 3
ja case.default.0x431785
jmp dword [eax*4 + 0x431d14]
push 1
push 0
push 0xffffffffffffffff
push str.Timeout
jmp 0x431927
push 1
push 0
push 0xffffffffffffffff
push str.Match
jmp 0x431927
mov eax, dword [str.EndKey:]
mov ecx, dword [0x49746c]
push 0x78
lea edx, [esp + 0x34]
push 0
push edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
call fcn.00487c20
add esp, 0xc
cmp byte [0x4a4c59], 0
je 0x431874
push 0xff
lea eax, [esp + 0xad]
push 0
push eax
mov byte [esp + 0xb4], 0
call fcn.00487c20
or byte [esp + 0xc4], 0x80
add esp, 0xc
call dword [sym.imp.USER32.dll_GetForegroundWindow]
test eax, eax
je 0x431819
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x43181b
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
xor ecx, ecx
cmp dword [0x4a2dbc], ecx
push eax
setne cl
lea edx, [esp + 0x33]
lea eax, [esp + 0xac]
xor bl, bl
push ecx
movzx ecx, byte [0x4a4c54]
push edx
push eax
push ecx
call fcn.00411950
movzx edx, ax
movzx eax, byte [0x4a4c54]
add esp, 4
push edx
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
push 1
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x34]
mov byte [esp + eax + 0x3b], bl
push ecx
jmp 0x431927
cmp byte [0x4a4c58], 0
je 0x4318e9
mov cx, word [0x4a4c56]
xor eax, eax
cmp word [eax*8 + 0x4a0514], cx
je 0x4318bd
inc eax
cmp eax, 0xd
jl 0x431886
movzx eax, cx
push eax
push str.sc_03X
mov esi, 0x79
lea edi, [esp + 0x37]
call fcn.0046c360
add esp, 8
push 1
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x34]
push ecx
jmp 0x431927
mov ecx, dword [eax*8 + 0x4a0510]
push 0x78
push ecx
lea edx, [esp + 0x37]
push edx
call fcn.00481870
add esp, 0xc
push 1
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x34]
mov byte [esp + 0xb3], 0
push ecx
jmp 0x431927
mov bl, byte [0x4a4c54]
push 1
mov eax, 0x79
lea ecx, [esp + 0x33]
call fcn.004113f0
add esp, 4
push 1
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x34]
push ecx
jmp 0x431927
push 1
push 0
push 0xffffffffffffffff
push 0x497470
jmp 0x431927
push 1
push 0
push 0xffffffffffffffff
push str.NewInput
mov ecx, dword [0x4a3434]
call fcn.0046ede0
cmp byte [0x4a2d84], 0
mov dword [0x4a4c48], 0
je 0x43197a
mov edx, dword [0x4a2c30]
push 0xc
push edx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x43195f
mov byte [0x4a2d84], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x43197a
push 1
push 0xffffffffffffffff
call fcn.004012a0
add esp, 8
mov esi, dword [esp + 0x10]
cmp byte [esi + 0x17], 0
jne 0x4319a3
mov ecx, dword [esi + 0xc]
push 1
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x4b4]
push eax
call fcn.0046ede0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [esp + 0x4a8]
cmp dword [esi + 8], ecx
jne 0x4319d2
cmp byte [esi + 0x17], 1
jne 0x4319c9
test byte [esi + 0x15], 8
je 0x4319c2
mov eax, esi
call fcn.00401150
lea eax, [esi + 0xc]
mov esi, dword [eax]
jmp 0x4319eb
mov eax, 0x4a54d0
mov esi, dword [eax]
jmp 0x4319eb
lea eax, [esp + 0x4a8]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4319e0
sub eax, edx
mov esi, eax
mov ecx, dword [esp + 0x10]
cmp byte [ecx + 0x17], 2
lea edi, [esi + 1]
jne 0x431a6c
cmp dword [0x4a4c90], 0
mov ebx, esi
jne 0x431b6f
cmp esi, 0xffffffff
jne 0x431a21
lea eax, [esp + 0x4a8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x431a16
sub eax, edx
mov ebx, eax
test ebx, ebx
je 0x431a57
lea edi, [ebx + 1]
mov esi, 0x4a4c84
call fcn.00403e20
test eax, eax
je 0x431b6f
mov eax, dword [0x4a4c90]
push ebx
lea edx, [esp + 0x4ac]
push edx
push eax
mov esi, eax
call fcn.00481870
add esp, 0xc
mov byte [esi + ebx], 0
push 1
mov ecx, 0x4a4c84
call fcn.00403e90
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [0x49f39c]
cmp edi, ebx
jbe 0x431a98
cmp edi, dword [ecx + 0x10]
jbe 0x431a98
push 0x4927e9
push str.Memory_limit_reached__see_MaxMem_in_the_help_file_.
mov ecx, 0x4a4ca0
call fcn.0042cfa0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp edi, 2
jae 0x431ab4
push 4
xor al, al
call fcn.0046f2f0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov al, byte [ecx + 0x15]
test al, 2
je 0x431ad4
and al, 0x3d
mov byte [ecx + 0x15], al
mov eax, dword [ecx]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ebx, dword [0x49f39c]
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x10]
and byte [ecx + 0x15], 0x82
cmp edi, edx
jbe 0x431b0e
mov eax, dword [esp + 0x10]
mov cl, byte [eax + 0x14]
cmp cl, 1
jbe 0x431b45
cmp cl, 2
je 0x431b87
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
and byte [ecx + 0x15], 0x7f
mov dword [ecx + 8], eax
mov dword [ecx + 0x10], edi
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 8]
lea edx, [esp + 0x4a8]
cmp eax, edx
je 0x431b2d
push esi
mov ecx, edx
push ecx
push eax
call fcn.0047f5f0
mov ecx, dword [esp + 0x1c]
add esp, 0xc
mov edx, dword [ecx + 8]
mov byte [esi + edx], 0
mov dword [ecx + 0xc], esi
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp edi, 0x40
ja 0x431b87
cmp edi, 4
ja 0x431b56
mov edi, 4
jmp 0x431b64
mov ecx, 8
cmp ecx, edi
sbb edi, edi
and edi, 0x38
add edi, ecx
mov eax, edi
call fcn.004698a0
test eax, eax
jne 0x431b7a
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esp + 0x10]
mov byte [ecx + 0x14], 1
jmp 0x431b00
cmp edi, 0x10
jae 0x431b96
mov edi, 0x10
jmp 0x431c46
cmp edi, 0x104
jae 0x431ba8
mov edi, 0x104
jmp 0x431c46
cmp edi, 0x28000
jae 0x431bec
mov dword [esp + 0x18], edi
fild dword [esp + 0x18]
test edi, edi
jns 0x431bc2
fadd qword [0x49a278]
fmul qword [0x49a288]
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
or eax, 0xc00
mov dword [esp + 0x18], eax
fldcw word [esp + 0x18]
fistp qword [esp + 0x18]
mov edi, dword [esp + 0x18]
fldcw word [esp + 0x14]
jmp 0x431c46
cmp edi, 0x190000
jae 0x431bfc
add edi, 0x4000
jmp 0x431c46
cmp edi, 0x640000
jae 0x431c40
mov dword [esp + 0x18], edi
fild dword [esp + 0x18]
test edi, edi
jns 0x431c16
fadd qword [0x49a278]
fmul qword [0x49a280]
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
or eax, 0xc00
mov dword [esp + 0x18], eax
fldcw word [esp + 0x18]
fistp qword [esp + 0x18]
mov edi, dword [esp + 0x18]
fldcw word [esp + 0x14]
jmp 0x431c46
add edi, 0x10000
cmp edi, ebx
jbe 0x431c4c
mov edi, ebx
cmp cl, 2
jne 0x431c85
test edx, edx
je 0x431c85
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 8]
push eax
mov bl, 1
call fcn.0047ea48
add esp, 4
test edi, edi
js 0x431c89
push edi
call fcn.0047ebe9
add esp, 4
test eax, eax
je 0x431c89
mov ecx, dword [esp + 0x10]
mov byte [ecx + 0x14], 2
jmp 0x431b00
xor bl, bl
jmp 0x431c67
test bl, bl
je 0x431ca0
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 8], 0x4a453d
mov dword [eax + 0xc], ecx
push 0x4927e9
push str.Out_of_memory.
mov ecx, 0x4a4ca0
call fcn.0042cfa0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4