Function at 0x10006050
Capabilities:
Get common file path
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x328
mov eax, dword [0x10051034]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
xor esi, esi
push esi
push esi
mov dword [ebp - 0x318], esi
call edi
mov ebx, eax
test ebx, ebx
jle 0x10006413
push ebx
push 0x1dc
push str.refresh_locale_list
push str._s___u_:_GetKeyboardLayoutList_0__NULL__found__i_layouts._n
push 2
call dword [0x10051024]
add esp, 0x14
push esi
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov esi, dword [sym.imp.USER32.dll_GetKeyboardLayout]
push eax
call esi
push 0
mov dword [ebp - 0x324], eax
call esi
mov dword [ebp - 0x328], eax
lea eax, [ebx*4]
push eax
call fcn.10023088
add esp, 4
mov dword [ebp - 0x314], eax
push eax
push ebx
call edi
mov edi, eax
mov dword [ebp - 0x31c], edi
test edi, edi
jle 0x100063c6
push edi
cmp edi, ebx
je 0x10006110
push ebx
push 0x1e9
push str.refresh_locale_list
push str._s___u_:_Locale_size_mismatch___Expected__i__received__i__n
push 3
call dword [0x10051024]
add esp, 0x18
jmp 0x1000612a
push 0x1ed
push str.refresh_locale_list
push str._s___u_:_Received__i_locales._n
push 2
call dword [0x10051024]
add esp, 0x14
mov esi, dword [0x10051d14]
xor ebx, ebx
test esi, esi
je 0x100061f8
nop word [eax + eax]
xor dl, dl
xor eax, eax
test edi, edi
jle 0x100061b2
test dl, dl
jne 0x10006177
mov edi, dword [ebp - 0x314]
mov ecx, dword [esi]
cmp ecx, dword [edi + eax*4]
mov edi, dword [ebp - 0x31c]
jne 0x1000616e
mov ecx, dword [ebp - 0x314]
mov dl, 1
mov dword [ecx + eax*4], 0
inc eax
cmp eax, edi
jl 0x10006148
test dl, dl
je 0x100061b2
push dword [esi]
push 0x203
push str.refresh_locale_list
push str._s___u_:_Found_locale_ID__p_in_the_cache._n
push 1
call dword [0x10051024]
mov ecx, dword [ebp - 0x324]
add esp, 0x14
cmp dword [esi], ecx
mov ebx, esi
mov eax, dword [0x10051d18]
cmove eax, esi
inc dword [ebp - 0x318]
mov dword [0x10051d18], eax
jmp 0x100061ed
push dword [esi]
push 0x211
push str.refresh_locale_list
push str._s___u_:_Removing_locale_ID__p_from_the_cache._n
push 1
call dword [0x10051024]
mov eax, dword [esi + 0x14]
xor ecx, ecx
mov dword [ebx + 0x14], eax
mov eax, dword [0x10051d18]
cmp esi, eax
push esi
cmove eax, ecx
mov dword [0x10051d18], eax
call fcn.10023083
add esp, 0x18
mov esi, ebx
mov esi, dword [esi + 0x14]
test esi, esi
jne 0x10006140
xor esi, esi
mov dword [ebp - 0x31c], esi
test edi, edi
jle 0x100063e0
mov eax, dword [ebp - 0x314]
nop
lea ecx, [eax + esi*4]
mov dword [ebp - 0x320], ecx
mov ecx, dword [ecx]
test ecx, ecx
je 0x100063b5
push 0
push ecx
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.10005a40
add esp, 8
test eax, eax
jne 0x1000638d
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x10006371
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
push str._s_s
lea eax, [ebp - 0x310]
push 0x104
push eax
call fcn.10006460
lea eax, [ebp - 0x108]
push eax
mov eax, dword [ebp - 0x320]
push dword [eax]
push 0x238
push str.refresh_locale_list
push str._s___u_:_Loading_layout_for__p:__s._n
push 1
call dword [0x10051024]
push 0x18
call fcn.10023088
mov esi, eax
add esp, 0x30
mov eax, dword [ebp - 0x320]
mov eax, dword [eax]
mov dword [esi], eax
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.KbdLayerDescriptor
push eax
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1000633d
call eax
movzx ecx, word [0x10051d1c]
mov edx, eax
mov eax, dword [edx]
mov eax, dword [eax]
mov dword [esi + 8], eax
mov eax, dword [ecx + edx + 4]
mov dword [esi + 0xc], eax
mov eax, dword [edx + ecx*2 + 8]
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], 0
test ebx, ebx
jne 0x10006315
mov dword [0x10051d14], esi
jmp 0x10006318
mov dword [ebx + 0x14], esi
mov ecx, dword [ebp - 0x324]
mov ebx, esi
cmp dword [esi], ecx
mov eax, dword [0x10051d18]
cmove eax, esi
inc dword [ebp - 0x318]
mov esi, dword [ebp - 0x31c]
mov dword [0x10051d18], eax
jmp 0x100063af
push 0x26a
push str.refresh_locale_list
push str._s___u_:_GetProcAddress___failed_for_KbdLayerDescriptor__n
push 4
call dword [0x10051024]
add esp, 0x10
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push esi
call fcn.10023083
mov esi, dword [ebp - 0x31c]
add esp, 4
jmp 0x100063af
push 0x274
push str.refresh_locale_list
push str._s___u_:_GetSystemDirectory___failed__n
push 4
call dword [0x10051024]
add esp, 0x10
jmp 0x100063af
mov eax, dword [ebp - 0x320]
push dword [eax]
push 0x27a
push str.refresh_locale_list
push str._s___u_:_Could_not_find_keyboard_map_for_locale__p__n
push 4
call dword [0x10051024]
add esp, 0x14
mov eax, dword [ebp - 0x314]
inc esi
mov dword [ebp - 0x31c], esi
cmp esi, edi
jl 0x10006210
jmp 0x100063e0
push 0x282
push str.refresh_locale_list
push str._s___u_:_GetKeyboardLayoutList___failed__n
push 4
call dword [0x10051024]
add esp, 0x10
push dword [ebp - 0x314]
call fcn.10023083
add esp, 4
push 0
push dword [ebp - 0x328]
call dword [sym.imp.USER32.dll_ActivateKeyboardLayout]
mov eax, dword [ebp - 0x318]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10007b13
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10007b13
mov esp, ebp
pop ebp
ret