Function at 0x408f60
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4410c0
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x452284]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor eax, eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x1c]
push 0x445d34
xor edi, edi
lea ecx, [ebp + 8]
call fcn.0040ec00
lea esi, [edi + 8]
test eax, eax
je 0x409126
mov eax, dword [ebp + 0xc]
cmp dword [ebp + 0x20], esi
jae 0x408fba
lea eax, [ebp + 0xc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409126
mov edi, 0xf
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
mov byte [ebp - 4], 1
mov eax, dword [ebp + 0xc]
cmp dword [ebp + 0x20], esi
jae 0x408feb
lea eax, [ebp + 0xc]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x409053
push eax
xor esi, esi
push esi
lea eax, [ebp - 0x2c]
mov dword [ebx + 0x18], edi
mov dword [ebx + 0x14], esi
push eax
mov ecx, ebx
mov byte [ebx + 4], 0
call fcn.00402610
cmp dword [ebp - 0x14], 0x10
jb 0x409036
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00438d27
add esp, 4
cmp dword [ebp + 0x20], 8
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], esi
mov byte [ebp - 0x28], 0
jb 0x409153
mov edx, dword [ebp + 0xc]
push edx
jmp 0x40914b
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 0x30], edi
test edi, edi
jne 0x409085
lea eax, [ebp - 0x2c]
push eax
mov ecx, ebx
call fcn.00402510
lea ecx, [ebp - 0x2c]
call fcn.00402540
lea esi, [ebp + 8]
call fcn.004025e0
jmp 0x409153
push edi
call fcn.00437be0
add esp, 4
push 0
lea ecx, [ebp - 0x38]
push ecx
push edi
push eax
push esi
mov dword [ebp - 0x34], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
test edi, edi
jbe 0x4090c8
mov edx, dword [ebp - 0x34]
movzx eax, byte [esi + edx]
push eax
mov eax, 1
lea edi, [ebp - 0x2c]
call fcn.0040e720
inc esi
cmp esi, dword [ebp - 0x30]
jb 0x4090ad
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x4090d8
push eax
call fcn.00438d1c
add esp, 4
push 0xffffffffffffffff
push 0
lea ecx, [ebp - 0x2c]
mov esi, 0xf
push ecx
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x14], 0
mov ecx, ebx
mov byte [ebx + 4], 0
call fcn.00402610
cmp dword [ebp - 0x14], 0x10
jb 0x40910c
mov edx, dword [ebp - 0x28]
push edx
call fcn.00438d27
add esp, 4
cmp dword [ebp + 0x20], 8
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
jb 0x409153
mov eax, dword [ebp + 0xc]
push eax
jmp 0x40914b
push 0
mov dword [ebx + 0x18], 0xf
mov dword [ebx + 0x14], edi
push 0x445a6b
mov ecx, ebx
mov byte [ebx + 4], 0
call fcn.00402850
cmp dword [ebp + 0x20], esi
jb 0x409153
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00438d27
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00425608
mov esp, ebp
pop ebp
ret