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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 0x20]
push edi
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocString
push dword [ebp + 0xc]
mov dword [eax], 0
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x63c618], eax
cmp edi, 0xffffffff
jne 0x40816c
xor eax, eax
jmp 0x4088d2
push ebx
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0x637260
push 1
push str.FileLoadWarningMB
push 0x5deb68
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x4081c7
shl eax, 0x14
cmp eax, ebx
jae 0x4081c7
push 0xc361
push str.MsgFileSizeWarning
push 2
call fcn.00403430
add esp, 0xc
cmp eax, 6
je 0x4081c7
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi], 1
xor eax, eax
jmp 0x4088d1
lea eax, [ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
lea eax, [ebp + 0x20]
push 0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
sub eax, 2
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
mov dword [0x63c618], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x408214
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x4088d1
cmp dword [0x63c7a0], 0
je 0x408256
mov esi, dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [esi - 8]
lea edi, [edi + eax*2]
cmp edi, esi
jb 0x408256
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push str..nfo
push edi
call esi
test eax, eax
je 0x40824f
push str..diz
push edi
call esi
test eax, eax
jne 0x408256
mov dword [ebp - 4], 1
push dword [0x63c7ac]
call fcn.004108b0
add esp, 4
neg eax
sbb edi, edi
mov eax, dword [0x5df774]
and edi, dword [0x63c7ac]
cmp dword [ebp - 4], 0
mov dword [0x63c7ac], edi
cmovne edi, dword [0x6401a0]
cmp eax, 0xffffffff
je 0x40829b
push eax
call fcn.004108b0
add esp, 4
test eax, eax
cmovne edi, dword [0x5df774]
mov esi, dword [ebp + 0x14]
mov edx, dword [ebp + 0x20]
mov dword [esi], 0
test edx, edx
jne 0x40834d
push 0x63c360
push edx
push edx
call fcn.004110f0
mov eax, dword [0x63c798]
add esp, 0xc
mov ecx, dword [eax*4 + 0x5df77c]
mov eax, dword [ebp + 0x18]
mov dword [eax], ecx
mov eax, dword [0x5df770]
cmp eax, 0xffffffff
jne 0x4082f1
cmp dword [0x63c7a4], 0
je 0x4082ed
cmp dword [ebp - 4], 0
jne 0x4082ed
mov edi, 6
mov dword [esi], edi
jmp 0x4082f5
mov dword [esi], eax
mov edi, eax
mov esi, dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [edi + edi*4]
mov edi, dword [ebp + 8]
shl eax, 4
push 0
test byte [eax + 0x5dc518], 1
mov eax, 0xfde9
cmovne eax, dword [0x63c344]
push eax
push 0x7f5
push edi
call esi
push 0
push 0x635d82
push edi
call fcn.004078a0
mov eax, dword [0x63c798]
add esp, 0xc
push 0
push dword [eax*4 + 0x5df77c]
push 0x7ef
push edi
call esi
jmp 0x4088c5
cmp dword [ebp + 0x10], 0
jne 0x40851b
mov eax, dword [0x5df770]
cmp eax, 0xffffffff
je 0x408373
cmp eax, 4
je 0x40842e
cmp eax, 5
jne 0x40851b
cmp eax, 4
je 0x40842e
cmp eax, 5
je 0x4083a3
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push edx
push ebx
call fcn.00410f70
mov edx, dword [ebp + 0x20]
add esp, 0x10
test eax, eax
je 0x40851b
mov eax, dword [0x5df770]
cmp eax, 4
je 0x40842e
cmp eax, 5
je 0x4083d9
cmp byte [ebx], 0xef
jne 0x4083c6
cmp byte [ebx + 1], 0xbb
jne 0x4083c6
cmp byte [ebx + 2], 0xbf
je 0x40851b
cmp dword [ebp - 8], 0
jne 0x4083d4
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 4], ecx
jmp 0x408443
mov edi, dword [ebp - 0xc]
jmp 0x4083ec
xor eax, eax
mov ecx, 0xfffe
cmp word [ebx], cx
sete al
mov dword [ebp - 4], eax
mov edi, dword [ebp - 4]
push edx
push ebx
push ebx
call fcn.00552cfe
mov edx, dword [ebp + 0x20]
xor eax, eax
add esp, 0xc
test edi, edi
sete al
lea eax, [eax*2 + 3]
mov dword [esi], eax
lea eax, [edx + 1]
lea eax, [edx + eax*2]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0x40
call eax
mov esi, dword [ebp + 0x20]
shr esi, 1
mov dword [ebp - 8], eax
test edi, edi
je 0x408456
lea ecx, [ebx + 2]
mov dword [ebp - 0xc], ecx
jmp 0x40845a
xor ecx, ecx
mov edi, 0xfeff
cmp word [ebx], di
sete cl
mov dword [ebp - 4], ecx
cmp eax, 5
je 0x4083e9
mov edi, dword [ebp - 4]
xor eax, eax
test ecx, ecx
sete al
lea eax, [eax*2 + 2]
jmp 0x408408
inc esi
mov dword [ebp - 0xc], ebx
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push eax
push dword [ebp - 8]
push esi
push dword [ebp - 0xc]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp + 0x20], eax
test eax, eax
jne 0x4084b4
push 0
test edi, edi
lea eax, [ebx + 2]
mov edi, dword [ebp - 8]
mov esi, ebx
push 0
push edi
cmovne esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push eax
push edi
push 0xffffffffffffffff
push esi
push 0
push 0
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]
push 0
push 0xfde9
push 0x7f5
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0x635d83
push esi
call fcn.004078a0
mov eax, dword [ebp + 0x20]
mov ebx, dword [ebp - 8]
dec eax
push 0x63c360
push eax
push ebx
call fcn.004110f0
mov eax, dword [ebp + 0x20]
dec eax
push eax
push ebx
push esi
call fcn.004078a0
mov eax, dword [ebp + 0x20]
dec eax
push eax
push ebx
push esi
call fcn.004080c0
mov ecx, dword [ebp + 0x18]
add esp, 0x30
push ebx
mov dword [ecx], eax
call edi
jmp 0x4088cc
push 0x63c360
push edx
push ebx
call fcn.004110f0
mov eax, dword [0x5df770]
add esp, 0xc
cmp dword [ebp + 0x10], 0
jne 0x408718
mov dword [ebp + 0x1c], eax
cmp eax, 0xffffffff
je 0x40854f
cmp eax, 6
je 0x40854f
cmp eax, 7
jne 0x40871d
cmp byte [ebx], 0xef
jne 0x408564
cmp byte [ebx + 1], 0xbb
jne 0x408564
cmp byte [ebx + 2], 0xbf
je 0x408644
push 0x63c360
call fcn.00411a80
add esp, 4
test eax, eax
jne 0x408644
mov eax, dword [0x5df770]
mov dword [ebp + 0x1c], eax
cmp eax, 6
je 0x408644
cmp eax, 7
je 0x408644
cmp dword [ebp - 4], 0
jne 0x4085a6
cmp dword [0x63c7a4], 0
jne 0x408644
mov esi, dword [ebp + 0x20]
push esi
push ebx
call fcn.00411080
add esp, 8
test eax, eax
je 0x408720
mov cl, byte [ebx]
cmp cl, 0xef
jne 0x4085d6
cmp byte [ebx + 1], 0xbb
jne 0x4085d6
cmp byte [ebx + 2], 0xbf
jne 0x4085d6
lea eax, [ebx + 3]
mov dword [ebp - 8], eax
jmp 0x4085f2
mov eax, ebx
mov dword [ebp - 8], eax
cmp cl, 0xef
jne 0x408609
cmp byte [ebx + 1], 0xbb
mov dword [ebp - 8], eax
jne 0x4085f5
cmp byte [ebx + 2], 0xbf
mov dword [ebp - 8], eax
jne 0x4085f5
add esi, 0xfffffffd
cmp cl, 0xef
jne 0x408609
cmp byte [ebx + 1], 0xbb
jne 0x408609
cmp byte [ebx + 2], 0xbf
lea eax, [ebx + 3]
je 0x40860b
mov eax, ebx
push esi
push eax
call fcn.00413ed0
push dword [ebp - 8]
mov esi, eax
call fcn.00413f20
dec eax
add esp, 0xc
cmp eax, esi
jne 0x408641
cmp dword [ebp - 4], 0
jne 0x40871d
lea eax, [edi + edi*4]
shl eax, 4
test byte [eax + 0x5dc518], 2
je 0x40871d
mov esi, dword [ebp + 0x14]
push 0x63c360
call fcn.00411ac0
add esp, 4
test eax, eax
je 0x40866b
mov eax, dword [0x5df770]
mov dword [ebp + 0x1c], eax
cmp eax, 6
je 0x40866b
cmp eax, 7
jne 0x40871d
mov edi, dword [ebp + 8]
push 0
push 0xfde9
push 0x7f5
push edi
call dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0x636dae
push edi
call fcn.004078a0
add esp, 0xc
cmp byte [ebx], 0xef
jne 0x4086ef
cmp byte [ebx + 1], 0xbb
jne 0x4086ef
cmp byte [ebx + 2], 0xbf
jne 0x4086ef
mov eax, dword [ebp + 0x20]
lea ecx, [ebx + 3]
add eax, 0xfffffffd
push eax
push ecx
push edi
call fcn.004078a0
add esp, 0xc
mov dword [esi], 7
cmp byte [ebx], 0xef
jne 0x4086d0
cmp byte [ebx + 1], 0xbb
jne 0x4086d0
cmp byte [ebx + 2], 0xbf
lea ecx, [ebx + 3]
je 0x4086d2
mov ecx, ebx
mov eax, dword [ebp + 0x20]
add eax, 0xfffffffd
push eax
push ecx
push edi
call fcn.004080c0
mov ecx, eax
add esp, 0xc
mov eax, dword [ebp + 0x18]
mov dword [eax], ecx
jmp 0x4088c5
push dword [ebp + 0x20]
push ebx
push edi
call fcn.004078a0
push dword [ebp + 0x20]
mov dword [esi], 6
push ebx
push edi
call fcn.004080c0
mov ecx, eax
add esp, 0x18
mov eax, dword [ebp + 0x18]
mov dword [eax], ecx
jmp 0x4088c5
mov esi, dword [ebp + 0x20]
jmp 0x408723
mov esi, dword [ebp + 0x20]
mov eax, dword [ebp + 0x1c]
cmp eax, 0xffffffff
je 0x40872f
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
jmp 0x40877b
push 0x63c360
call fcn.00411ba0
mov ecx, dword [ebp + 0x14]
add esp, 4
mov dword [ecx], eax
cmp eax, 0xffffffff
jne 0x40877b
test byte [0x63c360], 0x40
je 0x408757
mov dword [ecx], 0
jmp 0x40877b
mov eax, dword [0x5df774]
cmp eax, 0xffffffff
je 0x408779
lea eax, [eax + eax*4]
shl eax, 4
test byte [eax + 0x5dc518], 0x3f
je 0x408779
mov eax, dword [0x63c7ac]
mov dword [ecx], eax
jmp 0x40877b
mov dword [ecx], edi
mov eax, dword [ecx]
lea eax, [eax + eax*4]
shl eax, 4
test byte [eax + 0x5dc518], 0x40
je 0x4087a2
mov ecx, dword [eax + 0x5dc51c]
mov dword [ebp + 0x1c], ecx
cmp ecx, 0xfde8
jne 0x4087c9
mov dword [ebp + 0x1c], ecx
jmp 0x4087b7
mov edi, dword [eax + 0x5dc51c]
mov dword [ebp + 0x1c], edi
cmp edi, 0xfde8
jne 0x40887c
push esi
push ebx
call fcn.004110c0
add esp, 8
test eax, eax
je 0x40887c
lea eax, [esi*2 + 0x10]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0x40
call eax
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 dword [ebp + 0x1c]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea ecx, [esi + 8]
lea ecx, [esi + ecx*2]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0
mov ebx, eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalSize]
push eax
push ebx
push esi
push edi
push 0
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
mov esi, dword [ebp + 8]
push 0
push 0xfde9
push 0x7f5
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0x636daf
push esi
call fcn.004078a0
push dword [ebp + 0x20]
push ebx
push esi
call fcn.004078a0
push dword [ebp + 0x20]
push ebx
push esi
call fcn.004080c0
mov ecx, dword [ebp + 0x18]
add esp, 0x24
push ebx
mov dword [ecx], eax
call edi
jmp 0x4088cc
mov esi, dword [ebp + 8]
push 0
push dword [0x63c344]
push 0x7f5
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
push 0
push 0x636db2
push esi
call fcn.004078a0
push dword [ebp + 0x20]
push ebx
push esi
call fcn.004078a0
push dword [ebp + 0x20]
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov dword [eax], 0
call fcn.004080c0
mov ecx, dword [ebp + 0x18]
add esp, 0x24
mov dword [ecx], eax
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, 1
pop ebx
pop edi
mov dword [0x5df774], 0xffffffff
mov dword [0x5df770], 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret