Function at 0x407fe2
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x428
cmp dword [ebp + 8], 0
jne 0x408011
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [ebp - 0xc], eax
sub esp, 8
push 0x8000
mov eax, dword [ebp - 0xc]
push dword [eax + 0x10]
call sub.msvcrt.dll__setmode
add esp, 0x10
jmp 0x408062
sub esp, 8
push 0x4d762b
push dword [ebp + 8]
call sub.msvcrt.dll_fopen
add esp, 0x10
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x408062
sub esp, 0xc
mov eax, dword [ebp - 0xc]
push dword [eax + 0x10]
call fcn.0041e3a9
add esp, 0x10
test eax, eax
je 0x408062
sub esp, 0xc
push dword [ebp - 0xc]
call sub.msvcrt.dll_fclose
add esp, 0x10
mov dword [ebp - 0xc], 0
call sub.msvcrt.dll__errno
mov dword [eax], 1
cmp dword [ebp - 0xc], 0
jne 0x4080b5
sub esp, 4
sub esp, 8
sub esp, 4
call sub.msvcrt.dll__errno
add esp, 4
push dword [eax]
call sub.msvcrt.dll_strerror
add esp, 0xc
push eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x424], eax
cmp dword [ebp + 8], 0
jne 0x40809d
mov dword [ebp - 0x424], 0x4d762e
push dword [ebp - 0x424]
push 0x4d7636
call fcn.0049d87b
add esp, 0x10
jmp 0x4083d7
sub esp, 8
push 0
push 0
call fcn.00475a06
add esp, 0x10
mov dword [ebp - 0x420], eax
cmp dword [ebp + 0xc], 0
je 0x4080e9
sub esp, 8
push dword [ebp + 0xc]
push dword [ebp - 0x420]
call fcn.00475a7f
add esp, 0x10
jmp 0x40816e
sub esp, 8
push 1
push dword [ebp - 0x420]
call fcn.00475a7f
add esp, 0x10
sub esp, 8
push 2
push dword [ebp - 0x420]
call fcn.00475a7f
add esp, 0x10
sub esp, 8
push 3
push dword [ebp - 0x420]
call fcn.00475a7f
add esp, 0x10
sub esp, 8
push 0xb
push dword [ebp - 0x420]
call fcn.00475a7f
add esp, 0x10
sub esp, 8
push 8
push dword [ebp - 0x420]
call fcn.00475a7f
add esp, 0x10
sub esp, 8
push 9
push dword [ebp - 0x420]
call fcn.00475a7f
add esp, 0x10
sub esp, 8
push 0xa
push dword [ebp - 0x420]
call fcn.00475a7f
add esp, 0x10
push dword [ebp - 0xc]
push 0x400
push 1
lea eax, [ebp - 0x418]
push eax
call sub.msvcrt.dll_fread
add esp, 0x10
mov dword [ebp - 0x41c], eax
cmp dword [ebp - 0x41c], 0
je 0x4081b6
sub esp, 4
push dword [ebp - 0x41c]
lea eax, [ebp - 0x418]
push eax
push dword [ebp - 0x420]
call fcn.00475d84
add esp, 0x10
jmp 0x40816e
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
and eax, 0x20
test eax, eax
je 0x408210
sub esp, 4
sub esp, 8
sub esp, 4
call sub.msvcrt.dll__errno
add esp, 4
push dword [eax]
call sub.msvcrt.dll_strerror
add esp, 0xc
push eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x428], eax
cmp dword [ebp + 8], 0
jne 0x4081f8
mov dword [ebp - 0x428], 0x4d762e
push dword [ebp - 0x428]
push 0x4d7636
call fcn.0049d87b
add esp, 0x10
jmp 0x4083ae
sub esp, 0xc
push dword [ebp - 0x420]
call fcn.00475e6f
add esp, 0x10
cmp dword [0x4fe008], 0
je 0x4082ef
cmp dword [ebp + 0xc], 0
je 0x408250
sub esp, 4
push dword [ebp + 8]
push dword [ebp + 0xc]
push dword [ebp - 0x420]
call fcn.00407ed5
add esp, 0x10
jmp 0x4083ae
sub esp, 4
push dword [ebp + 8]
push 1
push dword [ebp - 0x420]
call fcn.00407ed5
add esp, 0x10
sub esp, 4
push dword [ebp + 8]
push 2
push dword [ebp - 0x420]
call fcn.00407ed5
add esp, 0x10
sub esp, 4
push dword [ebp + 8]
push 3
push dword [ebp - 0x420]
call fcn.00407ed5
add esp, 0x10
sub esp, 4
push dword [ebp + 8]
push 0xb
push dword [ebp - 0x420]
call fcn.00407ed5
add esp, 0x10
sub esp, 4
push dword [ebp + 8]
push 8
push dword [ebp - 0x420]
call fcn.00407ed5
add esp, 0x10
sub esp, 4
push dword [ebp + 8]
push 9
push dword [ebp - 0x420]
call fcn.00407ed5
add esp, 0x10
sub esp, 4
push dword [ebp + 8]
push 0xa
push dword [ebp - 0x420]
call fcn.00407ed5
add esp, 0x10
jmp 0x4083ae
cmp dword [ebp + 0xc], 0
je 0x408314
sub esp, 4
push dword [ebp + 8]
mov eax, dword [ebp + 0xc]
neg eax
push eax
push dword [ebp - 0x420]
call fcn.00407c4a
add esp, 0x10
jmp 0x4083ae
sub esp, 4
push dword [ebp + 8]
push 1
push dword [ebp - 0x420]
call fcn.00407c4a
add esp, 0x10
sub esp, 4
push dword [ebp + 8]
push 2
push dword [ebp - 0x420]
call fcn.00407c4a
add esp, 0x10
sub esp, 4
push dword [ebp + 8]
push 3
push dword [ebp - 0x420]
call fcn.00407c4a
add esp, 0x10
sub esp, 4
push dword [ebp + 8]
push 0xb
push dword [ebp - 0x420]
call fcn.00407c4a
add esp, 0x10
sub esp, 4
push dword [ebp + 8]
push 8
push dword [ebp - 0x420]
call fcn.00407c4a
add esp, 0x10
sub esp, 4
push dword [ebp + 8]
push 9
push dword [ebp - 0x420]
call fcn.00407c4a
add esp, 0x10
sub esp, 4
push dword [ebp + 8]
push 0xa
push dword [ebp - 0x420]
call fcn.00407c4a
add esp, 0x10
sub esp, 0xc
push dword [ebp - 0x420]
call fcn.00475d22
add esp, 0x10
mov eax, dword [sym.imp.msvcrt.dll__iob]
cmp eax, dword [ebp - 0xc]
je 0x4083d7
sub esp, 0xc
push dword [ebp - 0xc]
call sub.msvcrt.dll_fclose
add esp, 0x10
leave
ret