Function at 0x409f90
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.0040b460
push 0
mov dword [esi + 0x44], edi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push edi
mov ecx, esi
mov dword [0x60a764], eax
call fcn.00409190
test eax, eax
jne 0x409fca
pop edi
pop esi
add esp, 0xc
ret 4
call fcn.00488330
call fcn.004845c0
mov eax, dword [esp + 0x18]
mov ecx, dword [0x5e9094]
lea edx, [esp + 0xc]
mov dword [0x5e3098], ecx
push edx
push 0x4ef7a8
push eax
mov dword [esp + 0x18], 0
call fcn.00441a80
mov dword [0x5e309c], eax
mov eax, dword [esp + 0x18]
add esp, 0xc
test eax, eax
jne 0x40a018
mov ecx, dword [0x5e908c]
mov dword [0x5e309c], ecx
push ebx
mov ecx, esi
call fcn.0040b420
push edi
call fcn.0041b8e0
add esp, 4
mov ecx, esi
call fcn.0040a250
push 0x16
push str.FavoriteCY
push str.ToolBar
call fcn.004c6680
mov ecx, eax
call fcn.004c77d0
mov dword [0x60a520], eax
call fcn.004c6680
mov dword [eax + 0x34], edi
call fcn.00439100
mov ebx, eax
mov dword [esp + 0xc], ebx
call fcn.00483ff0
mov dword [esp + 0x14], eax
call fcn.00423c70
mov ecx, eax
call fcn.00423f70
call fcn.00423c70
mov ecx, eax
call fcn.0042c220
call fcn.00423c70
mov ecx, eax
call fcn.00425ca0
call fcn.00487d90
cmp word [0x50dcc0], 0
jne 0x40a14c
push 0x103
push 0x50dcc0
push edi
mov ecx, esi
call fcn.0040ac20
lea edx, [esp + 0x1c]
test edx, edx
je 0x40a0f2
mov ecx, 0x104
mov eax, 0x50dcc0
xor edi, edi
cmp word [eax], 0
je 0x40a0d4
add eax, 2
dec ecx
jne 0x40a0c6
jmp 0x40a0d8
test ecx, ecx
jne 0x40a0dd
mov edi, 0x80070057
test edi, edi
jl 0x40a0ea
mov edx, 0x104
sub edx, ecx
jmp 0x40a0ec
xor edx, edx
test edi, edi
jl 0x40a14c
jmp 0x40a0f6
mov edx, dword [esp + 0x1c]
mov ecx, 0x104
lea eax, [edx*2 + 0x50dcc0]
sub ecx, edx
je 0x40a13e
mov ebx, str.dataIECompat.dat
lea edi, [ecx + edx + 0x7ffffefb]
sub ebx, eax
test edi, edi
je 0x40a136
mov dx, word [ebx + eax]
test dx, dx
je 0x40a136
mov word [eax], dx
add eax, 2
dec ecx
dec edi
test ecx, ecx
jne 0x40a114
mov ebx, dword [esp + 0xc]
sub eax, 2
jmp 0x40a147
test ecx, ecx
jne 0x40a143
mov ebx, dword [esp + 0xc]
sub eax, 2
jmp 0x40a147
mov ebx, dword [esp + 0xc]
mov word [eax], 0
call fcn.0045bf90
mov ecx, eax
call fcn.0045bfe0
push 0x50dcc0
call fcn.0040e080
mov ecx, eax
call fcn.0040e0b0
mov eax, dword [0x5e2278]
test eax, eax
je 0x40a18d
mov ecx, dword [0x5e2270]
mov edx, dword [0x5e2274]
push ecx
push edx
push eax
call fcn.00423c70
mov ecx, eax
call fcn.0042a490
test ebx, ebx
je 0x40a1b7
mov eax, dword [esp + 0x1c]
mov ecx, esi
push eax
call fcn.0040a300
test eax, eax
je 0x40a1af
mov ecx, esi
call fcn.0040a580
mov ecx, ebx
call fcn.0043a080
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 0x40a1cf
push eax
call edi
mov dword [esi + 0x10], 0
mov eax, dword [esi + 0x20]
test eax, eax
je 0x40a1ea
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.00417160
test eax, eax
je 0x40a1fb
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x40a209
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, 0x5e7100
call fcn.004b8200
call fcn.004ae870
push 0
call fcn.0041b8e0
add esp, 4
mov ecx, esi
push 0
call fcn.00409190
mov esi, dword [esi + 0x14]
test esi, esi
je 0x40a235
push esi
call edi
pop edi
mov eax, 1
pop esi
add esp, 0xc
ret 4