Function at 0x406700
Capabilities:
Identify system language via api
Read .ini file

Disassembly:
sub esp, 0x838
mov eax, dword [0x4290b8]
xor eax, esp
mov dword [esp + 0x834], eax
push ebx
mov ebx, dword [esp + 0x844]
push ebp
mov ebp, dword [esp + 0x844]
push esi
push edi
push ebp
push str._1.1s:.cfgLanguage.cfg
lea eax, [esp + 0x43c]
push 0x104
push eax
call fcn.0040b5c1
push ebp
push str._s.cfgLanguage.cfg
lea ecx, [esp + 0x3c]
push 0x104
push ecx
call fcn.0040b5c1
lea edx, [esp + 0x454]
push edx
call fcn.004065a0
add esp, 0x24
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
movzx edi, ax
lea eax, [esp + 0x24]
push 0
push eax
call fcn.0040b905
add esp, 8
test eax, eax
jne 0x4068cf
cmp dword [esp + 0x854], eax
jne 0x4068cf
test esi, esi
jne 0x4067d2
lea esi, [esp + 0x24]
call fcn.00404410
movzx eax, ax
movzx ecx, ax
push ecx
push ebp
push str._s.cfg_04x.cfg
push 0x104
push ebx
call fcn.0040b5c1
push 0
push ebx
call fcn.0040b905
add esp, 0x1c
test eax, eax
je 0x406a19
mov edx, esi
push edx
jmp 0x406a0b
movzx eax, di
push eax
push str._04x.cfg
lea ecx, [esp + 0x644]
push 0x104
push ecx
call fcn.0040b5c1
push esi
lea edx, [esp + 0x28]
push 0x41f7e0
push edx
call fcn.00404220
add esp, 0x1c
lea eax, [esp + 0x24]
push eax
push 0x104
lea ecx, [esp + 0x234]
push ecx
push 0x41f30c
lea edx, [esp + 0x24]
push edx
push str.File
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0x22c]
push eax
push ebp
push str._s.cfg_s
push 0x104
push ebx
call fcn.0040b5c1
lea eax, [esp + 0x240]
add esp, 0x14
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406850
sub eax, edx
sar eax, 1
jne 0x406874
lea ecx, [esp + 0x24]
push ecx
push 0x104
push ebx
call fcn.0040b1a9
add esp, 0xc
push 0
push ebx
call fcn.0040b905
add esp, 8
test eax, eax
je 0x406896
lea edx, [esp + 0x24]
push edx
push 0x104
push ebx
call fcn.0040b1a9
add esp, 0xc
lea eax, [esp + 0x63c]
push eax
lea ecx, [esp + 0x230]
push ecx
call fcn.0040d3b7
add esp, 8
test eax, eax
je 0x406a19
xor ecx, ecx
call fcn.00406370
test eax, eax
jge 0x406a19
lea edx, [esp + 0x24]
push edx
jmp 0x406a0b
test esi, esi
jne 0x40690c
lea esi, [esp + 0x434]
call fcn.00404410
movzx eax, ax
push eax
push ebp
push str._1.1s:.cfg_04x.cfg
push 0x104
push ebx
call fcn.0040b5c1
push 0
push ebx
call fcn.0040b905
add esp, 0x1c
test eax, eax
je 0x406a19
jmp 0x406a03
movzx edx, di
push edx
push str._04x.cfg
lea eax, [esp + 0x644]
push 0x104
push eax
call fcn.0040b5c1
push esi
lea ecx, [esp + 0x28]
push 0x41f7e0
push ecx
call fcn.00404220
add esp, 0x1c
lea edx, [esp + 0x434]
push edx
push 0x104
lea eax, [esp + 0x234]
push eax
push 0x41f30c
lea ecx, [esp + 0x24]
push ecx
push str.File
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [esp + 0x22c]
push edx
push ebp
push str._1.1s:.cfg_s
push 0x104
push ebx
call fcn.0040b5c1
lea eax, [esp + 0x240]
add esp, 0x14
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406990
sub eax, edx
sar eax, 1
jne 0x4069b7
lea eax, [esp + 0x434]
push eax
push 0x104
push ebx
call fcn.0040b1a9
add esp, 0xc
push 0
push ebx
call fcn.0040b905
add esp, 8
test eax, eax
je 0x4069dc
lea ecx, [esp + 0x434]
push ecx
push 0x104
push ebx
call fcn.0040b1a9
add esp, 0xc
lea edx, [esp + 0x63c]
push edx
lea eax, [esp + 0x230]
push eax
call fcn.0040d3b7
add esp, 8
test eax, eax
je 0x406a19
xor ecx, ecx
call fcn.00406370
test eax, eax
jge 0x406a19
lea ecx, [esp + 0x434]
push ecx
push 0x104
push ebx
call fcn.0040b1a9
add esp, 0xc
mov ecx, dword [esp + 0x844]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040b218
add esp, 0x838
ret