Function at 0x431c50
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x8524
call fcn.00493680
mov eax, dword [0x4c0e18]
push ebx
push esi
push edi
xor edi, edi
mov dword [esp + 0x18], eax
cmp eax, edi
jne 0x431caa
cmp dword [0x4c3110], 1
mov dword [0x4c3110], edi
sete al
test al, al
mov eax, 0x49b8d0
jne 0x431c90
mov eax, 0x49e30c
mov ecx, dword [0x4c17f0]
push 1
push edi
push 0xffffffffffffffff
push eax
call fcn.0046dd60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x4c0dcc]
mov ecx, dword [0x4c0dd4]
mov esi, dword [0x4c0dd0]
push 0xff
lea edx, [esp + 0x235]
push edi
push edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], ecx
mov dword [0x4c3110], edi
mov byte [esp + 0x23c], 0
call fcn.00490160
add esp, 0xc
push 0x1ff
lea eax, [esp + 0x335]
push edi
push eax
mov byte [esp + 0x33c], 0
call fcn.00490160
xor ecx, ecx
add esp, 0xc
mov word [esp + 0x22], cx
cmp word [esi], di
je 0x431e41
xor edx, edx
mov word [esp + 0x20], dx
movzx ecx, word [esi]
mov eax, ecx
sub eax, 0x7b
je 0x431d5a
sub eax, 2
je 0x431e34
push edx
mov word [esp + 0x24], cx
mov byte [esp + 0x17], dl
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push 1
mov ecx, eax
push 1
lea edx, [esp + 0x1b]
lea eax, [esp + 0x28]
call fcn.00411820
add esp, 8
jmp 0x431df8
lea eax, [esi + 2]
push 0x7d
push eax
mov dword [esp + 0x1c], eax
call fcn.00487101
mov edi, eax
add esp, 8
test edi, edi
je 0x431e34
mov ebx, edi
sub ebx, esi
sar ebx, 1
dec ebx
jne 0x431d92
cmp word [edi + 2], 0x7d
jne 0x431e34
add edi, 2
mov ebx, 1
xor eax, eax
push eax
mov word [edi], ax
mov byte [esp + 0x17], al
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov esi, dword [esp + 0x14]
push 1
mov ecx, eax
push 1
lea edx, [esp + 0x1b]
mov eax, esi
call fcn.00411820
add esp, 8
mov byte [esp + 0x14], al
test al, al
je 0x431dd1
cmp ebx, 1
jne 0x431dea
mov cx, word [esi]
mov word [esp + 0x20], cx
jmp 0x431dea
mov eax, esi
call fcn.00411780
movzx eax, ax
test ax, ax
je 0x431dea
mov edx, eax
mov byte [esp + edx + 0x330], 1
mov eax, 0x7d
mov word [edi], ax
mov al, byte [esp + 0x14]
mov esi, edi
test al, al
je 0x431e34
movzx edi, al
or byte [esp + edi + 0x230], 1
cmp word [esp + 0x20], 0
lea edi, [esp + edi + 0x230]
je 0x431e34
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x431e34
test byte [esp + 0x13], 0x30
je 0x431e31
or byte [edi], 2
jmp 0x431e34
or byte [edi], 4
add esi, 2
cmp word [esi], 0
jne 0x431d15
mov edx, dword [esp + 0x24]
mov dword [0x4c3128], 0
cmp word [edx], 0
je 0x432006
cmp dword [0x4c3124], 0
jne 0x431e9e
push 0x1000
call fcn.004863c4
add esp, 4
mov dword [0x4c3124], eax
test eax, eax
jne 0x431e94
mov ecx, dword [ebp + 8]
push 0x4a596c
push eax
push str.Out_of_memory.
call fcn.0042d460
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [0x4c312c], 0x400
mov ebx, dword [ebp + 8]
mov edi, 3
mov ecx, ebx
call fcn.0041f600
inc eax
cmp eax, dword [0x4c3134]
jbe 0x431f19
mov dword [0x4c3134], eax
cmp eax, 0x1000
ja 0x431ecc
mov dword [0x4c3134], 0x1000
mov eax, dword [0x4c3130]
test eax, eax
je 0x431ede
push eax
call fcn.00487975
add esp, 4
mov eax, dword [0x4c3134]
lea ecx, [eax + eax]
push ecx
call fcn.004863c4
add esp, 4
mov dword [0x4c3130], eax
test eax, eax
jne 0x431f1e
mov dword [0x4c3134], eax
push 0x4a596c
push 0
push str.Out_of_memory.
mov ecx, ebx
call fcn.0042d460
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x4c3130]
mov edx, dword [0x4c3128]
mov ecx, dword [0x4c3124]
mov esi, dword [esp + 0x24]
mov dword [ecx + edx*4], eax
cmp word [esi], 0
mov edi, dword [0x4c3130]
je 0x431fe6
movzx eax, word [esi]
cmp eax, 0x2c
je 0x431f54
mov word [edi], ax
add edi, 2
jmp 0x431fd9
cmp word [esi + 2], 0x2c
jne 0x431f6b
mov edx, 0x2c
mov word [edi], dx
add edi, 2
add esi, 2
jmp 0x431fd9
xor eax, eax
mov word [edi], ax
mov ecx, dword [0x4c3124]
mov eax, dword [0x4c3128]
mov edx, dword [ecx + eax*4]
cmp word [edx], 0
je 0x431fa0
inc eax
mov dword [0x4c3128], eax
add edi, 2
mov dword [ecx + eax*4], edi
xor eax, eax
mov word [edi], ax
mov eax, dword [0x4c3128]
mov ecx, dword [0x4c3124]
cmp word [esi + 2], 0
je 0x431fd9
mov edx, dword [0x4c312c]
cmp eax, edx
jb 0x431fd9
lea edx, [edx*4 + 0x1000]
push edx
push ecx
call fcn.004875e7
add esp, 8
test eax, eax
je 0x431efd
add dword [0x4c312c], 0x400
mov dword [0x4c3124], eax
add esi, 2
cmp word [esi], 0
jne 0x431f41
xor eax, eax
mov word [edi], ax
mov ecx, dword [0x4c3124]
mov edx, dword [0x4c3128]
mov eax, dword [ecx + edx*4]
cmp word [eax], 0
je 0x432006
inc dword [0x4c3128]
cmp byte [0x4c0fc8], 0
je 0x432044
mov ecx, dword [0x4c0e74]
push 0xc
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x432029
mov byte [0x4c0fc8], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x432044
push 1
push 0xffffffffffffffff
call fcn.00401360
add esp, 8
push 0x7ffe
xor ebx, ebx
lea eax, [esp + 0x536]
xor edx, edx
push ebx
push eax
mov dword [0x4c3138], 1
mov word [0x4c313c], 0
mov word [esp + 0x53c], dx
call fcn.00490160
mov esi, dword [esp + 0x34]
lea ecx, [esp + 0x53c]
add esp, 0xc
mov dword [0x4c3140], ecx
mov dword [0x4c3144], ebx
mov dword [0x4c3148], 0x3fff
cmp word [esi], bx
je 0x4321a2
add esi, 2
jmp 0x4320b0
movzx edi, word [esi - 2]
test edi, 0xffffff80
jne 0x4320ce
push 2
push edi
call fcn.0048757e
add esp, 8
test eax, eax
je 0x4320ce
and edi, 0xffffffdf
movzx eax, di
add eax, 0xffffffd6
cmp eax, 0x2c
ja case.0x4320e4.43
movzx edx, byte [eax + 0x432760]
jmp dword [edx*4 + 0x43273c]
mov byte [0x4c3138], 0
jmp case.0x4320e4.43
mov byte [0x4c3139], 1
jmp case.0x4320e4.43
mov byte [0x4c313a], 1
jmp case.0x4320e4.43
mov byte [0x4c313b], 1
jmp case.0x4320e4.43
push esi
call fcn.004875c6
add esp, 4
mov dword [0x4c3148], eax
cmp eax, 0x3fff
jle case.0x4320e4.43
mov dword [0x4c3148], 0x3fff
jmp case.0x4320e4.43
mov eax, esi
call fcn.0040c9b0
test al, al
je 0x43216c
push 0x10
push 0
push esi
call fcn.00487cf3
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edx
fild qword [esp + 0x34]
add esp, 0xc
fmul qword [0x4b7690]
call fcn.004964c0
mov ebx, eax
jmp case.0x4320e4.43
push esi
call fcn.00487dd2
fmul qword [0x4b7690]
add esp, 4
call fcn.004964c0
mov ebx, eax
jmp case.0x4320e4.43
mov byte [0x4c313c], 1
jmp case.0x4320e4.43
mov byte [0x4c313d], 1
add esi, 2
cmp word [esi - 2], 0
jne 0x4320b0
or byte [0x4c1a30], 1
cmp dword [0x4c0fa4], 0
lea eax, [esp + 0x230]
lea ecx, [esp + 0x330]
mov dword [0x4c3114], eax
mov dword [0x4c3118], ecx
mov dword [0x4c3110], 1
mov byte [0x4c0e97], 1
jne 0x4321ee
mov edx, dword [0x4be600]
movzx eax, word [edx]
push eax
call fcn.00407b00
add esp, 4
test ebx, ebx
jle 0x432230
cmp byte [0x4c0fc8], 0
jne 0x432230
mov eax, 0xa
cmp ebx, 0xa
jl 0x432207
mov eax, ebx
mov ecx, dword [0x4c0e74]
push 0x403310
push eax
push 0xc
push ecx
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne dl
mov byte [0x4c0fc8], dl
jmp 0x432230
push 1
push 0x8000012f
call fcn.00401360
mov eax, dword [0x4c3110]
add esp, 8
cmp eax, 1
je 0x432230
add eax, 0xfffffffe
cmp eax, 3
ja case.default.0x432255
jmp dword [eax*4 + 0x432790]
push 1
push 0
push 0xffffffffffffffff
push str.Timeout
jmp 0x43240d
push 1
push 0
push 0xffffffffffffffff
push str.Match
jmp 0x43240d
mov ecx, dword [0x4a468c]
mov eax, dword [str.EndKey:]
mov edx, dword [0x4a4690]
push pe_nt_image_headers32
mov dword [esp + 0x38], ecx
mov dword [esp + 0x34], eax
mov eax, dword [0x4a4694]
lea ecx, [esp + 0x44]
push 0
push ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], eax
call fcn.00490160
add esp, 0xc
cmp byte [0x4c3121], 0
je 0x43235e
push 0xff
lea edx, [esp + 0x135]
push 0
push edx
mov byte [esp + 0x13c], 0
call fcn.00490160
or byte [esp + 0x14c], 0x80
add esp, 0xc
call dword [sym.imp.USER32.dll_GetForegroundWindow]
test eax, eax
je 0x4322ff
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x432301
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
xor eax, eax
cmp dword [0x4c0ffc], eax
lea ecx, [esp + 0x42]
setne al
lea edx, [esp + 0x134]
xor bl, bl
push eax
movzx eax, byte [0x4c311c]
push 2
push ecx
push edx
push eax
call fcn.00411c40
movzx edx, byte [0x4c311c]
movzx ecx, ax
add esp, 4
push ecx
push edx
call dword [sym.imp.USER32.dll_ToUnicodeEx]
push 1
xor ecx, ecx
push ecx
mov word [esp + eax*2 + 0x46], cx
push 0xffffffffffffffff
lea eax, [esp + 0x3c]
push eax
jmp 0x43240d
cmp byte [0x4c3120], 0
je 0x43238c
mov cx, word [0x4c311e]
mov eax, 0x79
lea edx, [esp + 0x3e]
call fcn.00411720
push 1
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x3c]
push eax
jmp 0x43240d
mov cl, byte [0x4c311c]
xor eax, eax
cmp byte [eax*8 + 0x4be22c], cl
je 0x4323c8
inc eax
cmp eax, 0x6d
jl 0x432394
mov ax, word [0x4c311e]
movzx edx, cl
push 0x79
push edx
lea esi, [esp + 0x46]
call fcn.00411b50
add esp, 8
push 1
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x3c]
push eax
jmp 0x43240d
mov edx, dword [eax*8 + 0x4be228]
push 0x78
push edx
lea eax, [esp + 0x46]
push eax
call fcn.00488d24
add esp, 0xc
push 1
xor ecx, ecx
push ecx
push 0xffffffffffffffff
lea eax, [esp + 0x3c]
mov word [esp + 0x13a], cx
push eax
jmp 0x43240d
push 1
push 0
push 0xffffffffffffffff
push 0x4a4698
jmp 0x43240d
push 1
push 0
push 0xffffffffffffffff
push str.NewInput
mov ecx, dword [0x4c17f0]
call fcn.0046dd60
cmp byte [0x4c0fc8], 0
mov dword [0x4c3110], 0
je 0x432460
mov ecx, dword [0x4c0e74]
push 0xc
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x432445
mov byte [0x4c0fc8], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x432460
push 1
push 0xffffffffffffffff
call fcn.00401360
add esp, 8
mov esi, dword [esp + 0x18]
cmp byte [esi + 0x17], 0
jne 0x432489
mov ecx, dword [esi + 0xc]
push 1
push 0
push 0xffffffffffffffff
lea edx, [esp + 0x53c]
push edx
call fcn.0046dd60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x530]
cmp dword [esi + 8], eax
jne 0x4324c5
cmp byte [esi + 0x17], 1
jne 0x4324b6
test byte [esi + 0x15], 8
je 0x4324a8
mov eax, esi
call fcn.00401160
mov ebx, dword [esi + 0xc]
lea eax, [esi + 0xc]
shr ebx, 1
mov dword [esp + 0x24], ebx
jmp 0x4324e5
mov eax, 0x4c3fd4
mov ebx, dword [eax]
shr ebx, 1
mov dword [esp + 0x24], ebx
jmp 0x4324e5
lea eax, [esp + 0x530]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4324d0
sub eax, edx
sar eax, 1
mov ebx, eax
mov dword [esp + 0x24], eax
cmp byte [esi + 0x17], 2
lea eax, [ebx + 1]
lea edi, [eax + eax]
jne 0x432509
lea ecx, [esp + 0x530]
push ecx
mov eax, ebx
call fcn.00403c50
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp edi, dword [0x4bd3ec]
jbe 0x43252e
push 0x4a596c
push str.Memory_limit_reached__see_MaxMem_in_the_help_file_.__The_current_thread_will_exit.
mov ecx, 0x4c3168
call fcn.0042d6d0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp eax, 2
jae 0x43254c
push 4
xor al, al
mov ecx, esi
call fcn.0046e290
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov al, byte [esi + 0x15]
test al, 2
je 0x432562
and al, 0x3d
mov byte [esi + 0x15], al
mov eax, dword [esi]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov edx, dword [esi + 0x10]
and byte [esi + 0x15], 0x82
cmp edi, edx
jbe 0x432590
mov cl, byte [esi + 0x14]
cmp cl, 1
jbe 0x4325c7
cmp cl, 2
je 0x432603
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x18]
and byte [esi + 0x15], 0x7f
mov dword [esi + 8], eax
mov dword [esi + 0x10], edi
mov eax, dword [esi + 8]
lea ecx, [esp + 0x530]
cmp eax, ecx
je 0x4325ac
lea edx, [ebx + ebx]
push edx
push ecx
push eax
call fcn.00486da0
add esp, 0xc
mov edx, dword [esi + 8]
lea eax, [ebx + ebx]
xor ecx, ecx
mov word [eax + edx], cx
mov dword [esi + 0xc], eax
lea eax, [ecx + 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp edi, 0x80
ja 0x432603
cmp edi, 8
ja 0x4325db
mov edi, 8
jmp 0x4325e9
mov ecx, 0x10
cmp ecx, edi
sbb edi, edi
and edi, 0x70
add edi, ecx
mov eax, edi
call fcn.00468610
test eax, eax
jne 0x4325fd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov byte [esi + 0x14], 1
jmp 0x432586
cmp edi, 0x20
jae 0x432612
mov edi, 0x20
jmp 0x4326c2
cmp edi, 0x208
jae 0x432624
mov edi, 0x208
jmp 0x4326c2
cmp edi, 0x50000
jae 0x432668
mov dword [esp + 0x18], edi
fild dword [esp + 0x18]
test edi, edi
jns 0x43263e
fadd qword [0x4b7668]
fmul qword [0x4b76b8]
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 0x4326c2
cmp edi, 0x320000
jae 0x432678
add edi, 0x8000
jmp 0x4326c2
cmp edi, 0xc80000
jae 0x4326bc
mov dword [esp + 0x18], edi
fild dword [esp + 0x18]
test edi, edi
jns 0x432692
fadd qword [0x4b7668]
fmul qword [0x4b76b0]
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 0x4326c2
add edi, 0x20000
mov eax, dword [0x4bd3ec]
cmp edi, eax
jbe 0x4326cd
mov edi, eax
cmp cl, 2
jne 0x432706
test edx, edx
je 0x432706
mov edx, dword [esi + 8]
push edx
mov bl, 1
call fcn.00487975
add esp, 4
cmp edi, 0x7fffffff
ja 0x43270a
push edi
call fcn.004863c4
add esp, 4
test eax, eax
je 0x43270a
mov ebx, dword [esp + 0x24]
mov byte [esi + 0x14], 2
jmp 0x432586
xor bl, bl
jmp 0x4326e4
test bl, bl
je 0x43271d
xor eax, eax
mov dword [esi + 0x10], eax
mov dword [esi + 8], 0x4c30f4
mov dword [esi + 0xc], eax
push 0x4a596c
push str.Out_of_memory.__The_current_thread_will_exit.
mov ecx, 0x4c3168
call fcn.0042d6d0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4