Function at 0x40f301
Capabilities:
Identify system language via api

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x415004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x414], edi
call fcn.0040edff
mov dword [0x4159d4], eax
mov esi, edi
movzx eax, al
and eax, 0x20
or eax, 2
push eax
push edi
push 0x401988
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ebx, eax
test ebx, ebx
je 0x40f6ce
test byte [0x4159d4], 0x20
jne 0x40f6d0
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x410]
push eax
push 0x104
push edi
push 0x401988
push edi
call dword [sym.imp.KERNEL32.dll_SearchPathW]
test eax, eax
je 0x40f6c7
mov eax, dword [ebp - 0x414]
test eax, eax
jne 0x40f39a
lea eax, [ebp - 0x410]
mov dword [ebp - 0x414], eax
jmp 0x40f3a6
xor ecx, ecx
lea edi, [ebp - 0x410]
mov word [eax - 2], cx
push 0
push 1
push 0x4017f4
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
test eax, eax
je 0x40f5a6
mov eax, dword [0x4159d4]
test al, 4
je 0x40f5f8
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx eax, ax
mov ecx, 0x404
mov dword [ebp - 0x418], eax
cmp ax, cx
jne 0x40f3f2
call fcn.0040ece6
movzx eax, ax
mov dword [ebp - 0x418], eax
lea ecx, [ebp - 0x15c]
push ecx
lea ecx, [ebp - 0x208]
push ecx
lea edx, [ebp - 0xb0]
mov ecx, eax
call fcn.0040ef7c
test eax, eax
je 0x40f59e
push dword [ebp - 0x414]
lea eax, [ebp - 0xb0]
mov edx, edi
push eax
mov ecx, ebx
call fcn.0040ef11
mov esi, eax
test esi, esi
jne 0x40f69b
push dword [ebp - 0x414]
lea eax, [ebp - 0x208]
mov edx, edi
push eax
mov ecx, ebx
call fcn.0040ef11
mov esi, eax
test esi, esi
jne 0x40f69b
cmp word [ebp - 0x15c], ax
je 0x40f47e
push dword [ebp - 0x414]
lea eax, [ebp - 0x15c]
mov edx, edi
push eax
mov ecx, ebx
call fcn.0040ef11
mov esi, eax
test esi, esi
jne 0x40f69b
mov eax, 0xc04
cmp word [ebp - 0x418], ax
jne 0x40f496
mov eax, 0x404
jmp 0x40f3ec
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultUILanguage]
movzx eax, ax
mov dword [ebp - 0x41c], eax
cmp ax, word [ebp - 0x418]
je 0x40f544
lea ecx, [ebp - 0x15c]
push ecx
lea ecx, [ebp - 0x208]
push ecx
lea edx, [ebp - 0xb0]
mov ecx, eax
call fcn.0040ef7c
test eax, eax
je 0x40f5a6
push dword [ebp - 0x414]
lea eax, [ebp - 0xb0]
mov edx, edi
push eax
mov ecx, ebx
call fcn.0040ef11
mov esi, eax
test esi, esi
jne 0x40f69b
push dword [ebp - 0x414]
lea eax, [ebp - 0x208]
mov edx, edi
push eax
mov ecx, ebx
call fcn.0040ef11
mov esi, eax
test esi, esi
jne 0x40f69b
cmp word [ebp - 0x15c], ax
je 0x40f53e
push dword [ebp - 0x414]
lea eax, [ebp - 0x15c]
mov edx, edi
push eax
mov ecx, ebx
call fcn.0040ef11
mov esi, eax
test esi, esi
jne 0x40f69b
mov eax, dword [ebp - 0x41c]
mov ecx, 0x409
cmp cx, word [ebp - 0x418]
je 0x40f58b
cmp cx, ax
je 0x40f58b
push 0
lea eax, [ebp - 0x208]
push eax
lea edx, [ebp - 0xb0]
call fcn.0040ef7c
push dword [ebp - 0x414]
lea eax, [ebp - 0xb0]
mov edx, edi
push eax
mov ecx, ebx
call fcn.0040ef11
mov esi, eax
test esi, esi
jne 0x40f69b
push dword [ebp - 0x414]
mov edx, edi
mov ecx, ebx
push 0
call fcn.0040ef11
mov esi, eax
test esi, esi
jne 0x40f69b
test bl, 1
je 0x40f6c3
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
call fcn.0040edff
test al, 0x38
je 0x40f6a6
push dword [ebp - 0x414]
lea eax, [ebp - 0x410]
push edi
push 0x4024ac
push 0x104
push eax
call fcn.0040f166
add esp, 0x14
lea ecx, [ebp - 0x410]
xor edx, edx
inc edx
push 0
call fcn.0040f0b4
jmp 0x40f6c1
test al, 3
je 0x40f5a6
call fcn.0040ed4a
lea ecx, [ebp - 0x15c]
movzx eax, ax
push ecx
lea ecx, [ebp - 0x208]
mov dword [ebp - 0x41c], eax
push ecx
lea edx, [ebp - 0xb0]
mov ecx, eax
call fcn.0040ef7c
test eax, eax
je 0x40f5a6
push dword [ebp - 0x414]
lea eax, [ebp - 0xb0]
mov edx, edi
push eax
mov ecx, ebx
call fcn.0040ef11
mov esi, eax
test esi, esi
jne 0x40f69b
push dword [ebp - 0x414]
lea eax, [ebp - 0x208]
mov edx, edi
push eax
mov ecx, ebx
call fcn.0040ef11
mov esi, eax
test esi, esi
jne 0x40f69b
cmp word [ebp - 0x15c], ax
je 0x40f68a
push dword [ebp - 0x414]
lea eax, [ebp - 0x15c]
mov edx, edi
push eax
mov ecx, ebx
call fcn.0040ef11
mov esi, eax
test esi, esi
jne 0x40f69b
mov ecx, 0x409
cmp cx, word [ebp - 0x41c]
jmp 0x40f555
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
jmp 0x40f6d0
call fcn.0040edff
push 0
test al, 0x26
pop eax
setne al
push eax
push 0
push 0x401988
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ebx, eax
mov eax, ebx
jmp 0x40f6d0
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409c10
mov esp, ebp
pop ebp
ret 4