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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x209c
call fcn.0040be80
push edi
push 0x427794
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40884b
push 0x427464
lea eax, [ebp - 0x2098]
push eax
call fcn.0040c8aa
add esp, 8
push 0x423448
lea ecx, [ebp - 0x2098]
push ecx
call fcn.0040c880
add esp, 8
push 0x42344c
lea edx, [ebp - 0x2098]
push edx
call fcn.0040c880
add esp, 8
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x2098]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xa40], eax
cmp dword [ebp - 0xa40], 0xffffffff
jne 0x40862e
mov ecx, dword [ebp - 0xa40]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40884d
push 0
mov edx, dword [ebp - 0xa40]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 3
jae 0x40865a
mov eax, dword [ebp - 0xa40]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40884d
mov byte [ebp - 0xa30], 0
mov ecx, 0x289
xor eax, eax
lea edi, [ebp - 0xa2f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [ebp - 0x1e90], 0
mov ecx, 0x513
xor eax, eax
lea edi, [ebp - 0x1e8f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0
lea ecx, [ebp - 0xa38]
push ecx
mov edx, dword [ebp - 4]
push edx
lea eax, [ebp - 0xa30]
push eax
mov ecx, dword [ebp - 0xa40]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0xa40]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xa34], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xa3c], 0
jmp 0x4086e6
mov eax, dword [ebp - 0xa3c]
add eax, 1
mov dword [ebp - 0xa3c], eax
mov ecx, dword [ebp - 0xa3c]
cmp ecx, dword [ebp - 4]
jge 0x4087b2
mov edx, dword [ebp - 0xa3c]
movsx eax, byte [ebp + edx - 0xa30]
cmp eax, 0xd
jne 0x40873f
mov ecx, dword [ebp - 0xa3c]
movsx edx, byte [ebp + ecx - 0xa2f]
cmp edx, 0xa
jne 0x40873f
mov dword [ebp - 0xa34], 0
mov eax, dword [ebp - 0xa3c]
add eax, 1
mov dword [ebp - 0xa3c], eax
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
jmp 0x4086d7
mov edx, dword [ebp - 0xa3c]
movsx eax, byte [ebp + edx - 0xa30]
cmp eax, 0x23
je 0x4087ad
mov ecx, dword [ebp - 0xa3c]
movsx edx, byte [ebp + ecx - 0xa30]
cmp edx, 0x3c
je 0x4087ad
mov eax, dword [ebp - 0xa3c]
movsx ecx, byte [ebp + eax - 0xa30]
cmp ecx, 0x3e
je 0x4087ad
mov edx, dword [ebp - 8]
imul edx, edx, 0x104
lea eax, [ebp + edx - 0x1e90]
mov ecx, dword [ebp - 0xa34]
mov edx, dword [ebp - 0xa3c]
mov dl, byte [ebp + edx - 0xa30]
mov byte [eax + ecx], dl
mov eax, dword [ebp - 0xa34]
add eax, 1
mov dword [ebp - 0xa34], eax
jmp 0x4086d7
mov dword [ebp - 0xa3c], 0
jmp 0x4087cd
mov ecx, dword [ebp - 0xa3c]
add ecx, 1
mov dword [ebp - 0xa3c], ecx
mov edx, dword [ebp - 0xa3c]
cmp edx, dword [ebp - 8]
jg 0x408844
mov eax, dword [ebp - 0xa3c]
imul eax, eax, 0x104
mov cl, byte [ebp + eax - 0x1e90]
mov byte [ebp - 0x209c], cl
cmp byte [ebp - 0x209c], 0x31
je 0x408805
cmp byte [ebp - 0x209c], 0x32
je 0x408823
jmp 0x40883f
mov edx, dword [ebp - 0xa3c]
imul edx, edx, 0x104
lea eax, [ebp + edx - 0x1e90]
push eax
call fcn.00408c3b
add esp, 4
jmp 0x40883f
mov ecx, dword [ebp - 0xa3c]
imul ecx, ecx, 0x104
lea edx, [ebp + ecx - 0x1e90]
push edx
call fcn.00408852
add esp, 4
jmp 0x4087be
mov eax, 1
jmp 0x40884d
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret