Function at 0x40f1b7
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x2824
call fcn.00410e30
mov eax, dword [0x412054]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov ebx, ecx
mov dword [ebp - 0x2818], eax
mov edi, eax
mov dword [ebp - 0x2824], ebx
push esi
mov dword [ebp - 0x2820], edi
mov dword [ebp - 0x2814], eax
mov dword [ebp - 0x281c], ebx
mov dword [ebp - 0x2810], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
cmp eax, 0xffffffff
jne 0x40f270
push 0x408180
call dword [sym.imp.msvcrt.dll_wprintf]
push 0x1c
call fcn.004102e7
mov esi, eax
push 4
mov dword [esi], 0x10
mov dword [esi + 4], edi
mov dword [esi + 8], edi
call fcn.004102e7
add esp, 0x10
test eax, eax
je 0x40f23f
mov dword [eax], edi
jmp 0x40f241
mov eax, edi
push 0x10
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], edi
call fcn.00410315
mov dword [esp], 0x40816c
mov ecx, eax
push 8
pop edx
mov dword [esi + 0x14], eax
call fcn.00409190
mov dword [esi + 0x18], edi
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x1c], esi
jmp 0x40f487
push 0x1000
lea eax, [ebp - 0x2804]
push eax
push 0x407f84
xor eax, eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test eax, eax
jne 0x40f2a4
push esi
push 0x408220
call dword [sym.imp.msvcrt.dll_wprintf]
pop ecx
pop ecx
xor eax, eax
jmp 0x40f48a
cmp eax, 0xffe
jne 0x40f2b3
push esi
push 0x408278
jmp 0x40f295
cmp word [ebp - 0x2804], di
je 0x40f481
push esi
push 0x400
lea ecx, [ebp - 0x804]
push ecx
push 0x407f84
lea eax, [ebp - 0x2804]
lea eax, [eax + edi*2]
push 0x4082ec
push eax
mov dword [ebp - 0x280c], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x804]
push 0x408310
push eax
call dword [sym.imp.msvcrt.dll_wcstok]
mov edi, eax
xor eax, eax
mov ebx, eax
mov dword [ebp - 0x2808], ebx
pop ecx
pop ecx
test edi, edi
je 0x40f366
mov ebx, eax
push dword [ebx*4 + 0x401070]
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x40f338
inc ebx
cmp ebx, 8
jl 0x40f313
push edi
push 0x408318
jmp 0x40f295
mov eax, dword [ebp - 0x2808]
bts eax, ebx
mov dword [ebp - 0x2808], eax
xor eax, eax
push 0x408310
push eax
call dword [sym.imp.msvcrt.dll_wcstok]
pop ecx
pop ecx
mov edi, eax
push 0
pop eax
test edi, edi
jne 0x40f311
mov ebx, dword [ebp - 0x2808]
mov edi, dword [ebp - 0x280c]
push esi
push eax
push 0x4082f8
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x2808], eax
lea eax, [ebp - 0x2814]
push eax
lea eax, [ebp - 0x2810]
push eax
push esi
push edi
call fcn.0040f49b
test eax, eax
je 0x40f29d
push 0x1c
call fcn.004102e7
mov ecx, dword [ebp - 0x2810]
mov edi, eax
mov eax, dword [ebp - 0x2808]
push 4
mov dword [edi + 8], ecx
mov ecx, dword [ebp - 0x2814]
mov dword [edi], ebx
mov dword [edi + 4], eax
mov dword [edi + 0x10], ecx
call fcn.004102e7
pop ecx
pop ecx
test eax, eax
je 0x40f3d6
xor ecx, ecx
mov dword [eax], ecx
jmp 0x40f3d8
xor eax, eax
mov ebx, dword [ebp - 0x280c]
mov ecx, ebx
mov dword [edi + 0xc], eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x2818]
jne 0x40f3e6
sub ecx, edx
sar ecx, 1
push 2
pop edx
lea eax, [ecx + 1]
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00410315
mov edx, ebx
pop ecx
mov ecx, eax
mov dword [edi + 0x14], ecx
lea eax, [edx + 2]
mov dword [ebp - 0x280c], eax
mov ax, word [edx]
add edx, 2
cmp ax, word [ebp - 0x2818]
jne 0x40f421
sub edx, dword [ebp - 0x280c]
sar edx, 1
push ebx
inc edx
call fcn.00409190
mov eax, dword [ebp - 0x281c]
xor ecx, ecx
mov dword [ebp - 0x281c], edi
mov dword [eax + 0x18], edi
mov dword [edi + 0x18], ecx
mov edi, dword [ebp - 0x2820]
lea eax, [edi + edi]
inc edi
cmp word [ebp + eax - 0x2804], cx
jne 0x40f459
mov dword [ebp - 0x2820], edi
cmp word [ebp + edi*2 - 0x2804], cx
jne 0x40f2c0
mov ebx, dword [ebp - 0x2824]
mov eax, dword [ebx + 0x18]
mov dword [ebx + 0x1c], eax
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00410620
leave
ret 4