Function at 0x41d020
Capabilities:
Get common file path
Get geographical location
Get startup folder
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4cf4f3
push eax
mov dword fs:[0], esp
sub esp, 0x558
call fcn.00414240
cmp dword [eax + 0x38], 8
jb 0x41d04e
mov ecx, dword [eax + 0x24]
jmp 0x41d051
lea ecx, [eax + 0x24]
push 0xb
push str.SHADOWARENA
push dword [eax + 0x34]
push ecx
call fcn.00416440
add esp, 0x10
test eax, eax
jne 0x41d559
push esi
lea eax, [ebp - 0x564]
push eax
push 0
push 0
push 0x8005
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x564]
push str.Shadow_Arena_
push eax
call esi
push str.GameOption.txt
lea eax, [ebp - 0x564]
push eax
call esi
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], 0
mov word [ebp - 0x38], ax
cmp word [ebp - 0x564], ax
jne 0x41d0d6
xor ecx, ecx
jmp 0x41d0ef
lea ecx, [ebp - 0x564]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x41d0e0
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x564]
push eax
lea ecx, [ebp - 0x38]
call fcn.004096c0
mov dword [ebp - 4], 0
lea eax, [ebp - 0x38]
cmp dword [ebp - 0x24], 8
push 0x4d5710
cmovae eax, dword [ebp - 0x38]
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
call fcn.004a77d8
mov eax, dword [ebp - 0x14]
add esp, 0xc
test eax, eax
jne 0x41d51f
push 0x104
push eax
lea eax, [ebp - 0x35c]
push eax
call fcn.0049edb0
push 0x104
lea eax, [ebp - 0x190]
push 0
push eax
call fcn.0049edb0
add esp, 0x18
lea eax, [ebp - 0x35c]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x35c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea eax, [ebp - 0x35c]
push eax
lea eax, [ebp - 0x190]
push 0x104
push eax
call fcn.004b260c
push 0x4d5538
lea eax, [ebp - 0x190]
push 0x104
push eax
call fcn.004b260c
push 0x4d5610
lea eax, [ebp - 0x190]
push 0x104
push eax
call fcn.004b260c
lea eax, [ebp - 0x190]
push 0x4d554c
push eax
call fcn.004a782a
add esp, 0x2c
test eax, eax
je 0x41d1e5
push eax
call fcn.004b1ad9
add esp, 4
jmp 0x41d226
lea eax, [ebp - 0x190]
push eax
push 0xff
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0x4d5538
lea eax, [ebp - 0x190]
push 0x104
push eax
call fcn.004b260c
push 0x4d5610
lea eax, [ebp - 0x190]
push 0x104
push eax
call fcn.004b260c
add esp, 0x18
push edi
push 0
push 0
push 0
lea ecx, [ebp - 0x8c]
call fcn.004118d0
mov byte [ebp - 4], 1
mov edi, 1
movzx eax, byte [ebp - 0x70]
cmp dword [ebp - 0x8c], 0
push 0x4d5788
cmove eax, edi
mov dword [ebp - 0x10], 0
mov byte [ebp - 0x70], al
lea eax, [ebp - 0x190]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004a7841
mov eax, dword [ebp - 0x10]
add esp, 0xc
test eax, eax
je 0x41d28f
push eax
lea ecx, [ebp - 0x8c]
call fcn.00414d10
push dword [ebp - 0x10]
call fcn.004b1ad9
add esp, 4
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x4d55e0
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x1c], 0
push eax
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x18], 0
call fcn.00418630
mov esi, dword [ebp - 0x10]
cmp esi, dword [ebp - 0x80]
jne 0x41d2c3
mov eax, str.FAIL
jmp 0x41d2fa
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x4d5f64
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x1c], 0
push eax
lea ecx, [esi + 0x1c]
mov dword [ebp - 0x18], 0
call fcn.00418630
mov eax, dword [ebp - 0x10]
cmp eax, dword [esi + 0x1c]
jne 0x41d2f7
mov eax, str.FAIL
jmp 0x41d2fa
mov eax, dword [eax + 0x1c]
push eax
lea ecx, [ebp - 0x68]
call fcn.00403840
mov byte [ebp - 4], 2
cmp dword [ebp - 0x8c], 0
movzx eax, byte [ebp - 0x70]
cmove eax, edi
cmp dword [ebp - 0x54], 8
push 4
mov byte [ebp - 0x70], al
lea eax, [ebp - 0x68]
cmovae eax, dword [ebp - 0x68]
push str.FAIL
push dword [ebp - 0x58]
push eax
call fcn.00416440
add esp, 0x10
pop edi
test eax, eax
jne 0x41d374
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x190]
push 0x4d5788
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004a7841
mov eax, dword [ebp - 0x10]
add esp, 0xc
test eax, eax
je 0x41d374
push eax
lea ecx, [ebp - 0x8c]
call fcn.00414d10
push dword [ebp - 0x10]
call fcn.004b1ad9
add esp, 4
push 0x64
lea eax, [ebp - 0x258]
push eax
push 0x59
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
movzx eax, ax
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
push str._EN_
lea ecx, [ebp - 0x50]
call fcn.00403840
mov byte [ebp - 4], 3
mov ecx, 0x4d5940
lea eax, [ebp - 0x258]
nop dword [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41d3d6
test dx, dx
je 0x41d3d2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41d3d6
add eax, 4
add ecx, 4
test dx, dx
jne 0x41d3b0
xor eax, eax
jmp 0x41d3db
sbb eax, eax
or eax, 1
test eax, eax
jne 0x41d3e9
push str._KR_
jmp 0x41d469
mov ecx, 0x4d5948
lea eax, [ebp - 0x258]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41d41a
test dx, dx
je 0x41d416
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41d41a
add eax, 4
add ecx, 4
test dx, dx
jne 0x41d3f4
xor eax, eax
jmp 0x41d41f
sbb eax, eax
or eax, 1
test eax, eax
jne 0x41d42a
push str._RU_
jmp 0x41d469
mov ecx, 0x4d5f38
lea eax, [ebp - 0x258]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x41d45b
test dx, dx
je 0x41d457
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x41d45b
add eax, 4
add ecx, 4
test dx, dx
jne 0x41d435
xor eax, eax
jmp 0x41d460
sbb eax, eax
or eax, 1
test eax, eax
jne 0x41d471
push str._CH_
lea ecx, [ebp - 0x50]
call fcn.0041ade0
cmp dword [ebp - 0x7c], 0
je 0x41d4b5
cmp dword [ebp - 0x3c], 8
lea eax, [ebp - 0x50]
push 1
cmovae eax, dword [ebp - 0x50]
lea ecx, [ebp - 0x8c]
push 1
push 0
push eax
push 0x4d5f64
push 0x4d55e0
call fcn.00413100
cmp eax, 1
jne 0x41d4b5
push 0
push 0x4d5610
lea ecx, [ebp - 0x8c]
call fcn.0041c070
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x3c]
cmp eax, 8
jb 0x41d4ce
inc eax
lea ecx, [ebp - 0x50]
push eax
push dword [ebp - 0x50]
call fcn.00409d20
xor eax, eax
mov dword [ebp - 0x3c], 7
mov dword [ebp - 0x40], 0
mov word [ebp - 0x50], ax
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x54]
cmp eax, 8
jb 0x41d4fb
inc eax
lea ecx, [ebp - 0x68]
push eax
push dword [ebp - 0x68]
call fcn.00409d20
xor eax, eax
mov dword [ebp - 0x54], 7
mov dword [ebp - 0x58], 0
mov word [ebp - 0x68], ax
mov byte [ebp - 4], al
lea ecx, [ebp - 0x8c]
call fcn.00412520
jmp 0x41d528
push eax
call fcn.004b1ad9
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x24]
pop esi
cmp eax, 8
jb 0x41d545
inc eax
lea ecx, [ebp - 0x38]
push eax
push dword [ebp - 0x38]
call fcn.00409d20
xor eax, eax
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], 0
mov word [ebp - 0x38], ax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret