Function at 0x40e9e8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov ecx, 0x47
dec ecx
mov dword [esp + ecx*4], 0xfffa5a5a
jne 0x40e9f6
push ebx
push esi
push edi
mov dword [ebp - 4], 0
mov edi, dword [ebp + 8]
mov dword [ebp - 8], edi
mov edi, dword [ebp + 0xc]
mov edi, dword [edi]
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], 0
jmp 0x40ea24
inc dword [ebp - 4]
mov edi, dword [ebp - 8]
mov esi, edi
add esi, 1
mov dword [ebp - 8], esi
cmp byte [edi], 0x3c
jne 0x40ea21
lea edi, [ebp - 0x118]
mov dword [ebp - 0x14], edi
jmp 0x40ea4f
mov edi, dword [ebp - 0x14]
mov esi, edi
add esi, 1
mov dword [ebp - 0x14], esi
mov bl, byte [ebp - 9]
mov byte [edi], bl
mov edi, dword [ebp - 8]
mov esi, edi
add esi, 1
mov dword [ebp - 8], esi
mov bl, byte [edi]
mov byte [ebp - 9], bl
cmp bl, 0x3e
jne 0x40ea3f
mov edi, dword [ebp - 0x14]
mov byte [edi], 0
push 0x2e
lea edi, [ebp - 0x118]
push edi
call sub.CRTDLL.DLL_strrchr
add esp, 8
mov dword [ebp - 0x14], eax
cmp eax, 0
je 0x40eae4
mov edi, dword [0x4684e8]
cmp edi, 5
je 0x40ea93
cmp edi, 6
jne 0x40eab1
push str..EVG
push dword [ebp - 0x14]
call sub.CRTDLL.DLL__stricmp
add esp, 8
cmp eax, 0
jne 0x40eab1
mov dword [ebp - 0x14], 0
jmp 0x40eae4
push str..EVG
push dword [ebp - 0x14]
call sub.CRTDLL.DLL__stricmp
add esp, 8
mov edi, eax
cmp edi, 0
je 0x40eae4
push str..EPG
push dword [ebp - 0x14]
call sub.CRTDLL.DLL__stricmp
add esp, 8
cmp eax, 0
je 0x40eae4
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x14], 0
je 0x40ec32
push 0x43f691
lea edi, [ebp - 0x118]
push edi
call sub.CRTDLL.DLL_fopen
add esp, 8
mov dword [ebp - 0x18], eax
cmp eax, 0
je 0x40ec32
push 2
push 0
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fseek
add esp, 0xc
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_ftell
add esp, 4
mov dword [ebp - 0x11c], eax
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_rewind
add esp, 4
cmp dword [ebp - 0x10], 0
je 0x40ebaa
push dword [ebp - 4]
push dword [ebp + 8]
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_memcpy
add esp, 0xc
mov edi, dword [ebp - 4]
add edi, dword [ebp - 0x10]
mov dword [ebp - 0x10], edi
jmp 0x40eb62
add dword [ebp - 0x10], 0xffffffff
dec dword [ebp - 4]
mov edi, dword [ebp - 0x10]
movzx ebx, byte [edi]
test byte [ebx + str._________h______________________H], 4
je 0x40eb5b
add dword [ebp - 0x10], 1
mov edi, dword [ebp - 0x10]
mov esi, edi
add esi, 1
mov dword [ebp - 0x10], esi
mov byte [edi], 0x2c
add dword [ebp - 4], 2
push dword [ebp - 0x18]
push dword [ebp - 0x11c]
push 1
push dword [ebp - 0x10]
call sub.CRTDLL.DLL_fread
add esp, 0x10
mov edi, dword [ebp - 0x11c]
add edi, dword [ebp - 0x10]
mov dword [ebp - 0x10], edi
mov edi, dword [ebp - 4]
add edi, dword [ebp - 0x11c]
mov dword [ebp - 4], edi
push dword [ebp - 0x18]
call sub.CRTDLL.DLL_fclose
add esp, 4
jmp 0x40ebdc
inc dword [ebp - 4]
cmp dword [ebp - 0x10], 0
je 0x40ebdc
mov edi, dword [ebp - 0x10]
mov esi, edi
add esi, 1
mov dword [ebp - 0x10], esi
mov bl, byte [ebp - 9]
mov byte [edi], bl
mov edi, dword [ebp - 8]
mov esi, edi
add esi, 1
mov dword [ebp - 8], esi
mov bl, byte [edi]
mov byte [ebp - 9], bl
cmp bl, 0xa
jne 0x40ebc3
test dword [ebp - 4], 1
jne 0x40ec11
inc dword [ebp - 4]
cmp dword [ebp - 0x10], 0
je 0x40ec11
mov edi, dword [ebp - 0x10]
mov esi, edi
add esi, 1
mov dword [ebp - 0x10], esi
mov byte [edi], 0xd
inc dword [ebp - 4]
cmp dword [ebp - 0x10], 0
je 0x40ec39
mov edi, dword [ebp - 0x10]
mov esi, edi
add esi, 1
mov dword [ebp - 0x10], esi
mov byte [edi], 0xa
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp - 0x10]
mov dword [edi], esi
jmp 0x40ec39
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret