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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov ecx, dword [0x52a68c]
mov eax, edx
push ebx
push esi
push edi
mov edi, dword [ebp + 0x18]
xor ebx, ebx
push ebx
mov dword [ebp - 4], ecx
mov ecx, ebx
push 0x80
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x14]
push 3
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], ebx
mov dword [ecx], ebx
pop ecx
push ecx
push ebx
push ecx
push 0x80000000
push eax
mov dword [edi], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x1c], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x52ab8c], eax
cmp esi, 0xffffffff
jne 0x40621a
or dword [0x4fa124], 0xffffffff
or dword [0x4fa120], 0xffffffff
xor eax, eax
jmp 0x40698a
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0x522d98
push 1
mov dword [ebp - 0x10], eax
add eax, 0xa
push str.FileLoadWarningMB
push str.Settings2
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push 2
pop ecx
test eax, eax
je 0x406278
shl eax, 0x14
cmp eax, dword [ebp - 0x10]
jae 0x406278
push 0xc361
push str.MsgFileSizeWarning
push ecx
call fcn.0040449b
add esp, 0xc
cmp eax, 6
je 0x406278
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 1
jmp 0x406205
push dword [ebp - 8]
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
lea eax, [ebp + 0x18]
push ebx
push eax
push edi
mov dword [ebp - 0x24], edi
call dword [sym.imp.KERNEL32.dll_GlobalSize]
sub eax, 2
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x1c]
mov dword [0x52ab8c], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x4062c6
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x40697a
cmp dword [0x52ab6c], ebx
je 0x40630c
mov esi, dword [ebp - 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 0xfffffffc
lea eax, [esi + eax*2]
mov dword [ebp - 0x20], eax
cmp eax, esi
jb 0x40630c
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push str..nfo
push eax
call esi
test eax, eax
je 0x406305
push str..diz
push dword [ebp - 0x20]
call esi
test eax, eax
jne 0x40630c
mov dword [ebp - 0xc], 1
mov ecx, dword [0x52a688]
call fcn.00405a89
mov ecx, dword [0x4fa120]
neg eax
sbb esi, esi
and esi, dword [0x52a688]
cmp dword [ebp - 0xc], ebx
mov dword [0x52a688], esi
cmovne esi, dword [0x52adc8]
mov dword [ebp - 8], esi
cmp ecx, 0xffffffff
je 0x406350
call fcn.00405a89
test eax, eax
cmovne esi, dword [0x4fa120]
mov dword [ebp - 8], esi
mov eax, dword [ebp + 0x18]
mov dword [0x5278e4], ebx
test eax, eax
jne 0x4063e8
push 0x52a600
xor edx, edx
xor ecx, ecx
call fcn.0040edc1
mov eax, dword [0x52a66c]
pop ecx
mov eax, dword [eax*4 + 0x4bcd90]
mov dword [0x5278d4], eax
mov eax, dword [0x4fa124]
cmp eax, 0xffffffff
jne 0x40639f
cmp dword [0x52ab7c], ebx
je 0x40639d
cmp dword [ebp - 0xc], ebx
jne 0x40639d
push 6
pop eax
jmp 0x40639f
mov eax, esi
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
mov dword [0x5278e4], eax
imul eax, eax, 0x50
push ebx
test byte [eax + 0x4f8a50], 1
mov eax, 0xfde9
cmovne eax, dword [0x52a664]
push eax
push 0x7f5
push dword [ebp - 4]
call esi
mov eax, dword [0x52a66c]
push ebx
push dword [eax*4 + 0x4bcd90]
push 0x7ef
push dword [ebp - 4]
call esi
jmp 0x40684f
mov ecx, dword [0x4fa124]
push 5
pop edx
cmp ecx, 0xffffffff
je 0x406403
cmp ecx, 4
je 0x40686e
cmp ecx, edx
jne 0x406464
cmp ecx, 4
je 0x40686e
cmp ecx, edx
je 0x406436
lea ecx, [ebp - 0x14]
mov edx, eax
push ecx
lea ecx, [ebp - 0x20]
push ecx
mov ecx, edi
call fcn.004060c4
pop ecx
pop ecx
test eax, eax
je 0x406464
mov eax, dword [ebp - 0x14]
mov ecx, dword [0x4fa124]
push 5
mov dword [ebp - 0x18], eax
pop edx
cmp ecx, 4
je 0x40686e
cmp ecx, edx
je 0x40685f
cmp byte [edi], 0xef
jne 0x40685b
cmp byte [edi + 1], 0xbb
jne 0x40685b
cmp byte [edi + 2], 0xbf
jne 0x40685b
mov edx, dword [ebp + 0x18]
mov ecx, edi
push 0x52a600
call fcn.0040edc1
pop ecx
mov ecx, dword [0x4fa124]
cmp ecx, 0xffffffff
je 0x40648d
cmp ecx, 6
je 0x40648d
cmp ecx, 7
jne 0x4066bc
cmp byte [edi], 0xef
jne 0x4064a2
cmp byte [edi + 1], 0xbb
jne 0x4064a2
cmp byte [edi + 2], 0xbf
je 0x406654
test byte [0x52a600], 0x40
je 0x4064e1
push str.utf_8
push 0x52a61c
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x406654
push str.utf8
push 0x52a61c
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x406654
mov ecx, dword [0x4fa124]
cmp ecx, 6
je 0x406654
cmp ecx, 7
je 0x406654
cmp dword [ebp - 0xc], ebx
jne 0x406504
cmp dword [0x52ab7c], ebx
jne 0x406654
mov esi, dword [ebp - 8]
mov edx, ebx
mov eax, edi
mov dword [ebp - 0x18], edi
mov dword [ebp + 0x14], ebx
cmp dword [ebp + 0x18], edx
jle 0x406550
movzx eax, byte [eax]
imul eax, dword [eax*4 + 0x4bc7e0], 9
add eax, edx
mov edx, dword [eax*4 + 0x4bcbe0]
cmp edx, 8
je 0x4066bc
mov eax, dword [ebp - 0x18]
inc dword [ebp + 0x14]
inc eax
mov esi, dword [ebp + 0x18]
cmp dword [ebp + 0x14], esi
mov esi, dword [ebp - 8]
mov dword [ebp - 0x18], eax
jl 0x406516
test edx, edx
jne 0x4066bc
mov al, byte [edi]
cmp al, 0xef
jne 0x40656a
cmp byte [edi + 1], 0xbb
jne 0x40656a
cmp byte [edi + 2], 0xbf
jne 0x40656a
lea edx, [edi + 3]
mov dword [ebp - 0x10], edx
jmp 0x406582
mov dword [ebp - 0x10], edi
mov edx, edi
cmp al, 0xef
jne 0x40658a
cmp byte [edi + 1], 0xbb
mov dword [ebp - 0x10], edx
jne 0x40658a
cmp byte [edi + 2], 0xbf
jne 0x40658a
mov edx, dword [ebp + 0x18]
add edx, 0xfffffffd
jmp 0x40658d
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x18], edx
cmp al, 0xef
jne 0x4065a8
cmp byte [edi + 1], 0xbb
jne 0x4065a8
cmp byte [edi + 2], 0xbf
jne 0x4065a8
lea edx, [edi + 3]
mov dword [ebp + 0x14], edx
jmp 0x4065ad
mov edx, edi
mov dword [ebp + 0x14], edi
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], ebx
mov al, byte [eax]
test al, al
je 0x4065ee
mov esi, dword [ebp - 0x10]
mov edx, ebx
cmp al, 0xf7
ja 0x4065d3
movzx eax, al
shr eax, 4
mov eax, dword [eax*4 + 0x4bc7a0]
test eax, eax
jne 0x4065d6
xor eax, eax
inc eax
add esi, eax
add edx, eax
mov al, byte [esi]
test al, al
jne 0x4065be
mov esi, dword [ebp - 8]
mov eax, edx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0x14], eax
mov eax, ebx
cmp dword [ebp - 0x18], eax
jle 0x40663e
mov esi, dword [ebp - 0x18]
mov edi, ebx
mov al, byte [edx]
cmp al, 0xf7
ja 0x406629
movzx eax, al
shr eax, 4
mov edx, dword [eax*4 + 0x4bc7a0]
test edx, edx
je 0x406626
add dword [ebp + 0x14], edx
sub esi, edx
xor eax, eax
cmp edx, 4
mov edx, dword [ebp + 0x14]
sete al
inc eax
add edi, eax
jmp 0x40662e
mov edx, dword [ebp + 0x14]
inc edx
dec esi
mov dword [ebp + 0x14], edx
test esi, esi
jg 0x4065fa
mov esi, dword [ebp - 8]
mov dword [ebp - 0x10], edi
mov edi, dword [ebp - 0x24]
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0x14], eax
jne 0x406654
cmp dword [ebp - 0xc], ebx
jne 0x4066bc
imul eax, esi, 0x50
test byte [eax + 0x4f8a50], 2
je 0x4066bc
test byte [0x52a600], 0x40
je 0x4067f2
push 0x52a61c
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x4067f2
push str.utf_8
push 0x52a61c
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4067f2
push str.utf8
push 0x52a61c
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4067f2
mov ecx, dword [0x4fa124]
cmp ecx, 6
je 0x4067f2
cmp ecx, 7
je 0x4067f2
or edx, 0xffffffff
cmp ecx, edx
jne 0x406707
mov eax, dword [0x52a600]
mov ecx, edx
and eax, 0x40
cmovne ecx, dword [0x52a63c]
mov dword [0x5278e4], ecx
cmp ecx, edx
jne 0x406717
test eax, eax
je 0x4066ec
mov dword [0x5278e4], ebx
mov ecx, ebx
jmp 0x406717
mov eax, dword [0x4fa120]
cmp eax, edx
je 0x40670f
imul eax, eax, 0x50
test byte [eax + 0x4f8a50], 0x3f
je 0x40670f
mov ecx, dword [0x52a688]
mov dword [0x5278e4], ecx
jmp 0x406717
mov ecx, esi
mov dword [0x5278e4], esi
imul eax, ecx, 0x50
test byte [eax + 0x4f8a50], 0x40
je 0x4067d5
mov esi, dword [eax + 0x4f8a54]
cmp esi, 0xfde8
je 0x4067d5
mov eax, dword [ebp + 0x18]
lea eax, [eax*2 + 0x10]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
push ebx
mov dword [ebp + 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
shr eax, 1
push eax
push ebx
push dword [ebp + 0x18]
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
mov esi, eax
push edi
call ebx
imul ecx, esi, 3
add ecx, 0x10
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
xor eax, eax
push eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push eax
push edi
push esi
mov esi, dword [ebp + 0x14]
push esi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push esi
mov dword [ebp + 0x18], eax
call ebx
push 0
push 0xfde9
push 0x7f5
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SendMessageW]
push ecx
mov edx, edi
call fcn.00405801
pop ecx
push edi
mov dword [0x5278d4], eax
call ebx
jmp 0x406977
push ebx
push dword [0x52a664]
push 0x7f5
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [0x5278e4], ebx
jmp 0x406841
push ebx
push 0xfde9
push 0x7f5
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SendMessageW]
cmp byte [edi], 0xef
jne 0x406837
cmp byte [edi + 1], 0xbb
jne 0x406837
cmp byte [edi + 2], 0xbf
jne 0x406837
mov dword [0x5278e4], 7
cmp byte [edi], 0xef
jne 0x406841
cmp byte [edi + 1], 0xbb
jne 0x406841
cmp byte [edi + 2], 0xbf
lea edx, [edi + 3]
je 0x406843
jmp 0x406841
mov dword [0x5278e4], 6
mov edx, edi
push ecx
call fcn.00405801
pop ecx
mov dword [0x5278d4], eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x406977
cmp ecx, edx
jne 0x406866
mov esi, 0xfffe
jmp 0x406876
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
jmp 0x406885
mov dword [ebp - 0x18], ebx
mov esi, 0xfeff
xor eax, eax
cmp word [edi], si
sete al
mov dword [ebp - 0x14], eax
cmp ecx, edx
je 0x406897
cmp dword [ebp - 0x18], ebx
jne 0x406897
push 4
test eax, eax
pop eax
push 2
pop ecx
cmovne eax, ecx
jmp 0x4068b4
mov eax, dword [ebp + 0x18]
push eax
push edi
push edi
call fcn.0048e1ce
add esp, 0xc
cmp dword [ebp - 0x14], ebx
push 5
pop eax
push 3
pop ecx
push 2
cmovne eax, ecx
pop ecx
mov dword [0x5278e4], eax
imul eax, dword [ebp + 0x18], 3
add eax, ecx
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, dword [ebp + 0x18]
mov edx, eax
mov ecx, dword [ebp - 0x14]
shr esi, 1
mov dword [ebp - 0x18], edx
test ecx, ecx
jne 0x4068da
inc esi
test ecx, ecx
mov dword [ebp - 0x14], edi
push ebx
lea eax, [edi + 2]
mov ecx, edi
push ebx
cmovne ecx, eax
push edx
mov dword [ebp - 0x14], ecx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push eax
push dword [ebp - 0x18]
push esi
push dword [ebp - 0x14]
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp + 0x18], eax
test eax, eax
jne 0x406935
mov esi, dword [ebp - 0x18]
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push eax
push esi
push 0xffffffffffffffff
push dword [ebp - 0x14]
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x14]
mov dword [eax], 1
mov esi, dword [sym.imp.KERNEL32.dll_GlobalFree]
push edi
call esi
push ebx
push 0xfde9
push 0x7f5
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [ebp + 0x18]
mov ebx, dword [ebp - 0x18]
mov ecx, ebx
push 0x52a600
lea edx, [edx - 1]
call fcn.0040edc1
mov edx, ebx
call fcn.00405801
pop ecx
push ebx
mov dword [0x5278d4], eax
call esi
xor ebx, ebx
inc ebx
or dword [0x4fa124], 0xffffffff
mov eax, ebx
or dword [0x4fa120], 0xffffffff
pop edi
pop esi
pop ebx
leave
ret