Function at 0x409f50
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.0040b420
push 0
mov dword [esi + 0x44], edi
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
push edi
mov ecx, esi
mov dword [0x603764], eax
call fcn.00409150
test eax, eax
jne 0x409f8a
pop edi
pop esi
add esp, 0xc
ret 4
call fcn.004871f0
call fcn.00483490
mov eax, dword [esp + 0x18]
mov ecx, dword [0x5e2094]
lea edx, [esp + 0xc]
mov dword [0x5dcaa8], ecx
push edx
push 0x4e97b0
push eax
mov dword [esp + 0x18], 0
call fcn.004418a0
mov dword [0x5dcaac], eax
mov eax, dword [esp + 0x18]
add esp, 0xc
test eax, eax
jne 0x409fd8
mov ecx, dword [0x5e208c]
mov dword [0x5dcaac], ecx
push ebx
mov ecx, esi
call fcn.0040b3e0
push edi
call fcn.0041b8c0
add esp, 4
mov ecx, esi
call fcn.0040a210
push 0x16
push str.FavoriteCY
push str.ToolBar
call fcn.004c54a0
mov ecx, eax
call fcn.004c60c0
mov dword [0x603520], eax
call fcn.004c54a0
mov dword [eax + 0x34], edi
call fcn.00438ee0
mov ebx, eax
mov dword [esp + 0xc], ebx
call fcn.00482ec0
mov dword [esp + 0x14], eax
call fcn.00423c70
mov ecx, eax
call fcn.00423f60
call fcn.00423c70
mov ecx, eax
call fcn.0042c230
call fcn.00423c70
mov ecx, eax
call fcn.00425c90
call fcn.00486c50
cmp word [0x507b40], 0
jne 0x40a10c
push 0x103
push 0x507b40
push edi
mov ecx, esi
call fcn.0040abe0
lea edx, [esp + 0x1c]
test edx, edx
je 0x40a0b2
mov ecx, 0x104
mov eax, 0x507b40
xor edi, edi
cmp word [eax], 0
je 0x40a094
add eax, 2
dec ecx
jne 0x40a086
jmp 0x40a098
test ecx, ecx
jne 0x40a09d
mov edi, 0x80070057
test edi, edi
jl 0x40a0aa
mov edx, 0x104
sub edx, ecx
jmp 0x40a0ac
xor edx, edx
test edi, edi
jl 0x40a10c
jmp 0x40a0b6
mov edx, dword [esp + 0x1c]
mov ecx, 0x104
lea eax, [edx*2 + 0x507b40]
sub ecx, edx
je 0x40a0fe
mov ebx, str.dataIECompat.dat
lea edi, [ecx + edx + 0x7ffffefb]
sub ebx, eax
test edi, edi
je 0x40a0f6
mov dx, word [ebx + eax]
test dx, dx
je 0x40a0f6
mov word [eax], dx
add eax, 2
dec ecx
dec edi
test ecx, ecx
jne 0x40a0d4
mov ebx, dword [esp + 0xc]
sub eax, 2
jmp 0x40a107
test ecx, ecx
jne 0x40a103
mov ebx, dword [esp + 0xc]
sub eax, 2
jmp 0x40a107
mov ebx, dword [esp + 0xc]
mov word [eax], 0
call fcn.0045bbf0
mov ecx, eax
call fcn.0045bc40
push 0x507b40
call fcn.0040e050
mov ecx, eax
call fcn.0040e080
mov eax, dword [0x5dbc88]
test eax, eax
je 0x40a14d
mov ecx, dword [0x5dbc80]
mov edx, dword [0x5dbc84]
push ecx
push edx
push eax
call fcn.00423c70
mov ecx, eax
call fcn.0042a4a0
test ebx, ebx
je 0x40a177
mov eax, dword [esp + 0x1c]
mov ecx, esi
push eax
call fcn.0040a2c0
test eax, eax
je 0x40a16f
mov ecx, esi
call fcn.0040a540
mov ecx, ebx
call fcn.00439e60
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 0x40a18f
push eax
call edi
mov dword [esi + 0x10], 0
mov eax, dword [esi + 0x20]
test eax, eax
je 0x40a1aa
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.00417130
test eax, eax
je 0x40a1bb
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x40a1c9
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, 0x5e04f8
call fcn.004b70f0
call fcn.004ad940
push 0
call fcn.0041b8c0
add esp, 4
mov ecx, esi
push 0
call fcn.00409150
mov esi, dword [esi + 0x14]
test esi, esi
je 0x40a1f5
push esi
call edi
pop edi
mov eax, 1
pop esi
add esp, 0xc
ret 4