Function at 0x40a010
Capabilities:
Get keyboard layout

Disassembly:
sub esp, 0xc
push esi
mov esi, ecx
push edi
mov edi, 1
lea eax, [esi + 0x64]
push edi
push eax
call fcn.0040b4e0
push 0
mov dword [esi + 0x44], edi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push edi
mov ecx, esi
mov dword [0x616094], eax
call fcn.00409210
test eax, eax
jne 0x40a04a
pop edi
pop esi
add esp, 0xc
ret 4
call fcn.004889b0
call fcn.00484750
mov eax, dword [esp + 0x18]
mov ecx, dword [0x5e9094]
lea edx, [esp + 0xc]
mov dword [0x5e30e8], ecx
push edx
push 0x4ef7b4
push eax
mov dword [esp + 0x18], 0
call fcn.00441d20
mov dword [0x5e30ec], eax
mov eax, dword [esp + 0x18]
add esp, 0xc
test eax, eax
jne 0x40a098
mov ecx, dword [0x5e908c]
mov dword [0x5e30ec], ecx
push ebx
mov ecx, esi
call fcn.0040b4a0
push edi
call fcn.0041ba40
add esp, 4
mov ecx, esi
call fcn.0040a2d0
push 0x16
push str.FavoriteCY
push str.ToolBar
call fcn.004c6be0
mov ecx, eax
call fcn.004c7d20
mov dword [0x60a520], eax
call fcn.004c6be0
mov dword [eax + 0x34], edi
call fcn.00439350
mov ebx, eax
mov dword [esp + 0xc], ebx
call fcn.00484180
mov dword [esp + 0x14], eax
call fcn.00423e30
mov ecx, eax
call fcn.00424120
call fcn.00423e30
mov ecx, eax
call fcn.0042c3c0
call fcn.00423e30
mov ecx, eax
call fcn.00425e50
call fcn.00488410
cmp word [0x50dd10], 0
jne 0x40a1cc
push 0x103
push 0x50dd10
push edi
mov ecx, esi
call fcn.0040aca0
lea edx, [esp + 0x1c]
test edx, edx
je 0x40a172
mov ecx, 0x104
mov eax, 0x50dd10
xor edi, edi
cmp word [eax], 0
je 0x40a154
add eax, 2
dec ecx
jne 0x40a146
jmp 0x40a158
test ecx, ecx
jne 0x40a15d
mov edi, 0x80070057
test edi, edi
jl 0x40a16a
mov edx, 0x104
sub edx, ecx
jmp 0x40a16c
xor edx, edx
test edi, edi
jl 0x40a1cc
jmp 0x40a176
mov edx, dword [esp + 0x1c]
mov ecx, 0x104
lea eax, [edx*2 + 0x50dd10]
sub ecx, edx
je 0x40a1be
mov ebx, str.dataIECompat.dat
lea edi, [ecx + edx + 0x7ffffefb]
sub ebx, eax
test edi, edi
je 0x40a1b6
mov dx, word [ebx + eax]
test dx, dx
je 0x40a1b6
mov word [eax], dx
add eax, 2
dec ecx
dec edi
test ecx, ecx
jne 0x40a194
mov ebx, dword [esp + 0xc]
sub eax, 2
jmp 0x40a1c7
test ecx, ecx
jne 0x40a1c3
mov ebx, dword [esp + 0xc]
sub eax, 2
jmp 0x40a1c7
mov ebx, dword [esp + 0xc]
mov word [eax], 0
call fcn.0045c390
mov ecx, eax
call fcn.0045c3e0
push 0x50dd10
call fcn.0040e140
mov ecx, eax
call fcn.0040e170
mov eax, dword [0x5e22c8]
test eax, eax
je 0x40a20d
mov ecx, dword [0x5e22c0]
mov edx, dword [0x5e22c4]
push ecx
push edx
push eax
call fcn.00423e30
mov ecx, eax
call fcn.0042a630
test ebx, ebx
je 0x40a237
mov eax, dword [esp + 0x1c]
mov ecx, esi
push eax
call fcn.0040a380
test eax, eax
je 0x40a22f
mov ecx, esi
call fcn.0040a600
mov ecx, ebx
call fcn.0043a320
mov edx, dword [ebx]
push 1
mov ecx, ebx
call dword [edx]
mov eax, dword [esi + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
pop ebx
je 0x40a24f
push eax
call edi
mov dword [esi + 0x10], 0
mov eax, dword [esi + 0x20]
test eax, eax
je 0x40a26a
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [esi + 0x20]
push eax
call edi
mov dword [esi + 0x20], 0
call fcn.00417260
test eax, eax
je 0x40a27b
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x40a289
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, 0x5e7150
call fcn.004b8980
call fcn.004af080
push 0
call fcn.0041ba40
add esp, 4
mov ecx, esi
push 0
call fcn.00409210
mov esi, dword [esi + 0x14]
test esi, esi
je 0x40a2b5
push esi
call edi
pop edi
mov eax, 1
pop esi
add esp, 0xc
ret 4