Function at 0x40e882
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 0x40e890
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 0x40e8be
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 0x40e8bb
lea edi, [ebp - 0x118]
mov dword [ebp - 0x14], edi
jmp 0x40e8e9
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 0x40e8d9
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 0x40e97e
mov edi, dword [0x45f4d0]
cmp edi, 5
je 0x40e92d
cmp edi, 6
jne 0x40e94b
push str..EVG
push dword [ebp - 0x14]
call sub.CRTDLL.DLL__stricmp
add esp, 8
cmp eax, 0
jne 0x40e94b
mov dword [ebp - 0x14], 0
jmp 0x40e97e
push str..EVG
push dword [ebp - 0x14]
call sub.CRTDLL.DLL__stricmp
add esp, 8
mov edi, eax
cmp edi, 0
je 0x40e97e
push str..EPG
push dword [ebp - 0x14]
call sub.CRTDLL.DLL__stricmp
add esp, 8
cmp eax, 0
je 0x40e97e
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x14], 0
je 0x40eacc
push 0x436679
lea edi, [ebp - 0x118]
push edi
call sub.CRTDLL.DLL_fopen
add esp, 8
mov dword [ebp - 0x18], eax
cmp eax, 0
je 0x40eacc
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 0x40ea44
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 0x40e9fc
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 0x40e9f5
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 0x40ea76
inc dword [ebp - 4]
cmp dword [ebp - 0x10], 0
je 0x40ea76
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 0x40ea5d
test dword [ebp - 4], 1
jne 0x40eaab
inc dword [ebp - 4]
cmp dword [ebp - 0x10], 0
je 0x40eaab
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 0x40ead3
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 0x40ead3
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret