Function at 0x412a9b
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd8
mov dword [ebp - 0x20], 0xffffffff
mov dword [ebp - 0x24], 0
jmp 0x412abb
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 2
jge 0x412ad1
mov eax, dword [ebp - 0x24]
mov dword [ebp + eax*4 - 0xd8], 1
jmp 0x412ab4
mov dword [ebp - 0x20], 1
jmp 0x412ae1
mov eax, dword [ebp - 0x20]
dec eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jl 0x412b29
mov dword [ebp - 0x58], 0x210b999f
mov byte [ebp - 8], 0
movzx eax, byte [ebp - 8]
test eax, eax
je 0x412b20
push 0
push 0
push 0
push 0x1ae9
push 0xd15
push 0
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetDC]
push eax
call dword [sym.imp.GDI32.dll_GetTextExtentExPointA]
mov eax, dword [ebp - 0x58]
dec eax
mov dword [ebp - 0x58], eax
jmp 0x412ada
mov dword [ebp - 0x2c], 1
lea eax, [ebp - 0xd0]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x2c]
dec eax
mov dword [ebp - 0x2c], eax
js 0x412b55
mov ecx, dword [ebp - 0x30]
call fcn.004178bd
mov eax, dword [ebp - 0x30]
add eax, 0x18
mov dword [ebp - 0x30], eax
jmp 0x412b39
mov dword [ebp - 4], 0x8a61928c
mov dword [ebp - 0x18], 0x14b81230
mov dword [ebp - 0xc], 1
mov dword [ebp - 0xa0], 0xfffffff9
mov dword [ebp - 0x9c], 0xfffffff9
mov dword [ebp - 0x98], 0xfffffff9
mov dword [ebp - 0x94], 0xfffffff9
mov dword [ebp - 4], 0
jmp 0x412ba2
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x19
jne 0x412d63
mov dword [ebp - 0x28], 0xdb6084ed
mov dword [ebp - 0x14], 0xdfe9f48
mov dword [ebp - 0x84], 2
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0xb0], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0xb8], eax
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x28]
cmp eax, 0xba25
jl 0x412bec
mov dword [ebp - 0x40], 1
jmp 0x412bf0
and dword [ebp - 0x40], 0
mov eax, dword [ebp - 4]
cmp dword [ebp - 0x40], eax
je 0x412c01
mov dword [ebp - 0x68], 1
jmp 0x412c05
and dword [ebp - 0x68], 0
mov eax, dword [ebp - 4]
imul eax, dword [ebp - 0x68]
cmp eax, dword [ebp - 4]
je 0x412c1a
mov dword [ebp - 0x48], 1
jmp 0x412c1e
and dword [ebp - 0x48], 0
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x48], eax
jl 0x412c2f
mov dword [ebp - 0x70], 1
jmp 0x412c33
and dword [ebp - 0x70], 0
mov eax, dword [ebp - 4]
cmp dword [ebp - 0x70], eax
jge 0x412c44
mov dword [ebp - 0x50], 1
jmp 0x412c48
and dword [ebp - 0x50], 0
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x50]
jl 0x412c59
mov dword [ebp - 0x78], 1
jmp 0x412c5d
and dword [ebp - 0x78], 0
mov eax, dword [ebp - 4]
cmp dword [ebp - 0x78], eax
jg 0x412c6e
mov dword [ebp - 0x38], 1
jmp 0x412c72
and dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x18], eax
jle 0x412c89
mov dword [ebp - 0x80], 1
jmp 0x412c8d
and dword [ebp - 0x80], 0
mov eax, dword [ebp - 0x80]
sub eax, dword [ebp - 0x14]
imul eax, dword [ebp - 4]
inc eax
je 0x412ca9
cmp dword [ebp - 0x28], 0
je 0x412ca9
mov dword [ebp - 0x60], 1
jmp 0x412cad
and dword [ebp - 0x60], 0
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x60]
cmp eax, dword [ebp - 4]
jge 0x412cc4
mov dword [ebp - 0x8c], 1
jmp 0x412ccb
and dword [ebp - 0x8c], 0
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0xac], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0xa4], eax
cmp dword [ebp - 0xc], 0x67f5
jg 0x412cf5
mov dword [ebp - 0x88], 1
jmp 0x412cfc
and dword [ebp - 0x88], 0
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x88], eax
jl 0x412d10
mov dword [ebp - 0x6c], 1
jmp 0x412d14
and dword [ebp - 0x6c], 0
mov eax, dword [ebp - 0x84]
cmp dword [ebp - 0x6c], eax
jl 0x412d28
mov dword [ebp - 0x7c], 1
jmp 0x412d2c
and dword [ebp - 0x7c], 0
mov eax, dword [ebp - 0x7c]
sub eax, 0x24b13b10
cmp dword [ebp - 4], eax
jge 0x412d4f
push 4
pop eax
imul eax, eax, 0
cmp dword [ebp + eax - 0xa0], 0
jne 0x412d4f
and dword [ebp - 0x74], 0
jmp 0x412d56
mov dword [ebp - 0x74], 1
mov eax, dword [ebp - 0x74]
neg eax
mov dword [ebp - 0x14], eax
jmp 0x412b9b
mov dword [ebp - 4], 0xfffffffd
jmp 0x412d73
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xa
jl 0x412e6a
mov dword [ebp - 0x34], 0xa24e
mov dword [ebp - 0x90], 1
cmp dword [ebp - 0x34], 0x2b293353
jle 0x412da0
mov dword [ebp - 0x64], 1
jmp 0x412da4
and dword [ebp - 0x64], 0
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0xb4], eax
cmp dword [ebp - 0x64], 0xb0debf62
jne 0x412dbf
mov dword [ebp - 0x3c], 1
jmp 0x412dc3
and dword [ebp - 0x3c], 0
cmp dword [ebp - 0x3c], 0
jbe 0x412dd2
mov dword [ebp - 0x44], 1
jmp 0x412dd6
and dword [ebp - 0x44], 0
mov eax, dword [ebp - 0x44]
dec eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xdb602708
ja 0x412df5
cmp dword [ebp - 0xc], 0
je 0x412df5
mov dword [ebp - 0x4c], 1
jmp 0x412df9
and dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x412e14
cmp dword [ebp - 0xc], 0
je 0x412e14
mov dword [ebp - 0x54], 1
jmp 0x412e18
and dword [ebp - 0x54], 0
push 4
pop eax
imul eax, eax, 0
mov eax, dword [ebp + eax - 0xa0]
imul eax, dword [ebp - 0x54]
cmp eax, 0xffffffff
jbe 0x412e3d
cmp dword [ebp - 0x34], 0
je 0x412e3d
mov dword [ebp - 0x5c], 1
jmp 0x412e41
and dword [ebp - 0x5c], 0
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x90], eax
mov byte [ebp - 7], 0
movzx eax, byte [ebp - 7]
test eax, eax
je 0x412e65
push 0xc52
push 0
push 0
call dword [sym.imp.GDI32.dll_TranslateCharsetInfo]
jmp 0x412d6c
lea eax, [ebp - 0xd0]
push eax
push 0
push 0x4cd7
push 0x438
push 0x21fe
push dword [ebp + 0xc]
push 0x4586
call fcn.00416b00
add esp, 0x1c
mov dword [ebp - 0xa8], 7
mov byte [ebp - 5], 0
movzx eax, byte [ebp - 5]
test eax, eax
je 0x412eb9
push 0
push 0x4f4
push 0x53
push 0
call dword [sym.imp.GDI32.dll_GetPaletteEntries]
mov byte [ebp - 6], 0
movzx eax, byte [ebp - 6]
test eax, eax
je 0x412ed0
push 0x239e
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push 0x18
pop eax
imul eax, eax, 0
lea eax, [ebp + eax - 0xd0]
push eax
mov ecx, dword [ebp + 8]
call fcn.00417897
mov dword [ebp - 0x1c], 1
lea eax, [ebp - 0xd0]
mov dword [ebp - 0x10], eax
imul eax, dword [ebp - 0x1c], 0x18
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x1c]
dec eax
mov dword [ebp - 0x1c], eax
js 0x412f1c
mov eax, dword [ebp - 0x10]
sub eax, 0x18
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
call fcn.004178ce
jmp 0x412f00
mov eax, dword [ebp + 8]
mov esp, ebp
pop ebp
ret