Function at 0x431380
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x449c
call fcn.0048b400
mov eax, dword [0x4a2bd0]
push ebx
push esi
push edi
xor edi, edi
mov dword [esp + 0x10], eax
cmp eax, edi
jne 0x4313cd
cmp dword [0x4a4c44], 1
mov edx, dword [ebp + 8]
sete al
test al, al
sete al
movzx ecx, al
push ecx
push edx
mov dword [0x4a4c44], edi
call fcn.0042cc60
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 [0x4a4c44], edi
mov byte [esp + 0x1b4], 0
call fcn.00488100
add esp, 0xc
push 0x1ff
lea edx, [esp + 0x2ad]
push edi
push edx
mov byte [esp + 0x2b4], 0
call fcn.00488100
add esp, 0xc
mov byte [esp + 0x21], 0
cmp byte [ebx], 0
je 0x431555
mov byte [esp + 0x20], 0
mov cl, byte [ebx]
movsx eax, cl
sub eax, 0x7b
je 0x43147a
sub eax, 2
je 0x431547
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.00411520
add esp, 8
jmp 0x43150c
lea eax, [ebx + 1]
push 0x7d
push eax
mov dword [esp + 0x1c], eax
call fcn.0047fd91
mov edi, eax
add esp, 8
test edi, edi
je 0x431547
mov esi, edi
sub esi, ebx
dec esi
jne 0x4314ad
cmp byte [edi + 1], 0x7d
jne 0x431547
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.00411520
add esp, 8
mov byte [esp + 0x14], al
test al, al
je 0x4314ea
cmp esi, 1
jne 0x431503
mov al, byte [ebx]
mov byte [esp + 0x20], al
jmp 0x431503
mov eax, ebx
call fcn.00411480
movzx eax, ax
test ax, ax
je 0x431503
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 0x431547
movzx edi, al
or byte [esp + edi + 0x1a8], 1
cmp byte [esp + 0x20], 0
lea edi, [esp + edi + 0x1a8]
je 0x431547
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x431547
test byte [esp + 0xf], 0x30
je 0x431544
or byte [edi], 2
jmp 0x431547
or byte [edi], 4
inc ebx
cmp byte [ebx], 0
jne 0x431436
mov esi, dword [esp + 0x18]
mov dword [0x4a4c5c], 0
cmp byte [esi], 0
je 0x4316f5
cmp dword [0x4a4c58], 0
jne 0x4315ae
push 0x1000
call fcn.0047ef79
add esp, 4
mov dword [0x4a4c58], eax
test eax, eax
jne 0x4315a4
mov ecx, dword [ebp + 8]
push 0x4927f1
push 0
push str.Out_of_memory.
call fcn.0042ce90
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [0x4a4c60], 0x400
mov ebx, dword [ebp + 8]
mov edi, 3
mov ecx, ebx
call fcn.0041f400
inc eax
cmp eax, dword [0x4a4c68]
jbe 0x431625
mov dword [0x4a4c68], eax
cmp eax, 0x1000
ja 0x4315dc
mov dword [0x4a4c68], 0x1000
mov eax, dword [0x4a4c64]
test eax, eax
je 0x4315ee
push eax
call fcn.0047edd8
add esp, 4
mov eax, dword [0x4a4c68]
push eax
call fcn.0047ef79
add esp, 4
mov dword [0x4a4c64], eax
test eax, eax
jne 0x43162a
push 0x4927f1
push eax
push str.Out_of_memory.
mov ecx, ebx
mov dword [0x4a4c68], eax
call fcn.0042ce90
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x4a4c64]
mov ecx, dword [0x4a4c5c]
mov edx, dword [0x4a4c58]
mov dword [edx + ecx*4], eax
cmp byte [esi], 0
mov edi, dword [0x4a4c64]
mov ebx, esi
je 0x4316d8
lea ebx, [ebx]
mov al, byte [ebx]
cmp al, 0x2c
je 0x43165b
mov byte [edi], al
inc edi
jmp 0x4316ce
cmp byte [ebx + 1], 0x2c
jne 0x431668
mov byte [edi], 0x2c
inc edi
inc ebx
jmp 0x4316ce
mov byte [edi], 0
mov ecx, dword [0x4a4c58]
mov eax, dword [0x4a4c5c]
mov edx, dword [ecx + eax*4]
cmp byte [edx], 0
je 0x431696
inc eax
mov dword [0x4a4c5c], eax
inc edi
mov dword [ecx + eax*4], edi
mov byte [edi], 0
mov eax, dword [0x4a4c5c]
mov ecx, dword [0x4a4c58]
cmp byte [ebx + 1], 0
je 0x4316ce
mov edx, dword [0x4a4c60]
cmp eax, edx
jb 0x4316ce
lea eax, [edx*4 + 0x1000]
push eax
push ecx
call fcn.00480347
add esp, 8
test eax, eax
je 0x431587
add dword [0x4a4c60], 0x400
mov dword [0x4a4c58], eax
inc ebx
cmp byte [ebx], 0
jne 0x431650
mov byte [edi], 0
mov ecx, dword [0x4a4c58]
mov edx, dword [0x4a4c5c]
mov eax, dword [ecx + edx*4]
cmp byte [eax], 0
je 0x4316f5
inc dword [0x4a4c5c]
cmp byte [0x4a2d84], 0
je 0x431733
mov ecx, dword [0x4a2c30]
push 0xc
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x431718
mov byte [0x4a2d84], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x431733
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 [0x4a4c6c], 1
mov word [0x4a4c70], 0
mov byte [esp + 0x4b4], 0
call fcn.00488100
mov ecx, dword [esp + 0x30]
lea eax, [esp + 0x4b4]
add esp, 0xc
mov dword [0x4a4c74], eax
mov dword [0x4a4c78], esi
mov dword [0x4a4c7c], 0x3fff
cmp byte [ecx], 0
je 0x431886
mov ebx, ecx
inc ebx
movzx edi, byte [ebx - 1]
test edi, 0xffffff80
jne 0x4317b0
push 2
push edi
call fcn.004802de
add esp, 8
test eax, eax
je 0x4317b0
and edi, 0xffffffdf
mov eax, edi
movsx eax, al
add eax, 0xffffffd6
cmp eax, 0x2c
ja case.0x4317c8.43
movzx edx, byte [eax + 0x431e94]
jmp dword [edx*4 + 0x431e70]
mov byte [0x4a4c6c], 0
jmp case.0x4317c8.43
mov byte [0x4a4c6d], 1
jmp case.0x4317c8.43
mov byte [0x4a4c6e], 1
jmp case.0x4317c8.43
mov byte [0x4a4c6f], 1
jmp case.0x4317c8.43
push ebx
call fcn.00480326
add esp, 4
mov dword [0x4a4c7c], eax
cmp eax, 0x3fff
jle case.0x4317c8.43
mov dword [0x4a4c7c], 0x3fff
jmp case.0x4317c8.43
mov eax, ebx
call fcn.0040c660
test al, al
je 0x431853
push 0x10
push 0
push ebx
call fcn.00480aef
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
fild qword [esp + 0x24]
add esp, 0xc
fmul qword [0x49a4f0]
call fcn.0048d5f0
mov esi, eax
jmp case.0x4317c8.43
push ebx
call fcn.00480bf1
fmul qword [0x49a4f0]
add esp, 4
call fcn.0048d5f0
mov esi, eax
jmp case.0x4317c8.43
mov byte [0x4a4c70], 1
jmp case.0x4317c8.43
mov byte [0x4a4c71], 1
inc ebx
cmp byte [ebx - 1], 0
jne 0x431792
or byte [0x4a3541], 1
cmp dword [0x4a2d60], 0
lea eax, [esp + 0x1a8]
lea ecx, [esp + 0x2a8]
mov dword [0x4a4c48], eax
mov dword [0x4a4c4c], ecx
mov dword [0x4a4c44], 1
mov byte [0x4a2d53], 1
jne 0x4318d2
mov edx, dword [0x4a059c]
movzx eax, word [edx]
push eax
call fcn.00407970
add esp, 4
test esi, esi
jle 0x431910
cmp byte [0x4a2d84], 0
jne 0x431910
mov eax, 0xa
cmp esi, 0xa
jl 0x4318eb
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 0x431910
push 1
push 0x8000012f
call fcn.004012a0
mov eax, dword [0x4a4c44]
add esp, 8
cmp eax, 1
je 0x431910
add eax, 0xfffffffe
cmp eax, 3
ja case.default.0x431935
jmp dword [eax*4 + 0x431ec4]
push 1
push 0
push 0xffffffffffffffff
push str.Timeout
jmp 0x431ad7
push 1
push 0
push 0xffffffffffffffff
push str.Match
jmp 0x431ad7
mov eax, dword [str.EndKey:]
mov ecx, dword [0x497504]
push 0x78
lea edx, [esp + 0x34]
push 0
push edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], ecx
call fcn.00488100
add esp, 0xc
cmp byte [0x4a4c55], 0
je 0x431a24
push 0xff
lea eax, [esp + 0xad]
push 0
push eax
mov byte [esp + 0xb4], 0
call fcn.00488100
or byte [esp + 0xc4], 0x80
add esp, 0xc
call dword [sym.imp.USER32.dll_GetForegroundWindow]
test eax, eax
je 0x4319c9
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x4319cb
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 [0x4a4c50]
push edx
push eax
push ecx
call fcn.00411960
movzx edx, ax
movzx eax, byte [0x4a4c50]
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 0x431ad7
cmp byte [0x4a4c54], 0
je 0x431a99
mov cx, word [0x4a4c52]
xor eax, eax
cmp word [eax*8 + 0x4a0534], cx
je 0x431a6d
inc eax
cmp eax, 0xd
jl 0x431a36
movzx eax, cx
push eax
push str.sc_03X
mov esi, 0x79
lea edi, [esp + 0x37]
call fcn.0046c720
add esp, 8
push 1
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x34]
push ecx
jmp 0x431ad7
mov ecx, dword [eax*8 + 0x4a0530]
push 0x78
push ecx
lea edx, [esp + 0x37]
push edx
call fcn.00481c00
add esp, 0xc
push 1
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x34]
mov byte [esp + 0xb3], 0
push ecx
jmp 0x431ad7
mov bl, byte [0x4a4c50]
push 1
mov eax, 0x79
lea ecx, [esp + 0x33]
call fcn.00411400
add esp, 4
push 1
push 0
push 0xffffffffffffffff
lea ecx, [esp + 0x34]
push ecx
jmp 0x431ad7
push 1
push 0
push 0xffffffffffffffff
push 0x497508
jmp 0x431ad7
push 1
push 0
push 0xffffffffffffffff
push str.NewInput
mov ecx, dword [0x4a3434]
call fcn.0046f180
cmp byte [0x4a2d84], 0
mov dword [0x4a4c44], 0
je 0x431b2a
mov edx, dword [0x4a2c30]
push 0xc
push edx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x431b0f
mov byte [0x4a2d84], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x431b2a
push 1
push 0xffffffffffffffff
call fcn.004012a0
add esp, 8
mov esi, dword [esp + 0x10]
cmp byte [esi + 0x17], 0
jne 0x431b53
mov ecx, dword [esi + 0xc]
push 1
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x4b4]
push eax
call fcn.0046f180
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea ecx, [esp + 0x4a8]
cmp dword [esi + 8], ecx
jne 0x431b82
cmp byte [esi + 0x17], 1
jne 0x431b79
test byte [esi + 0x15], 8
je 0x431b72
mov eax, esi
call fcn.00401150
lea eax, [esi + 0xc]
mov esi, dword [eax]
jmp 0x431b9b
mov eax, 0x4a54d0
mov esi, dword [eax]
jmp 0x431b9b
lea eax, [esp + 0x4a8]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x431b90
sub eax, edx
mov esi, eax
mov ecx, dword [esp + 0x10]
cmp byte [ecx + 0x17], 2
lea edi, [esi + 1]
jne 0x431c1c
cmp dword [0x4a52c4], 0
mov ebx, esi
jne 0x431d1f
cmp esi, 0xffffffff
jne 0x431bd1
lea eax, [esp + 0x4a8]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x431bc6
sub eax, edx
mov ebx, eax
test ebx, ebx
je 0x431c07
lea edi, [ebx + 1]
mov esi, 0x4a52b8
call fcn.00403e30
test eax, eax
je 0x431d1f
mov eax, dword [0x4a52c4]
push ebx
lea edx, [esp + 0x4ac]
push edx
push eax
mov esi, eax
call fcn.00481c00
add esp, 0xc
mov byte [esi + ebx], 0
push 1
mov ecx, 0x4a52b8
call fcn.00403ea0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [0x49f3ac]
cmp edi, ebx
jbe 0x431c48
cmp edi, dword [ecx + 0x10]
jbe 0x431c48
push 0x4927f1
push str.Memory_limit_reached__see_MaxMem_in_the_help_file_.
mov ecx, 0x4a4c80
call fcn.0042d140
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp edi, 2
jae 0x431c64
push 4
xor al, al
call fcn.0046f690
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 0x431c84
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 [0x49f3ac]
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x10]
and byte [ecx + 0x15], 0x82
cmp edi, edx
jbe 0x431cbe
mov eax, dword [esp + 0x10]
mov cl, byte [eax + 0x14]
cmp cl, 1
jbe 0x431cf5
cmp cl, 2
je 0x431d37
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 0x431cdd
push esi
mov ecx, edx
push ecx
push eax
call fcn.0047f980
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 0x431d37
cmp edi, 4
ja 0x431d06
mov edi, 4
jmp 0x431d14
mov ecx, 8
cmp ecx, edi
sbb edi, edi
and edi, 0x38
add edi, ecx
mov eax, edi
call fcn.00469c60
test eax, eax
jne 0x431d2a
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 0x431cb0
cmp edi, 0x10
jae 0x431d46
mov edi, 0x10
jmp 0x431df6
cmp edi, 0x104
jae 0x431d58
mov edi, 0x104
jmp 0x431df6
cmp edi, 0x28000
jae 0x431d9c
mov dword [esp + 0x18], edi
fild dword [esp + 0x18]
test edi, edi
jns 0x431d72
fadd qword [0x49a4b8]
fmul qword [0x49a4c8]
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 0x431df6
cmp edi, 0x190000
jae 0x431dac
add edi, 0x4000
jmp 0x431df6
cmp edi, 0x640000
jae 0x431df0
mov dword [esp + 0x18], edi
fild dword [esp + 0x18]
test edi, edi
jns 0x431dc6
fadd qword [0x49a4b8]
fmul qword [0x49a4c0]
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 0x431df6
add edi, 0x10000
cmp edi, ebx
jbe 0x431dfc
mov edi, ebx
cmp cl, 2
jne 0x431e35
test edx, edx
je 0x431e35
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 8]
push eax
mov bl, 1
call fcn.0047edd8
add esp, 4
test edi, edi
js 0x431e39
push edi
call fcn.0047ef79
add esp, 4
test eax, eax
je 0x431e39
mov ecx, dword [esp + 0x10]
mov byte [ecx + 0x14], 2
jmp 0x431cb0
xor bl, bl
jmp 0x431e17
test bl, bl
je 0x431e50
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 8], 0x4a453d
mov dword [eax + 0xc], ecx
push 0x4927f1
push str.Out_of_memory.
mov ecx, 0x4a4c80
call fcn.0042d140
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4