Function at 0x4338d0
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x851c
call fcn.004936b0
mov eax, dword [0x4c1e48]
push ebx
push esi
push edi
xor edi, edi
mov dword [esp + 0x20], eax
cmp eax, edi
jne 0x43391d
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.0042eb20
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.00490d90
add esp, 0xc
push 0x1ff
lea edx, [esp + 0x32d]
push edi
push edx
mov byte [esp + 0x334], 0
call fcn.00490d90
xor eax, eax
add esp, 0xc
mov word [esp + 0x12], ax
cmp word [ebx], di
je 0x433aba
xor ecx, ecx
mov word [esp + 0x10], cx
movzx ecx, word [ebx]
mov eax, ecx
sub eax, 0x7b
je 0x4339cf
sub eax, 2
je 0x433aa9
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.00411960
add esp, 8
jmp 0x433a6d
lea eax, [ebx + 2]
push 0x7d
push eax
mov dword [esp + 0x2c], eax
call fcn.00488f71
mov edi, eax
add esp, 8
test edi, edi
je 0x433aa9
mov esi, edi
sub esi, ebx
sar esi, 1
dec esi
jne 0x433a07
cmp word [edi + 2], 0x7d
jne 0x433aa9
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.00411960
add esp, 8
mov byte [esp + 0xf], al
test al, al
je 0x433a46
cmp esi, 1
jne 0x433a5f
mov ax, word [ebx]
mov word [esp + 0x10], ax
jmp 0x433a5f
mov eax, ebx
call fcn.004118c0
movzx eax, ax
test ax, ax
je 0x433a5f
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 0x433aa9
movzx esi, al
or byte [esp + esi + 0x228], 1
cmp word [esp + 0x10], 0
lea esi, [esp + esi + 0x228]
je 0x433aa9
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_IsCharAlphaW]
test eax, eax
jne 0x433aa9
test byte [esp + 0xe], 0x30
je 0x433aa6
or byte [esi], 2
jmp 0x433aa9
or byte [esi], 4
add ebx, 2
cmp word [ebx], 0
jne 0x433988
mov esi, dword [esp + 0x18]
mov dword [0x4c3fdc], 0
cmp word [esi], 0
je 0x433c7a
cmp dword [0x4c3fd8], 0
jne 0x433b14
push 0x1000
call fcn.00488234
add esp, 4
mov dword [0x4c3fd8], eax
test eax, eax
jne 0x433b0a
mov ecx, dword [ebp + 8]
push 0x4a59a4
push 0
push str.Out_of_memory.
call fcn.0042ed60
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.0041fcd0
inc eax
cmp eax, dword [0x4c3fe8]
jbe 0x433b8f
mov dword [0x4c3fe8], eax
cmp eax, 0x1000
ja 0x433b42
mov dword [0x4c3fe8], 0x1000
mov eax, dword [0x4c3fe4]
test eax, eax
je 0x433b54
push eax
call fcn.004897ff
add esp, 4
mov ecx, dword [0x4c3fe8]
lea edx, [ecx + ecx]
push edx
call fcn.00488234
add esp, 4
mov dword [0x4c3fe4], eax
test eax, eax
jne 0x433b94
push 0x4a59a4
push eax
push str.Out_of_memory.
mov ecx, ebx
mov dword [0x4c3fe8], eax
call fcn.0042ed60
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 0x433c5a
movzx eax, word [ebx]
cmp eax, 0x2c
je 0x433bc8
mov word [edi], ax
add edi, 2
jmp 0x433c4d
cmp word [ebx + 2], 0x2c
jne 0x433bdf
mov eax, 0x2c
mov word [edi], ax
add edi, 2
add ebx, 2
jmp 0x433c4d
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 0x433c14
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 0x433c4d
mov edx, dword [0x4c3fe0]
cmp eax, edx
jb 0x433c4d
lea edx, [edx*4 + 0x1000]
push edx
push ecx
call fcn.00489457
add esp, 8
test eax, eax
je 0x433aed
add dword [0x4c3fe0], 0x400
mov dword [0x4c3fd8], eax
add ebx, 2
cmp word [ebx], 0
jne 0x433bb5
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 0x433c7a
inc dword [0x4c3fdc]
cmp byte [0x4c1ffc], 0
je 0x433cb8
mov ecx, dword [0x4c1ea8]
push 0xc
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x433c9d
mov byte [0x4c1ffc], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x433cb8
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.00490d90
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 0x433e12
mov ebx, edx
add ebx, 2
lea esp, [esp]
movzx edi, word [ebx - 2]
test edi, 0xffffff80
jne 0x433d3e
push 2
push edi
call fcn.004893ee
add esp, 8
test eax, eax
je 0x433d3e
and edi, 0xffffffdf
movzx eax, di
add eax, 0xffffffd6
cmp eax, 0x2c
ja case.0x433d54.43
movzx eax, byte [eax + 0x43411c]
jmp dword [eax*4 + 0x4340f8]
mov byte [0x4c3fec], 0
jmp case.0x433d54.43
mov byte [0x4c3fed], 1
jmp case.0x433d54.43
mov byte [0x4c3fee], 1
jmp case.0x433d54.43
mov byte [0x4c3fef], 1
jmp case.0x433d54.43
push ebx
call fcn.00489436
add esp, 4
mov dword [0x4c3ffc], eax
cmp eax, 0x3fff
jle case.0x433d54.43
mov dword [0x4c3ffc], 0x3fff
jmp case.0x433d54.43
mov eax, ebx
call fcn.0040c8e0
test al, al
je 0x433ddc
push 0x10
push 0
push ebx
call fcn.00489b67
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
fild qword [esp + 0x24]
add esp, 0xc
fmul qword [0x4b8958]
call fcn.004967e0
mov esi, eax
jmp case.0x433d54.43
push ebx
call fcn.00489c46
fmul qword [0x4b8958]
add esp, 4
call fcn.004967e0
mov esi, eax
jmp case.0x433d54.43
mov byte [0x4c3ff0], 1
jmp case.0x433d54.43
mov byte [0x4c3ff1], 1
add ebx, 2
cmp word [ebx - 2], 0
jne 0x433d20
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 0x433e5e
mov eax, dword [0x4bf608]
movzx ecx, word [eax]
push ecx
call fcn.004079e0
add esp, 4
test esi, esi
jle 0x433ea0
cmp byte [0x4c1ffc], 0
jne 0x433ea0
mov eax, 0xa
cmp esi, 0xa
jl 0x433e77
mov eax, esi
mov edx, dword [0x4c1ea8]
push 0x403290
push eax
push 0xc
push edx
call dword [sym.imp.USER32.dll_SetTimer]
test eax, eax
setne al
mov byte [0x4c1ffc], al
jmp 0x433ea0
push 1
push 0x8000012f
call fcn.004012b0
mov eax, dword [0x4c3fc4]
add esp, 8
cmp eax, 1
je 0x433ea0
add eax, 0xfffffffe
cmp eax, 3
ja case.default.0x433ec5
jmp dword [eax*4 + 0x43414c]
push 1
push 0
push 0xffffffffffffffff
push str.Timeout
jmp 0x434083
push 1
push 0
push 0xffffffffffffffff
push str.Match
jmp 0x434083
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.00490d90
add esp, 0xc
cmp byte [0x4c3fd5], 0
je 0x433fcf
push 0xff
lea eax, [esp + 0x12d]
push 0
push eax
mov byte [esp + 0x134], 0
call fcn.00490d90
or byte [esp + 0x144], 0x80
add esp, 0xc
call dword [sym.imp.USER32.dll_GetForegroundWindow]
test eax, eax
je 0x433f70
push 0
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
jmp 0x433f72
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.00411dc0
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 0x434083
cmp byte [0x4c3fd4], 0
je 0x434045
mov cx, word [0x4c3fd2]
xor eax, eax
cmp word [eax*8 + 0x4bf59c], cx
je 0x434018
inc eax
cmp eax, 0xd
jl 0x433fe1
movzx edx, cx
push edx
push str.sc_03X
mov esi, 0x79
lea edi, [esp + 0x3e]
call fcn.0046f100
add esp, 8
push 1
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x34]
push eax
jmp 0x434083
mov edx, dword [eax*8 + 0x4bf598]
push 0x78
push edx
lea eax, [esp + 0x3e]
push eax
call fcn.0048ac34
add esp, 0xc
push 1
xor ecx, ecx
push ecx
push 0xffffffffffffffff
lea eax, [esp + 0x34]
mov word [esp + 0x132], cx
push eax
jmp 0x434083
mov bl, byte [0x4c3fd0]
push 1
mov eax, 0x79
lea ecx, [esp + 0x3a]
call fcn.00411830
add esp, 4
push 1
push 0
push 0xffffffffffffffff
lea eax, [esp + 0x34]
push eax
jmp 0x434083
push 1
push 0
push 0xffffffffffffffff
push 0x4a4378
jmp 0x434083
push 1
push 0
push 0xffffffffffffffff
push str.NewInput
mov ecx, dword [0x4c26a8]
call fcn.00471c00
cmp byte [0x4c1ffc], 0
mov dword [0x4c3fc4], 0
je 0x4340d6
mov ecx, dword [0x4c1ea8]
push 0xc
push ecx
call dword [sym.imp.USER32.dll_KillTimer]
test eax, eax
je 0x4340bb
mov byte [0x4c1ffc], 0
push 0x10
call dword [sym.imp.USER32.dll_GetQueueStatus]
shr eax, 0x10
test al, 0x10
je 0x4340d6
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.00471c00
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4