Function at 0x401700
Capabilities:
Identify system language via api
Query or enumerate registry value
Read .ini file

Disassembly:
sub esp, 0x848
mov eax, dword [0x41b00c]
xor eax, esp
mov dword [esp + 0x844], eax
push ebx
mov ebx, dword [esp + 0x854]
push esi
mov esi, dword [esp + 0x85c]
push edi
mov edi, dword [esp + 0x858]
push edi
push str._1.1s:.cfgLanguage.cfg
lea eax, [esp + 0x240]
push 0x104
push eax
call fcn.00405604
push edi
push str._s.cfgLanguage.cfg
lea ecx, [esp + 0x458]
push 0x104
push ecx
call fcn.00405604
add esp, 0x20
lea edx, [esp + 0x238]
push edx
push 0xffffffffffffffff
push ebx
push str.Language
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [esp + 0xc], eax
test eax, eax
jge 0x40180d
push str.SoftwareContentGuard
lea eax, [esp + 0x34]
push 0x104
push eax
call fcn.00405f4b
add esp, 0xc
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x14]
push edx
push 0
push 0xf003f
push 0
push 0x414414
push 0
lea eax, [esp + 0x4c]
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4017fe
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push edx
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
push eax
push 0
push str.USBSTART_LANGUAGE
push ecx
mov dword [esp + 0x2c], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0xc], 0
jge 0x40180d
mov dword [esp + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx ebx, ax
lea eax, [esp + 0x440]
push 0
push eax
call fcn.00406165
add esp, 8
test eax, eax
jne 0x401911
cmp dword [esp + 0xc], eax
jne 0x40186a
movzx ecx, bx
push ecx
push edi
push str._s.cfg_04x.cfg
push 0x104
push esi
call fcn.00405604
push 0
push esi
call fcn.00406165
add esp, 0x1c
test eax, eax
je 0x4019f9
lea edx, [esp + 0x440]
jmp 0x4019ea
movzx eax, bx
push eax
push str._04x.cfg
lea ecx, [esp + 0x650]
push 0x104
push ecx
call fcn.00405604
mov eax, dword [esp + 0x1c]
push 0xa
push 0x10
lea edx, [esp + 0x38]
push edx
push eax
call fcn.004060b0
add esp, 0x20
lea ecx, [esp + 0x440]
push ecx
push 0x104
lea edx, [esp + 0x38]
push edx
push 0x414414
lea eax, [esp + 0x30]
push eax
push str.File
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [esp + 0x30]
push ecx
push edi
push str._s.cfg_s
push 0x104
push esi
call fcn.00405604
push 0
push esi
call fcn.00406165
add esp, 0x1c
test eax, eax
jne 0x401904
lea edx, [esp + 0x648]
push edx
lea eax, [esp + 0x34]
push eax
call fcn.00405e86
add esp, 8
test eax, eax
je 0x4019f9
lea ecx, [esp + 0x440]
push ecx
jmp 0x4019eb
cmp dword [esp + 0xc], 0
jne 0x40194d
movzx edx, bx
push edx
push edi
push str._1.1s:.cfg_04x.cfg
push 0x104
push esi
call fcn.00405604
push 0
push esi
call fcn.00406165
add esp, 0x1c
test eax, eax
je 0x4019f9
lea eax, [esp + 0x238]
push eax
jmp 0x4019eb
movzx ecx, bx
push ecx
push str._04x.cfg
lea edx, [esp + 0x650]
push 0x104
push edx
call fcn.00405604
mov ecx, dword [esp + 0x1c]
push 0xa
push 0x10
lea eax, [esp + 0x38]
push eax
push ecx
call fcn.004060b0
add esp, 0x20
lea edx, [esp + 0x238]
push edx
push 0x104
lea eax, [esp + 0x38]
push eax
push 0x414414
lea ecx, [esp + 0x30]
push ecx
push str.File
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [esp + 0x30]
push edx
push edi
push str._1.1s:.cfg_s
push 0x104
push esi
call fcn.00405604
push 0
push esi
call fcn.00406165
add esp, 0x1c
test eax, eax
jne 0x4019e3
lea eax, [esp + 0x648]
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.00405e86
add esp, 8
test eax, eax
je 0x4019f9
lea edx, [esp + 0x238]
push edx
push 0x104
push esi
call fcn.00405f4b
add esp, 0xc
mov ecx, dword [esp + 0x850]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00405622
add esp, 0x848
ret