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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58dad2
mov eax, dword fs:[0]
push eax
sub esp, 0xf0
mov eax, dword [0x5f44b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xf4], ecx
mov dword [ebp - 0xf0], 0
mov dword [ebp - 4], 1
push 0x59b4e4
lea ecx, [ebp - 0xa4]
call fcn.00401600
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x84]
call fcn.00437fd0
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x14], 0
lea ecx, [ebp + 0xc]
call fcn.00401670
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4783d1
push 0
push 0x80
push 4
push 0
push 1
push SysReAllocStringLen
lea ecx, [ebp + 0xc]
call fcn.00401670
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc4], eax
cmp dword [ebp - 0xc4], 0xffffffff
jne 0x478258
push 0x59b4e8
mov ecx, dword [ebp + 8]
call fcn.00401600
mov eax, dword [ebp - 0xf0]
or eax, 1
mov dword [ebp - 0xf0], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xa4]
call fcn.00401640
mov byte [ebp - 4], 0
lea ecx, [ebp + 0xc]
call fcn.00401640
mov eax, dword [ebp + 8]
jmp 0x47840d
push 0
mov ecx, dword [ebp - 0xc4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x88], eax
mov edx, dword [ebp - 0x88]
add edx, 1
push edx
call fcn.0047e280
add esp, 4
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x4782d3
push 0x59b4ec
mov ecx, dword [ebp + 8]
call fcn.00401600
mov ecx, dword [ebp - 0xf0]
or ecx, 1
mov dword [ebp - 0xf0], ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xa4]
call fcn.00401640
mov byte [ebp - 4], 0
lea ecx, [ebp + 0xc]
call fcn.00401640
mov eax, dword [ebp + 8]
jmp 0x47840d
mov edx, dword [ebp - 0x88]
add edx, 1
push edx
push 0
mov eax, dword [ebp - 0x14]
push eax
call fcn.0049e690
add esp, 0xc
push 0
lea ecx, [ebp - 0xc8]
push ecx
mov edx, dword [ebp - 0x88]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0xc4]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0xc4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x88]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x84]
call fcn.004380d0
cmp dword [ebp - 0x14], 0
je 0x478354
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0xd0], edx
mov eax, dword [ebp - 0xd0]
push eax
call fcn.0047e27b
add esp, 4
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0xec]
push ecx
lea ecx, [ebp - 0x84]
call fcn.00439390
mov dword [ebp - 0xf8], eax
mov edx, dword [ebp - 0xf8]
mov dword [ebp - 0xfc], edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0xfc]
push eax
lea ecx, [ebp - 0xc0]
push ecx
call fcn.00422760
add esp, 8
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xec]
call fcn.004015d0
lea ecx, [ebp - 0xc0]
call fcn.004037a0
test eax, eax
jbe 0x4783c2
lea edx, [ebp - 0xc0]
push edx
lea ecx, [ebp - 0xa4]
call fcn.004036b0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0xc0]
call fcn.00401640
lea eax, [ebp - 0xa4]
push eax
mov ecx, dword [ebp + 8]
call fcn.00403680
mov ecx, dword [ebp - 0xf0]
or ecx, 1
mov dword [ebp - 0xf0], ecx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xa4]
call fcn.00401640
mov byte [ebp - 4], 0
lea ecx, [ebp + 0xc]
call fcn.00401640
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0049e381
mov esp, ebp
pop ebp
ret 0x20