Function at 0x4c8770
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov esi, dword [esp + 0x54]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov dword [esp + 0x18], ecx
test esi, esi
je 0x4c8913
mov ebp, dword [esp + 0x50]
xor ebx, ebx
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], 0
jmp 0x4c87fd
cmp dword [esp + 0x58], 1
jle 0x4c87e2
mov eax, dword [ebp]
mov dword [esp + 4], str.Ignoring__s_directory...________n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.004c7e40
mov dword [esp], 0
call sub.msvcrt.dll_fflush
mov eax, dword [esp + 0x18]
add ebp, 4
mov dword [eax + ebx*4], 0
add ebx, 1
cmp dword [esp + 0x54], ebx
jbe 0x4c8905
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.004dd060
mov esi, eax
mov eax, dword [ebp]
mov edi, edx
mov dword [esp], eax
call fcn.004dcf30
test eax, eax
jne 0x4c87b0
mov eax, edi
and eax, esi
cmp eax, 0xffffffff
jne 0x4c8840
cmp dword [esp + 0x58], 1
jle 0x4c87e2
mov eax, dword [ebp]
mov dword [esp + 4], str.Cannot_evaluate_size_of__s__ignoring_...__n
mov dword [esp + 8], eax
jmp 0x4c87c6
mov dword [esp + 4], 0x4fe5d3
mov eax, dword [ebp]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
test eax, eax
mov edx, eax
je 0x4c899e
cmp dword [esp + 0x58], 1
jle 0x4c8897
mov dword [esp + 0x20], eax
mov eax, dword [ebp]
mov dword [esp + 4], 0x4fe5fd
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call fcn.004c7e40
mov dword [esp], 0
call sub.msvcrt.dll_fflush
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x1c]
cmp edi, 0
ja 0x4c88a8
cmp esi, eax
jbe 0x4c88ae
mov esi, eax
mov dword [esp + 0x54], ebx
mov eax, dword [esp + 0x28]
add eax, dword [esp + 0x1c]
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp + 0x20], edx
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp esi, eax
mov edx, dword [esp + 0x20]
jne 0x4c8a30
mov eax, dword [esp + 0x18]
add dword [esp + 0x1c], esi
add ebp, 4
add dword [esp + 0x24], esi
mov dword [eax + ebx*4], esi
add ebx, 1
mov dword [esp], edx
call sub.msvcrt.dll_fclose
cmp dword [esp + 0x54], ebx
ja 0x4c87fd
mov eax, dword [esp + 0x24]
xor ebx, ebx
test eax, eax
jne 0x4c8994
mov ebx, dword [esp + 0x58]
test ebx, ebx
jle 0x4c898f
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xc
mov dword [esp + 4], 0x4fe5d6
add eax, 0x40
mov dword [esp], eax
call fcn.004c7e40
mov dword [esp], 0
call sub.msvcrt.dll_fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.no_data_to_bench
add eax, 0x40
mov dword [esp], eax
call fcn.004c7e40
mov dword [esp], 0
call sub.msvcrt.dll_fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], 0x4fe024
add eax, 0x40
mov dword [esp], eax
call fcn.004c7e40
mov dword [esp], 0
call sub.msvcrt.dll_fflush
mov ebx, 0xc
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esp + 0x58]
mov ebx, 0xa
test ecx, ecx
jle 0x4c8994
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0x4fe5d6
add eax, 0x40
mov dword [esp], eax
call fcn.004c7e40
mov dword [esp], 0
call sub.msvcrt.dll_fflush
mov eax, dword [ebp]
mov dword [esp + 4], str.impossible_to_open_file__s
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.004c7e40
mov dword [esp], 0
call sub.msvcrt.dll_fflush
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], 0x4fe024
add eax, 0x40
mov dword [esp], eax
call fcn.004c7e40
mov dword [esp], 0
call sub.msvcrt.dll_fflush
add esp, 0x3c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esp + 0x58]
mov ebx, 0xb
test edx, edx
jle 0x4c8994
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0xb
mov dword [esp + 4], 0x4fe5d6
add eax, 0x40
mov dword [esp], eax
call fcn.004c7e40
mov dword [esp], 0
call sub.msvcrt.dll_fflush
mov eax, dword [ebp]
mov dword [esp + 4], str.could_not_read__s
mov dword [esp + 8], eax
jmp 0x4c89e6