Function at 0x430510
Capabilities:
Get keyboard layout

Disassembly:
push 0xffffffffffffffff
push 0x59f98e
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x5f13cc]
xor eax, esp
mov dword [esp + 0x420], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0x438]
mov dword fs:[0], eax
lea edi, [esp + 0x448]
mov dword [esp + 0x440], 0
call fcn.0040f8f0
mov esi, dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
push 0
or ebx, 0xffffffff
push 0
mov dword [esp + 0x20], ebx
call esi
mov edi, eax
test edi, edi
mov dword [esp + 0x20], edi
jle 0x4305af
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0057740a
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4305af
push ebp
push edi
call esi
test eax, eax
jne 0x4305df
push ebp
call fcn.0057832c
add esp, 4
mov dword [esp + 0x440], ebx
mov eax, dword [esp + 0x448]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4305d8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x4307cf
xor esi, esi
push 0x206
lea ecx, [esp + 0x2a]
push esi
push ecx
mov word [esp + 0x30], si
call fcn.00580260
push 0x206
lea edx, [esp + 0x23e]
push esi
push edx
mov word [esp + 0x244], si
call fcn.00580260
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
add esp, 0x18
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x440], 1
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
test edi, edi
mov byte [esp + 0x440], 2
jle 0x43074d
push 0x208
lea eax, [esp + 0x28]
push 0
push eax
call fcn.00580260
push 0x208
lea ecx, [esp + 0x23c]
push 0
push ecx
call fcn.00580260
mov edx, dword [ebp + esi*4]
add esp, 0x18
push edx
call sub.IMM32.dll_ImmIsIME
test eax, eax
je 0x430738
mov ecx, dword [ebp + esi*4]
push 0x104
lea eax, [esp + 0x28]
push eax
push ecx
call sub.IMM32.dll_ImmGetIMEFileNameW
mov eax, dword [ebp + esi*4]
push 0x104
lea edx, [esp + 0x230]
push edx
push eax
call sub.IMM32.dll_ImmGetDescriptionW
lea eax, [esp + 0x24]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4306c4
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x24]
mov ebx, eax
push ecx
lea eax, [esp + 0x18]
call fcn.00404050
lea eax, [esp + 0x22c]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4306f0
sub eax, edx
sar eax, 1
lea edx, [esp + 0x22c]
mov ebx, eax
push edx
lea eax, [esp + 0x20]
call fcn.00404050
lea edi, [esp + 0x14]
call fcn.0040f8f0
lea eax, [esp + 0x448]
push eax
mov eax, edi
call fcn.00425c40
add esp, 4
or ebx, 0xffffffff
test al, al
jne 0x430745
mov edi, dword [esp + 0x20]
add esi, 1
cmp esi, edi
jl 0x430658
jmp 0x43074d
mov ecx, dword [ebp + esi*4]
mov dword [esp + 0x18], ecx
push ebp
call fcn.0057832c
mov byte [esp + 0x444], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
mov ecx, ebx
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x43077d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x440], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4307a4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x440], ebx
mov eax, dword [esp + 0x448]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], ebx
dec ebx
test ebx, ebx
jg 0x4307cb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x438]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x420]
xor ecx, esp
call fcn.005787fd
add esp, 0x430
ret