Function at 0x40decb
Capabilities:
Get file size
Read .ini file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 0x20]
push esi
push edi
xor edi, edi
push edi
mov eax, edi
mov dword [ebp - 4], edi
push 0x80
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x1c]
push 3
mov dword [eax], edi
pop eax
push eax
push edi
push eax
push SysReAllocString
push dword [ebp + 0xc]
mov dword [ebx], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x5a9f58], eax
cmp esi, 0xffffffff
jne 0x40df2f
or dword [0x57af10], 0xffffffff
or dword [0x57af14], 0xffffffff
xor eax, eax
jmp 0x40e5a3
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0x5a4e98
push 1
mov dword [ebp - 0x14], eax
add eax, 0xa
push str.FileLoadWarningMB
push str.Settings2
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push 2
pop ecx
test eax, eax
je 0x40df8d
shl eax, 0x14
cmp eax, dword [ebp - 0x14]
jae 0x40df8d
push 0xc361
push str.MsgFileSizeWarning
push ecx
call fcn.00409668
add esp, 0xc
cmp eax, 6
je 0x40df8d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx], 1
jmp 0x40df1a
push dword [ebp - 0x10]
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
lea eax, [ebp + 0x20]
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
sub eax, 2
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x18]
mov dword [0x5a9f58], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x40dfd8
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x40e593
cmp dword [0x5aa0e0], edi
je 0x40e01f
mov esi, dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 0xfffffffc
lea eax, [esi + eax*2]
mov dword [ebp - 0x18], eax
cmp eax, esi
jb 0x40e01f
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push str..nfo
push eax
call esi
test eax, eax
je 0x40e017
push str..diz
push dword [ebp - 0x18]
call esi
test eax, eax
jne 0x40e01f
xor eax, eax
inc eax
mov dword [ebp - 4], eax
jmp 0x40e021
mov eax, edi
mov esi, dword [ebp + 0x14]
xor ecx, ecx
mov edx, dword [ebp + 0x20]
test eax, eax
mov dword [0x5aa0ec], edi
cmovne ecx, dword [0x5adae0]
mov dword [ebp - 0x14], ecx
mov dword [esi], edi
test edx, edx
jne 0x40e0df
push 0x5a9ca0
push edi
push edi
call fcn.00410cac
mov eax, dword [0x5aa0d8]
add esp, 0xc
mov ecx, dword [eax*4 + 0x57af1c]
mov eax, dword [ebp + 0x18]
mov dword [eax], ecx
mov eax, dword [0x57af10]
cmp eax, 0xffffffff
jne 0x40e088
cmp dword [0x5aa0e4], edi
je 0x40e081
cmp dword [ebp - 4], edi
jne 0x40e081
push 6
pop eax
jmp 0x40e084
mov eax, dword [ebp - 0x14]
mov dword [esi], eax
jmp 0x40e08a
mov dword [esi], eax
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
imul eax, eax, 0x50
push edi
test byte [eax + 0x579008], 1
mov eax, 0xfde9
cmovne eax, dword [0x5a9c84]
push eax
push 0x7f5
push dword [ebp + 8]
call esi
push edi
push 0x520a5d
push dword [ebp + 8]
call fcn.0040fe2a
mov eax, dword [0x5aa0d8]
add esp, 0xc
push edi
push dword [eax*4 + 0x57af1c]
push 0x7ef
push dword [ebp + 8]
call esi
jmp 0x40e589
cmp dword [ebp + 0x10], edi
jne 0x40e293
mov ecx, dword [0x57af10]
push 5
pop eax
cmp ecx, 0xffffffff
je 0x40e103
cmp ecx, 4
je 0x40e16d
cmp ecx, eax
jne 0x40e293
cmp ecx, 4
je 0x40e16d
cmp ecx, eax
je 0x40e138
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push edx
push ebx
call fcn.004115d8
mov edx, dword [ebp + 0x20]
add esp, 0x10
test eax, eax
je 0x40e293
mov eax, dword [ebp - 0xc]
mov ecx, dword [0x57af10]
push 5
mov dword [ebp - 8], eax
pop eax
cmp ecx, 4
je 0x40e16d
cmp ecx, eax
je 0x40e15e
cmp byte [ebx], 0xef
jne 0x40e156
cmp byte [ebx + 1], 0xbb
jne 0x40e156
cmp byte [ebx + 2], 0xbf
je 0x40e293
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
jmp 0x40e188
mov edx, 0xfffe
xor eax, eax
cmp word [ebx], dx
mov edx, dword [ebp + 0x20]
jmp 0x40e17d
mov esi, 0xfeff
mov dword [ebp - 8], edi
xor eax, eax
cmp word [ebx], si
mov esi, dword [ebp + 0x14]
sete al
mov dword [ebp - 4], eax
cmp ecx, 5
je 0x40e19a
cmp dword [ebp - 8], edi
jne 0x40e19a
push 4
test eax, eax
pop eax
push 2
pop ecx
cmovne eax, ecx
jmp 0x40e1b7
push edx
push ebx
push ebx
call fcn.004c9583
mov edx, dword [ebp + 0x20]
add esp, 0xc
cmp dword [ebp - 4], edi
push 5
pop eax
push 3
pop ecx
push 2
cmovne eax, ecx
pop ecx
mov dword [esi], eax
imul eax, edx, 3
add eax, ecx
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, dword [ebp + 0x20]
mov edx, eax
mov ecx, dword [ebp - 4]
shr esi, 1
mov dword [ebp - 8], edx
test ecx, ecx
jne 0x40e1d9
inc esi
test ecx, ecx
mov dword [ebp - 4], ebx
push edi
lea eax, [ebx + 2]
mov ecx, ebx
push edi
cmovne ecx, eax
push edx
mov dword [ebp - 4], ecx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push eax
push dword [ebp - 8]
push esi
push dword [ebp - 4]
push edi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp + 0x20], eax
test eax, eax
jne 0x40e234
mov esi, dword [ebp - 8]
push edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push eax
push esi
push 0xffffffffffffffff
push dword [ebp - 4]
push edi
push edi
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp + 0x20], eax
mov eax, dword [ebp + 0x1c]
mov dword [eax], 1
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call edi
mov esi, dword [ebp + 8]
xor ebx, ebx
push ebx
push 0xfde9
push 0x7f5
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push 0x520a5d
push esi
call fcn.0040fe2a
mov eax, dword [ebp + 0x20]
mov ebx, dword [ebp - 8]
dec eax
push 0x5a9ca0
push eax
push ebx
call fcn.00410cac
mov eax, dword [ebp + 0x20]
dec eax
push eax
push ebx
push esi
call fcn.0040fe2a
mov eax, dword [ebp + 0x20]
dec eax
push eax
push ebx
push esi
call fcn.0040c375
add esp, 0x30
jmp 0x40e53c
push 0x5a9ca0
push edx
push ebx
call fcn.00410cac
mov esi, dword [0x57af10]
add esp, 0xc
cmp dword [ebp + 0x10], edi
jne 0x40e445
cmp esi, 0xffffffff
je 0x40e2c4
cmp esi, 6
je 0x40e2c4
cmp esi, 7
jne 0x40e445
cmp byte [ebx], 0xef
jne 0x40e2d9
cmp byte [ebx + 1], 0xbb
jne 0x40e2d9
cmp byte [ebx + 2], 0xbf
je 0x40e37e
push 0x5a9ca0
call fcn.0041123d
pop ecx
test eax, eax
jne 0x40e37e
mov esi, dword [0x57af10]
cmp esi, 6
je 0x40e37e
cmp esi, 7
je 0x40e37e
cmp dword [ebp - 4], edi
jne 0x40e30d
cmp dword [0x5aa0e4], edi
jne 0x40e37e
push dword [ebp + 0x20]
push ebx
call fcn.0041159e
pop ecx
pop ecx
test eax, eax
je 0x40e445
cmp byte [ebx], 0xef
jne 0x40e334
cmp byte [ebx + 1], 0xbb
jne 0x40e334
cmp byte [ebx + 2], 0xbf
lea ecx, [ebx + 3]
je 0x40e336
mov ecx, ebx
mov al, byte [ecx]
mov edx, edi
test al, al
je 0x40e364
cmp al, 0xf7
ja 0x40e353
movzx eax, al
shr eax, 4
mov eax, dword [eax*4 + 0x5213a0]
test eax, eax
jne 0x40e356
xor eax, eax
inc eax
add ecx, eax
add edx, eax
mov al, byte [ecx]
test al, al
jne 0x40e33e
test edx, edx
jne 0x40e37e
cmp dword [ebp - 4], edi
jne 0x40e445
imul eax, dword [ebp - 0x14], 0x50
test byte [eax + 0x579008], 2
je 0x40e445
push 0x5a9ca0
call fcn.004111f9
pop ecx
test eax, eax
je 0x40e3a1
mov esi, dword [0x57af10]
cmp esi, 6
je 0x40e3a1
cmp esi, 7
jne 0x40e445
mov esi, dword [ebp + 8]
push edi
push 0xfde9
push 0x7f5
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push edi
push 0x520a5d
push esi
call fcn.0040fe2a
add esp, 0xc
cmp byte [ebx], 0xef
jne 0x40e419
cmp byte [ebx + 1], 0xbb
jne 0x40e419
cmp byte [ebx + 2], 0xbf
jne 0x40e419
mov eax, dword [ebp + 0x20]
lea edi, [ebx + 3]
add eax, 0xfffffffd
push eax
push edi
push esi
call fcn.0040fe2a
mov eax, dword [ebp + 0x14]
add esp, 0xc
mov dword [eax], 7
cmp byte [ebx], 0xef
jne 0x40e404
cmp byte [ebx + 1], 0xbb
jne 0x40e404
cmp byte [ebx + 2], 0xbf
je 0x40e406
mov edi, ebx
mov eax, dword [ebp + 0x20]
add eax, 0xfffffffd
push eax
push edi
push esi
call fcn.0040c375
add esp, 0xc
jmp 0x40e439
push dword [ebp + 0x20]
push ebx
push esi
call fcn.0040fe2a
push dword [ebp + 0x20]
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov dword [eax], 6
call fcn.0040c375
add esp, 0x18
mov ecx, eax
mov eax, dword [ebp + 0x18]
mov dword [eax], ecx
jmp 0x40e589
mov eax, dword [ebp + 0x14]
cmp esi, 0xffffffff
je 0x40e453
mov dword [eax], esi
mov eax, esi
jmp 0x40e457
mov dword [eax], edi
mov eax, edi
imul eax, eax, 0x50
mov ecx, 0xfde8
test byte [eax + 0x579008], 0x40
je 0x40e472
mov esi, dword [eax + 0x57900c]
cmp esi, ecx
jne 0x40e493
mov esi, dword [eax + 0x57900c]
cmp esi, ecx
jne 0x40e546
push dword [ebp + 0x20]
push ebx
call fcn.00411579
pop ecx
pop ecx
test eax, eax
je 0x40e546
mov eax, dword [ebp + 0x20]
lea eax, [eax*2 + 0x10]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalSize]
shr eax, 1
push eax
push edi
push dword [ebp + 0x20]
push ebx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
imul ecx, esi, 3
add ecx, 0x10
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
xor eax, eax
push eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push eax
push ebx
push esi
push edi
xor esi, esi
push esi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [ebp + 0x20], eax
call edi
push esi
mov esi, dword [ebp + 8]
push 0xfde9
push 0x7f5
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0x520a5d
push esi
call fcn.0040fe2a
push dword [ebp + 0x20]
push ebx
push esi
call fcn.0040fe2a
push dword [ebp + 0x20]
push ebx
push esi
call fcn.0040c375
add esp, 0x24
mov ecx, dword [ebp + 0x18]
push ebx
mov dword [ecx], eax
call edi
jmp 0x40e590
mov esi, dword [ebp + 8]
push edi
push dword [0x5a9c84]
push 0x7f5
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push edi
push 0x520a5d
push esi
call fcn.0040fe2a
push dword [ebp + 0x20]
push ebx
push esi
call fcn.0040fe2a
push dword [ebp + 0x20]
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov dword [eax], edi
call fcn.0040c375
mov ecx, dword [ebp + 0x18]
add esp, 0x24
mov dword [ecx], eax
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor edi, edi
inc edi
or dword [0x57af10], 0xffffffff
mov eax, edi
or dword [0x57af14], 0xffffffff
pop edi
pop esi
pop ebx
leave
ret