Function at 0x401121
Capabilities:
Get common file path
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x238
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x234], eax
push esi
push edi
mov edi, ecx
test dl, dl
je 0x4012f7
mov dword [esp + 0x10], 0x1f4
mov dword [esp + 0x18], 0x13dad
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], 0x1ea9
mov dword [esp + 0x20], 0x21f1
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
and eax, 0x3ff
add eax, 0xfffffffc
cmp eax, 0x15
ja case.0x401108.5
movzx eax, byte [eax + 0x40134c]
jmp dword [eax*4 + 0x401328]
xor eax, eax
jmp 0x401149
mov eax, 6
jmp 0x401149
mov eax, 2
jmp 0x401149
mov eax, 4
jmp 0x401149
mov eax, 5
jmp 0x401149
mov eax, 7
jmp 0x401149
mov eax, 8
jmp 0x401149
mov eax, 9
jmp 0x401149
mov eax, 1
mov word [esp + 0x14], ax
lea eax, [esp + 0xc]
push eax
push 0
push 0
push 0x416200
mov dword [esp + 0x1c], 0
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4011b8
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, dword [esp + 0xc]
lea eax, [eax*2 + 2]
push eax
lea eax, [esp + 0x34]
push esi
push eax
call fcn.00403660
add esp, 0xc
push esi
call dword [sym.imp.ole32.dll_CoTaskMemFree]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [esp + 0x30]
push str.JoyXoff_
push eax
call esi
push str.config.bin
lea eax, [esp + 0x34]
push eax
call esi
push 0x41bc3c
lea eax, [esp + 0x34]
mov dword [esp + 0xc], 0
push eax
lea eax, [esp + 0x10]
push eax
call fcn.00407174
mov eax, dword [esp + 0x14]
add esp, 0xc
test eax, eax
je 0x40120c
push eax
push 1
xor ecx, ecx
lea eax, [esp + 0x30]
push 6
push eax
mov dword [esp + 0x38], ecx
mov word [esp + 0x3c], cx
call fcn.004074f6
add esp, 0x10
test eax, eax
jne 0x401225
push dword [esp + 8]
call fcn.004072e0
add esp, 4
mov eax, 0x6e
pop edi
pop esi
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.00401cd1
mov esp, ebp
pop ebp
ret
lea ecx, [esp + 0x28]
mov eax, str.JCFG6
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401250
test dl, dl
je 0x40124c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401250
add eax, 2
add ecx, 2
test dl, dl
jne 0x401230
xor eax, eax
jmp 0x401255
sbb eax, eax
or eax, 1
test eax, eax
je 0x4012c1
lea ecx, [esp + 0x28]
mov eax, str.JCFG4
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x401282
test dl, dl
je 0x40127e
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x401282
add eax, 2
add ecx, 2
test dl, dl
jne 0x401262
xor eax, eax
jmp 0x401287
sbb eax, eax
or eax, 1
test eax, eax
je 0x4012c1
lea ecx, [esp + 0x28]
mov eax, str.JCFG5
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4012b4
test dl, dl
je 0x4012b0
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4012b4
add eax, 2
add ecx, 2
test dl, dl
jne 0x401294
xor eax, eax
jmp 0x4012b9
sbb eax, eax
or eax, 1
test eax, eax
jne 0x401200
push dword [esp + 8]
lea eax, [esp + 0x14]
push 1
push 0x18
push eax
call fcn.004074f6
add esp, 0x10
push dword [esp + 8]
test eax, eax
je 0x401204
call fcn.004072e0
mov eax, dword [esp + 0x1c]
add esp, 4
and eax, 0x14
cmp al, 0x14
jne 0x401310
mov ecx, edi
call fcn.00401740
pop edi
pop esi
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.00401cd1
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x23c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.00401cd1
mov esp, ebp
pop ebp
ret