Function at 0x431350
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46f6bd
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x495580]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x1c]
mov dword [edi], 0
push eax
mov ecx, ebx
mov dword [edi + 4], 0
mov byte [edi + 8], 0
mov dword [ebp - 0x10], 0x409
call fcn.004110d0
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0xd], 0
jne 0x431464
cmp dword [eax + 0x10], 0x409
ja 0x431464
cmp eax, dword [ebx]
je 0x431464
lea ecx, [ebp - 0x38]
call fcn.00438f3a
push ecx
xor edx, edx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.004141b0
add esp, 4
test al, al
jne 0x4313f4
lea ecx, [ebp - 0x38]
call fcn.00438f51
jmp 0x43165d
mov eax, dword [ebp - 0x30]
xor esi, esi
test eax, eax
jle 0x4313e7
nop dword [eax]
test esi, esi
js 0x431673
cmp esi, eax
jge 0x431673
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp + 8]
mov ebx, dword [eax + esi*4]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x10], ebx
push eax
call fcn.004110d0
mov eax, dword [ebp - 0x14]
cmp byte [eax + 0xd], 0
jne 0x431453
cmp ebx, dword [eax + 0x10]
jb 0x431453
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx]
je 0x431453
mov eax, dword [ebp - 0x30]
inc esi
cmp esi, eax
jl 0x431400
lea ecx, [ebp - 0x38]
call fcn.00438f51
jmp 0x43165d
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], 0xffffffff
call fcn.00438f51
jmp 0x431469
mov ebx, 0x409
push 0
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov dword [edi], eax
test eax, eax
je 0x43165d
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x38], 0x479ae4
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], 1
call fcn.00438f3a
lea edx, [ebp - 0x24]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x38]
call fcn.00417ae0
test al, al
je 0x4314f1
mov ecx, dword [ebp - 0x1c]
xor eax, eax
test ecx, ecx
jle 0x4314f1
mov esi, dword [ebp - 0x20]
nop dword [eax]
test eax, eax
js 0x431673
cmp eax, ecx
jge 0x431673
lea edx, [eax*4]
cmp dword [edx + esi], ebx
je 0x431544
inc eax
cmp eax, ecx
jl 0x4314d0
cmp ebx, 0xffffffff
jne 0x43156e
mov byte [ebp - 4], 3
call fcn.004363ea
mov ecx, eax
mov byte [ebp - 4], 2
test ecx, ecx
je 0x431678
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
push 0x4792ac
lea ecx, [ebp + 8]
mov byte [ebp - 4], 4
call fcn.00403c20
test al, al
jne 0x43153c
push 0
push 0x4792ac
lea ecx, [ebp + 8]
call fcn.00403e20
mov esi, dword [ebp + 8]
jmp 0x4315cd
mov esi, dword [ebp - 0x34]
lea ecx, [ebp - 0x24]
mov eax, dword [edx + esi]
mov dword [edi + 4], eax
mov byte [edi + 8], 0
call fcn.00438f51
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x43161a
push esi
jmp 0x431612
mov byte [ebp - 4], 6
call fcn.004363ea
mov ecx, eax
mov byte [ebp - 4], 5
test ecx, ecx
je 0x431678
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
push ebx
lea eax, [ebp + 8]
mov byte [ebp - 4], 7
push 0x4855d0
push eax
call fcn.00403530
mov ebx, dword [ebp + 8]
add esp, 0xc
add ebx, 0xfffffff0
push ebx
call fcn.00403700
add esp, 4
lea esi, [eax + 0x10]
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x4315cd
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x10
push esi
call dword [sym.imp.USER32.dll_LoadKeyboardLayoutW]
test eax, eax
mov dword [edi + 4], eax
setne al
add esi, 0xfffffff0
mov byte [edi + 8], al
mov eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4315fb
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea ecx, [ebp - 0x24]
call fcn.00438f51
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x43161a
push eax
call fcn.00437038
add esp, 4
mov eax, dword [edi + 4]
test eax, eax
je 0x43165d
mov esi, dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
push 0
push eax
call esi
test eax, eax
je 0x431637
call fcn.00431280
jmp 0x43165d
push 0
push dword [edi]
call esi
cmp byte [edi + 8], 0
mov dword [edi], 0
je 0x431656
push dword [edi + 4]
call dword [sym.imp.USER32.dll_UnloadKeyboardLayout]
mov byte [edi + 8], 0
mov dword [edi + 4], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.00436600
push 0x80004005
call fcn.00404410
int3