Function at 0x433980
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x851c
call fcn.00493810
mov eax, dword [0x4c1e48]
push ebx
push esi
push edi
xor edi, edi
mov dword [esp + 0x20], eax
cmp eax, edi
jne 0x4339cd
cmp dword [0x4c3fc4], 1
mov edx, dword [ebp + 8]
sete al
test al, al
sete al
movzx ecx, al
push ecx
push edx
mov dword [0x4c3fc4], edi
call fcn.0042ebd0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x4c1dfc]
mov esi, dword [0x4c1e04]
mov ebx, dword [0x4c1e00]
push 0xff
lea ecx, [esp + 0x22d]
push edi
push ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], esi
mov dword [0x4c3fc4], edi
mov byte [esp + 0x234], 0
call fcn.00490ef0
add esp, 0xc
push 0x1ff
lea edx, [esp + 0x32d]
push edi
push edx
mov byte [esp + 0x334], 0
call fcn.00490ef0
xor eax, eax
add esp, 0xc
mov word [esp + 0x12], ax
cmp word [ebx], di
je 0x433b6a
xor ecx, ecx
mov word [esp + 0x10], cx
movzx ecx, word [ebx]
mov eax, ecx
sub eax, 0x7b
je 0x433a7f
sub eax, 2
je 0x433b59
push 0
mov word [esp + 0x14], cx
mov byte [esp + 0x12], 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push 1
mov ecx, eax
push 1
lea edx, [esp + 0x16]
lea eax, [esp + 0x18]
call fcn.00411990
add esp, 8
jmp 0x433b1d
lea eax, [ebx + 2]
push 0x7d
push eax
mov dword [esp + 0x2c], eax
call fcn.004890d1
mov edi, eax
add esp, 8
test edi, edi
je 0x433b59
mov esi, edi
sub esi, ebx
sar esi, 1
dec esi
jne 0x433ab7
cmp word [edi + 2], 0x7d
jne 0x433b59
add edi, 2
mov esi, 1
xor edx, edx
push edx
mov word [edi], dx
mov byte [esp + 0x12], dl
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov ebx, dword [esp + 0x24]
push 1
mov ecx, eax
push 1
lea edx, [esp + 0x16]
mov eax, ebx
call fcn.00411990
add esp, 8
mov byte [esp + 0xf], al
test al, al
je 0x433af6
cmp esi, 1
jne 0x433b0f
mov ax, word [ebx]
mov word [esp + 0x10], ax
jmp 0x433b0f
mov eax, ebx
call fcn.004118f0
movzx eax, ax
test ax, ax
je 0x433b0f
mov ecx, eax
mov byte [esp + ecx + 0x328], 1
mov al, byte [esp + 0xf]
mov edx, 0x7d
mov word [edi], dx
mov ebx, edi
test al, al
je 0x433b59
movzx esi, al
or byte [esp + esi + 0x228], 1
cmp word [esp + 0x10], 0
lea esi, [esp + esi + 0x228]
je 0x433b59
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x433b59
test byte [esp + 0xe], 0x30
je 0x433b56
or byte [esi], 2
jmp 0x433b59
or byte [esi], 4
add ebx, 2
cmp word [ebx], 0
jne 0x433a38
mov esi, dword [esp + 0x18]
mov dword [0x4c3fdc], 0
cmp word [esi], 0
je 0x433d2a
cmp dword [0x4c3fd8], 0
jne 0x433bc4
push 0x1000
call fcn.00488394
add esp, 4
mov dword [0x4c3fd8], eax
test eax, eax
jne 0x433bba
mov ecx, dword [ebp + 8]
push 0x4a59a4
push 0
push str.Out_of_memory.
call fcn.0042ee10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [0x4c3fe0], 0x400
mov ebx, dword [ebp + 8]
mov edi, 3
mov ecx, ebx
call fcn.0041fd70
inc eax
cmp eax, dword [0x4c3fe8]
jbe 0x433c3f
mov dword [0x4c3fe8], eax
cmp eax, 0x1000
ja 0x433bf2
mov dword [0x4c3fe8], 0x1000
mov eax, dword [0x4c3fe4]
test eax, eax
je 0x433c04
push eax
call fcn.0048995f
add esp, 4
mov ecx, dword [0x4c3fe8]
lea edx, [ecx + ecx]
push edx
call fcn.00488394
add esp, 4
mov dword [0x4c3fe4], eax
test eax, eax
jne 0x433c44
push 0x4a59a4
push eax
push str.Out_of_memory.
mov ecx, ebx
mov dword [0x4c3fe8], eax
call fcn.0042ee10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [0x4c3fe4]
mov ecx, dword [0x4c3fdc]
mov edx, dword [0x4c3fd8]
mov dword [edx + ecx*4], eax
cmp word [esi], 0
mov edi, dword [0x4c3fe4]
mov ebx, esi
je 0x433d0a
movzx eax, word [ebx]
cmp eax, 0x2c
je 0x433c78
mov word [edi], ax
add edi, 2
jmp 0x433cfd
cmp word [ebx + 2], 0x2c
jne 0x433c8f
mov eax, 0x2c
mov word [edi], ax
add edi, 2
add ebx, 2
jmp 0x433cfd
xor ecx, ecx
mov word [edi], cx
mov ecx, dword [0x4c3fd8]
mov eax, dword [0x4c3fdc]
mov edx, dword [ecx + eax*4]
cmp word [edx], 0
je 0x433cc4
inc eax
mov dword [0x4c3fdc], eax
add edi, 2
mov dword [ecx + eax*4], edi
xor eax, eax
mov word [edi], ax
mov eax, dword [0x4c3fdc]
mov ecx, dword [0x4c3fd8]
cmp word [ebx + 2], 0
je 0x433cfd
mov edx, dword [0x4c3fe0]
cmp eax, edx
jb 0x433cfd
lea edx, [edx*4 + 0x1000]
push edx
push ecx
call fcn.004895b7
add esp, 8
test eax, eax
je 0x433b9d
add dword [0x4c3fe0], 0x400
mov dword [0x4c3fd8], eax
add ebx, 2
cmp word [ebx], 0
jne 0x433c65
xor eax, eax
mov word [edi], ax
mov ecx, dword [0x4c3fd8]
mov edx, dword [0x4c3fdc]
mov eax, dword [ecx + edx*4]
cmp word [eax], 0
je 0x433d2a
inc dword [0x4c3fdc]
cmp byte [0x4c1ffc], 0
je 0x433d68
mov ecx, dword [0x4c1ea8]
push 0xc
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x433d4d
mov byte [0x4c1ffc], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x433d68
push 1
push 0xffffffffffffffff
call fcn.004012b0
add esp, 8
push 0x7ffe
xor esi, esi
lea eax, [esp + 0x52e]
xor edx, edx
push esi
push eax
mov dword [0x4c3fec], 1
mov word [0x4c3ff0], 0
mov word [esp + 0x534], dx
call fcn.00490ef0
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x534]
add esp, 0xc
mov dword [0x4c3ff4], ecx
mov dword [0x4c3ff8], esi
mov dword [0x4c3ffc], 0x3fff
cmp word [edx], si
je 0x433ec2
mov ebx, edx
add ebx, 2
lea esp, [esp]
movzx edi, word [ebx - 2]
test edi, 0xffffff80
jne 0x433dee
push 2
push edi
call fcn.0048954e
add esp, 8
test eax, eax
je 0x433dee
and edi, 0xffffffdf
movzx eax, di
add eax, 0xffffffd6
cmp eax, 0x2c
ja case.0x433e04.43
movzx eax, byte [eax + 0x4341cc]
jmp dword [eax*4 + 0x4341a8]
mov byte [0x4c3fec], 0
jmp case.0x433e04.43
mov byte [0x4c3fed], 1
jmp case.0x433e04.43
mov byte [0x4c3fee], 1
jmp case.0x433e04.43
mov byte [0x4c3fef], 1
jmp case.0x433e04.43
push ebx
call fcn.00489596
add esp, 4
mov dword [0x4c3ffc], eax
cmp eax, 0x3fff
jle case.0x433e04.43
mov dword [0x4c3ffc], 0x3fff
jmp case.0x433e04.43
mov eax, ebx
call fcn.0040c910
test al, al
je 0x433e8c
push 0x10
push 0
push ebx
call fcn.00489cc7
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
fild qword [esp + 0x24]
add esp, 0xc
fmul qword [0x4b8958]
call fcn.00496940
mov esi, eax
jmp case.0x433e04.43
push ebx
call fcn.00489da6
fmul qword [0x4b8958]
add esp, 4
call fcn.00496940
mov esi, eax
jmp case.0x433e04.43
mov byte [0x4c3ff0], 1
jmp case.0x433e04.43
mov byte [0x4c3ff1], 1
add ebx, 2
cmp word [ebx - 2], 0
jne 0x433dd0
or byte [0x4c28e8], 1
cmp dword [0x4c1fd8], 0
lea ecx, [esp + 0x228]
lea edx, [esp + 0x328]
mov dword [0x4c3fc8], ecx
mov dword [0x4c3fcc], edx
mov dword [0x4c3fc4], 1
mov byte [0x4c1fcb], 1
jne 0x433f0e
mov eax, dword [0x4bf608]
movzx ecx, word [eax]
push ecx
call fcn.00407a10
add esp, 4
test esi, esi
jle 0x433f50
cmp byte [0x4c1ffc], 0
jne 0x433f50
mov eax, 0xa
cmp esi, 0xa
jl 0x433f27
mov eax, esi
mov edx, dword [0x4c1ea8]
push 0x4032c0
push eax
push 0xc
push edx
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
mov byte [0x4c1ffc], al
jmp 0x433f50
push 1
push 0x8000012f
call fcn.004012b0
mov eax, dword [0x4c3fc4]
add esp, 8
cmp eax, 1
je 0x433f50
add eax, 0xfffffffe
cmp eax, 3
ja case.default.0x433f75
jmp dword [eax*4 + 0x4341fc]
push 1
push 0
push 0xffffffffffffffff
push str.Timeout
jmp 0x434133
push 1
push 0
push 0xffffffffffffffff
push str.Match
jmp 0x434133
mov edx, dword [0x4a436c]
mov ecx, dword [str.EndKey:]
mov eax, dword [0x4a4370]
push 0xf0
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], ecx
mov ecx, dword [0x4a4374]
lea edx, [esp + 0x3c]
push 0
push edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ecx
call fcn.00490ef0
add esp, 0xc
cmp byte [0x4c3fd5], 0
je 0x43407f
push 0xff
lea eax, [esp + 0x12d]
push 0
push eax
mov byte [esp + 0x134], 0
call fcn.00490ef0
or byte [esp + 0x144], 0x80
add esp, 0xc
call dword [sym.imp.USER32.dll_GetForegroundWindow]
test eax, eax
je 0x434020
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x434022
xor eax, eax
push eax
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
xor ecx, ecx
cmp dword [0x4c2034], ecx
push eax
setne cl
lea edx, [esp + 0x3a]
lea eax, [esp + 0x12c]
xor bl, bl
push ecx
movzx ecx, byte [0x4c3fd0]
push 2
push edx
push eax
push ecx
call fcn.00411df0
movzx edx, ax
movzx eax, byte [0x4c3fd0]
add esp, 4
push edx
push eax
call dword [sym.imp.USER32.dll_ToUnicodeEx]
push 1
xor ecx, ecx
push ecx
mov word [esp + eax*2 + 0x3e], cx
push 0xffffffffffffffff
lea eax, [esp + 0x34]
push eax
jmp 0x434133
cmp byte [0x4c3fd4], 0
je 0x4340f5
mov cx, word [0x4c3fd2]
xor eax, eax
cmp word [eax*8 + 0x4bf59c], cx
je 0x4340c8
inc eax
cmp eax, 0xd
jl 0x434091
movzx edx, cx
push edx
push str.sc_03X
mov esi, 0x79
lea edi, [esp + 0x3e]
call fcn.0046f260
add esp, 8
push 1
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x34]
push eax
jmp 0x434133
mov edx, dword [eax*8 + 0x4bf598]
push 0x78
push edx
lea eax, [esp + 0x3e]
push eax
call fcn.0048ad94
add esp, 0xc
push 1
xor ecx, ecx
push ecx
push 0xffffffffffffffff
lea eax, [esp + 0x34]
mov word [esp + 0x132], cx
push eax
jmp 0x434133
mov bl, byte [0x4c3fd0]
push 1
mov eax, 0x79
lea ecx, [esp + 0x3a]
call fcn.00411860
add esp, 4
push 1
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x34]
push eax
jmp 0x434133
push 1
push 0
push 0xffffffffffffffff
push 0x4a4378
jmp 0x434133
push 1
push 0
push 0xffffffffffffffff
push str.NewInput
mov ecx, dword [0x4c26a8]
call fcn.00471d60
cmp byte [0x4c1ffc], 0
mov dword [0x4c3fc4], 0
je 0x434186
mov ecx, dword [0x4c1ea8]
push 0xc
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x43416b
mov byte [0x4c1ffc], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x434186
push 1
push 0xffffffffffffffff
call fcn.004012b0
add esp, 8
mov ecx, dword [esp + 0x20]
push 1
push 0
push 0xffffffffffffffff
lea edx, [esp + 0x534]
push edx
call fcn.00471d60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4