Function at 0x4315c0
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x44dc
call fcn.004918b0
mov eax, dword [0x4ae860]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x24], eax
push ebx
push esi
push edi
test eax, eax
jne 0x43160e
cmp dword [0x4ae970], 1
mov dword [0x4ae970], 0
sete al
test al, al
sete al
movzx eax, al
push eax
call fcn.0042c990
lea esp, [ebp - 0x44e8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x4ae8bc]
mov esi, dword [0x4ae8b4]
mov ebx, dword [0x4ae8b8]
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [0x4ae970], 0
mov dword [0x4ae99c], 1
mov word [0x4ae9a0], 0
mov dword [0x4ae9ac], 0x3fff
mov dword [ebp - 0x14], eax
mov byte [ebp - 1], al
mov al, byte [esi]
mov dword [ebp - 0x18], ebx
test al, al
je 0x43171e
lea edi, [esi + 1]
movzx ebx, al
test ebx, 0xffffff80
jne 0x43167e
push 2
push ebx
call fcn.00485bac
add esp, 8
test eax, eax
je 0x43167e
and ebx, 0xffffffdf
movsx eax, bl
add eax, 0xffffffd6
cmp eax, 0x2c
ja case.0x431694.43
movzx eax, byte [eax + 0x431f0c]
jmp dword [eax*4 + 0x431ee4]
mov byte [0x4ae99c], 0
jmp case.0x431694.43
mov byte [0x4ae99d], 1
jmp case.0x431694.43
mov byte [0x4ae99e], 1
jmp case.0x431694.43
mov byte [0x4ae99f], 1
jmp case.0x431694.43
push edi
call fcn.00485ca0
add esp, 4
mov dword [0x4ae9ac], eax
cmp eax, 0x3fff
jle case.0x431694.43
mov dword [0x4ae9ac], 0x3fff
jmp case.0x431694.43
mov ecx, edi
call fcn.00413430
mulsd xmm0, qword [0x4a4278]
cvttsd2si eax, xmm0
mov dword [ebp - 0x14], eax
jmp case.0x431694.43
mov byte [0x4ae9a0], 1
jmp case.0x431694.43
mov byte [0x4ae9a1], 1
jmp case.0x431694.43
mov byte [ebp - 1], 1
mov al, byte [esi + 1]
inc esi
inc edi
test al, al
jne 0x431661
mov ebx, dword [ebp - 0x18]
push 0xff
lea eax, [ebp - 0x1d7]
mov byte [ebp - 0x1d8], 0
push 0
push eax
call fcn.0048e820
add esp, 0xc
mov byte [ebp - 0x4d8], 0
lea eax, [ebp - 0x4d7]
push 0x1ff
push 0
push eax
call fcn.0048e820
xor ecx, ecx
add esp, 0xc
mov byte [ebp - 0xb], cl
mov edi, ebx
mov dword [ebp - 8], ecx
cmp byte [ebx], cl
je 0x4317e1
mov bl, byte [ebp - 1]
lea esp, [esp]
mov byte [ebp - 0xc], 0
mov dl, byte [edi]
movsx eax, dl
sub eax, 0x7b
je 0x4317b3
sub eax, 2
je 0x4317d8
test bl, bl
je 0x43178d
inc ecx
mov dword [ebp - 8], ecx
jmp 0x4317d8
push 0
mov byte [ebp - 0xc], dl
mov byte [ebp - 1], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [ebp - 1]
lea ecx, [ebp - 0xc]
call fcn.00412340
add esp, 0xc
jmp 0x431894
lea eax, [edi + 1]
push 0x7d
push eax
mov dword [ebp - 0x1c], eax
call fcn.004855e4
mov esi, eax
add esp, 8
test esi, esi
je 0x4317d5
sub eax, edi
dec eax
jne 0x43182f
inc esi
cmp byte [esi], 0x7d
je 0x431834
mov ecx, dword [ebp - 8]
inc edi
cmp byte [edi], 0
jne 0x431770
mov ebx, dword [ebp - 0x18]
mov dword [0x4ae97c], 0x49bc4d
test ecx, ecx
je 0x431922
lea eax, [ecx + 1]
call fcn.0048eed0
mov esi, esp
mov dword [0x4ae97c], esi
cmp byte [ebx], 0
je 0x43191f
lea esp, [esp]
mov cl, byte [ebx]
movsx eax, cl
sub eax, 0x7b
je 0x4318e5
sub eax, 2
je 0x431915
mov byte [esi], cl
inc esi
jmp 0x431915
cmp eax, 1
jne 0x43184b
test bl, bl
je 0x431841
mov ecx, dword [ebp - 8]
inc ecx
mov dword [ebp - 8], ecx
jmp 0x4317d8
mov edi, dword [ebp - 0x1c]
mov al, byte [edi]
mov byte [ebp - 0xc], al
jmp 0x43184e
mov edi, dword [ebp - 0x1c]
push 0
mov byte [esi], 0
mov byte [ebp - 1], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
push ecx
push 1
lea edx, [ebp - 1]
mov ecx, edi
call fcn.00412340
add esp, 0xc
mov byte [ebp - 2], al
test al, al
jne 0x43188f
mov ecx, edi
call fcn.00412290
movzx eax, ax
test ax, ax
je 0x43188c
mov byte [ebp + eax - 0x4d8], 1
mov al, byte [ebp - 2]
mov byte [esi], 0x7d
mov edi, esi
test al, al
je 0x4317d5
movzx esi, al
or byte [ebp + esi - 0x1d8], 1
cmp byte [ebp - 0xc], 0
je 0x4317d5
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_IsCharAlphaA]
test eax, eax
jne 0x4317d5
test byte [ebp - 1], 0x30
mov ecx, dword [ebp - 8]
je 0x4318d8
or byte [ebp + esi - 0x1d8], 2
jmp 0x4317d8
or byte [ebp + esi - 0x1d8], 4
jmp 0x4317d8
lea edi, [ebx + 1]
push 0x7d
push edi
call fcn.004855e4
mov edx, eax
add esp, 8
test edx, edx
je 0x431915
cmp edx, edi
jne 0x431907
cmp byte [edx + 1], 0x7d
lea ecx, [edx + 1]
cmove edx, ecx
lea eax, [ebx + 2]
cmp edx, eax
jne 0x431913
mov al, byte [edi]
mov byte [esi], al
inc esi
mov ebx, edx
inc ebx
cmp byte [ebx], 0
jne 0x431810
mov byte [esi], 0
mov ebx, dword [ebp - 0x20]
mov dword [0x4ae98c], 0
cmp byte [ebx], 0
je 0x431b57
mov esi, dword [0x4ae988]
test esi, esi
jne 0x431986
push 0x1000
call fcn.00484535
mov esi, eax
add esp, 4
mov dword [0x4ae988], esi
test esi, esi
jne 0x43197c
mov ecx, dword [ebp - 0x10]
push 0x49bc4d
push 0
push str.Out_of_memory.
call fcn.0042cbc0
lea esp, [ebp - 0x44e8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [0x4ae990], 0x400
mov edi, dword [ebp - 0x10]
cmp byte [edi + 1], 3
ja 0x431996
xor ecx, ecx
jmp 0x431a1d
mov edx, dword [0x4ae86c]
test edx, edx
je 0x431a0b
mov al, byte [edx + 0x17]
mov byte [ebp - 2], al
test al, al
jne 0x4319b0
mov eax, dword [edx + 0xc]
mov al, byte [eax + 0x17]
cmp al, 1
jne 0x431a0b
movzx ecx, byte [edi]
lea eax, [ecx*8]
sub eax, ecx
test byte [eax*2 + 0x4aa706], 0x80
jne 0x431a0b
cmp dword [0x4ad9c8], 0
jne 0x4319f2
cmp byte [ebp - 2], 0
jne 0x4319de
mov ecx, dword [edx + 0xc]
jmp 0x4319e0
mov ecx, edx
test byte [ecx + 0x15], 0xa
jne 0x4319f2
xor eax, eax
cmp dword [ecx + 0xc], eax
setne al
test eax, eax
je 0x431a0b
cmp edx, dword [0x4ad0c8]
je 0x431a0b
mov ecx, edx
call fcn.004138c0
mov esi, dword [0x4ae988]
mov ecx, eax
jmp 0x431a1d
mov ecx, dword [0x4ae8bc]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x431a14
sub ecx, edx
inc ecx
cmp ecx, dword [0x4ae998]
jbe 0x431a8c
mov eax, 0x1000
cmp ecx, eax
cmova eax, ecx
mov ecx, dword [0x4ae994]
mov dword [0x4ae998], eax
test ecx, ecx
je 0x431a53
push ecx
call fcn.004843d4
mov eax, dword [0x4ae998]
add esp, 4
mov esi, dword [0x4ae988]
push eax
call fcn.00484535
mov ecx, eax
add esp, 4
mov dword [0x4ae994], ecx
test ecx, ecx
jne 0x431a92
push 0x49bc4d
push eax
push str.Out_of_memory.
mov ecx, edi
mov dword [0x4ae998], eax
call fcn.0042cbc0
lea esp, [ebp - 0x44e8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x4ae994]
mov eax, dword [0x4ae98c]
mov dword [esi + eax*4], ecx
cmp byte [ebx], 0
mov esi, dword [0x4ae994]
je 0x431b3a
lea esp, [esp]
mov al, byte [ebx]
cmp al, 0x2c
je 0x431abb
mov byte [esi], al
inc esi
jmp 0x431b30
cmp byte [ebx + 1], 0x2c
jne 0x431ac8
mov byte [esi], 0x2c
inc esi
inc ebx
jmp 0x431b30
mov byte [esi], 0
mov edi, dword [0x4ae988]
mov ecx, dword [0x4ae98c]
mov eax, dword [edi + ecx*4]
cmp byte [eax], 0
je 0x431af9
inc ecx
inc esi
mov dword [0x4ae98c], ecx
mov dword [edi + ecx*4], esi
mov byte [esi], 0
mov ecx, dword [0x4ae98c]
mov edi, dword [0x4ae988]
cmp byte [ebx + 1], 0
je 0x431b30
mov eax, dword [0x4ae990]
cmp ecx, eax
jb 0x431b30
lea eax, [eax*4 + 0x1000]
push eax
push edi
call fcn.00485cbd
add esp, 8
test eax, eax
je 0x43195b
add dword [0x4ae990], 0x400
mov dword [0x4ae988], eax
inc ebx
cmp byte [ebx], 0
jne 0x431ab0
mov byte [esi], 0
mov ecx, dword [0x4ae98c]
mov eax, dword [0x4ae988]
mov eax, dword [eax + ecx*4]
cmp byte [eax], 0
je 0x431b57
inc ecx
mov dword [0x4ae98c], ecx
cmp byte [0x4acec0], 0
mov ebx, dword [sym.imp.USER32.dll_KillTimer]
mov esi, dword [sym.imp.USER32.dll_GetQueueStatus]
je 0x431ba2
push 0xc
push dword [0x4ad0e0]
call ebx
movzx ecx, byte [0x4acec0]
xor edx, edx
test eax, eax
push 0x10
cmovne ecx, edx
mov byte [0x4acec0], cl
call esi
shr eax, 0x10
test al, 0x10
je 0x431ba2
mov edx, 1
or ecx, 0xffffffff
call fcn.00401790
or byte [0x4ad9f7], 1
lea eax, [ebp - 0x44d8]
cmp dword [0x4ad0fc], 0
mov dword [0x4ae9a4], eax
lea eax, [ebp - 0x1d8]
mov dword [0x4ae974], eax
lea eax, [ebp - 0x4d8]
mov byte [ebp - 0x44d8], 0
mov dword [0x4ae9a8], 0
mov dword [0x4ae978], eax
mov dword [0x4ae970], 1
mov byte [0x4ad0f1], 1
jne 0x431c08
mov eax, dword [0x4ab8fc]
sub esp, 8
movzx edx, word [eax]
call fcn.004080f0
add esp, 8
mov eax, dword [ebp - 0x14]
test eax, eax
jle 0x431c40
cmp byte [0x4acec0], 0
jne 0x431c40
mov ecx, 0xa
cmp eax, ecx
push 0x403d10
cmovl eax, ecx
push eax
push 0xc
push dword [0x4ad0e0]
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne byte [0x4acec0]
nop
mov edx, 1
mov ecx, 0x8000012f
call fcn.00401790
mov eax, dword [0x4ae970]
cmp eax, 1
je 0x431c40
add eax, 0xfffffffe
cmp eax, 3
ja case.default.0x431c65
jmp dword [eax*4 + 0x431f3c]
push 1
push 0
push 0xffffffffffffffff
push str.Timeout
jmp 0x431e6f
push 1
push 0
push 0xffffffffffffffff
push str.Match
jmp 0x431e6f
mov eax, dword [str.EndKey:]
mov dword [ebp - 0xa8], eax
mov eax, dword [0x4a1e84]
push 0x78
mov dword [ebp - 0xa4], eax
lea eax, [ebp - 0xa0]
push 0
push eax
call fcn.0048e820
mov al, byte [0x4ae984]
add esp, 0xc
test al, al
je 0x431cdd
push 1
push 0
mov byte [ebp - 0xa1], al
lea eax, [ebp - 0xa8]
push 0xffffffffffffffff
mov byte [ebp - 0xa0], 0
push eax
jmp 0x431e6f
cmp byte [0x4ae986], 0
je 0x431db4
push 0xff
lea eax, [ebp - 0x2d7]
mov byte [ebp - 0x2d8], 0
push 0
push eax
call fcn.0048e820
or byte [ebp - 0x2c8], 0x80
add esp, 0xc
call dword [sym.imp.USER32.dll_GetForegroundWindow]
xor esi, esi
test eax, eax
je 0x431d53
mov edi, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push esi
push eax
call edi
mov esi, eax
mov dword [ebp - 0xd8], 0x30
lea eax, [ebp - 0xd8]
push eax
push esi
call dword [sym.imp.USER32.dll_GetGUIThreadInfo]
test eax, eax
je 0x431d53
mov eax, dword [ebp - 0xcc]
test eax, eax
je 0x431d53
push 0
push eax
call edi
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov cl, byte [0x4ae980]
push eax
xor eax, eax
cmp dword [0x4acfb0], eax
setne al
xor dl, dl
push eax
lea eax, [ebp - 0xa1]
push eax
lea eax, [ebp - 0x2d8]
push eax
call fcn.00412900
movzx eax, ax
push eax
movzx eax, byte [0x4ae980]
push eax
call dword [sym.imp.USER32.dll_ToAsciiEx]
mov esi, dword [sym.imp.USER32.dll_GetQueueStatus]
push 1
push 0
mov byte [ebp + eax - 0xa1], 0
lea eax, [ebp - 0xa8]
push 0xffffffffffffffff
push eax
jmp 0x431e6f
cmp byte [0x4ae985], 0
je 0x431e10
mov cx, word [0x4ae982]
xor eax, eax
cmp word [eax*8 + 0x4aa1f4], cx
je 0x431df2
inc eax
cmp eax, 0xd
jl 0x431dc6
movzx eax, cx
push eax
push str.sc_03X
lea eax, [ebp - 0xa1]
push 0x79
push eax
call fcn.004715d0
add esp, 0x10
jmp 0x431e28
push 0x78
push dword [eax*8 + 0x4aa1f0]
lea eax, [ebp - 0xa1]
push eax
call fcn.00487600
add esp, 0xc
mov byte [ebp - 0x29], 0
jmp 0x431e28
mov cl, byte [0x4ae980]
lea edx, [ebp - 0xa1]
push 1
push 0x79
call fcn.004120f0
add esp, 8
mov cl, byte [ebp - 0xa1]
mov al, cl
sub al, 0x61
cmp al, 0x19
ja 0x431e48
cmp byte [ebp - 0xa0], 0
jne 0x431e48
add cl, 0xe0
mov byte [ebp - 0xa1], cl
push 1
push 0
push 0xffffffffffffffff
lea eax, [ebp - 0xa8]
push eax
jmp 0x431e6f
push 1
push 0
push 0xffffffffffffffff
push 0x4a066c
jmp 0x431e6f
push 1
push 0
push 0xffffffffffffffff
push str.NewInput
mov ecx, dword [0x4ad0c8]
call fcn.004744e0
cmp byte [0x4acec0], 0
mov dword [0x4ae970], 0
je 0x431ec1
push 0xc
push dword [0x4ad0e0]
call ebx
movzx ecx, byte [0x4acec0]
xor edi, edi
test eax, eax
push 0x10
cmovne ecx, edi
mov byte [0x4acec0], cl
call esi
shr eax, 0x10
test al, 0x10
je 0x431ec1
lea edx, [edi + 1]
or ecx, 0xffffffff
call fcn.00401790
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x44d8]
push 1
push 0
push 0xffffffffffffffff
push eax
call fcn.004744e0
lea esp, [ebp - 0x44e8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret