Function at 0x4a88e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
xor ebx, ebx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], 0x7d0
mov ecx, dword [eax]
inc ebx
cmp ebx, ecx
jge 0x4a8afd
mov edi, dword [ebp + 0xc]
lea esi, [ebx*4]
mov edx, dword [edi]
mov eax, dword [edx + esi]
cmp byte [eax], 0x40
jne 0x4a88f7
dec dword [ebp - 0x20]
je 0x4a8b26
inc eax
push edx
push edx
push 0x4f2829
push eax
call sub.msvcrt.dll_fopen
add esp, 0x10
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x4a8b05
push eax
mov eax, dword [ebp - 0x2c]
push 2
push 0
push eax
call sub.msvcrt.dll_fseek
add esp, 0x10
inc eax
je 0x4a8ae0
sub esp, 0xc
mov eax, dword [ebp - 0x2c]
push eax
call sub.msvcrt.dll_ftell
add esp, 0x10
mov dword [ebp - 0x1c], eax
inc eax
je 0x4a8ae0
mov edi, dword [ebp - 0x2c]
push eax
push 0
push 0
push edi
call sub.msvcrt.dll_fseek
add esp, 0x10
inc eax
je 0x4a8ae0
sub esp, 0xc
mov eax, dword [ebp - 0x1c]
inc eax
push eax
call fcn.004a84f0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
push ecx
mov dword [ebp - 0x28], eax
push edx
push 1
push eax
call sub.msvcrt.dll_fread
add esp, 0x20
cmp dword [ebp - 0x1c], eax
je 0x4a89b7
mov edx, dword [ebp - 0x2c]
test byte [edx + 0xc], 0x20
jne 0x4a8ae0
mov ecx, dword [ebp - 0x28]
mov byte [ecx + eax], 0
mov al, byte [ecx]
test al, al
je 0x4a89fb
and eax, 0xff
test byte [eax + eax + 0x4f3a40], 0x40
je 0x4a8b0f
mov edx, ecx
jmp 0x4a89f4
and eax, 0xff
inc edx
test byte [eax + eax + 0x4f3a40], 0x40
je 0x4a8b0f
mov al, byte [edx + 1]
test al, al
jne 0x4a89e0
sub esp, 0xc
push 4
call fcn.004a84f0
add esp, 0x10
mov dword [ebp - 0x18], eax
mov dword [eax], 0
mov edi, dword [ebp + 0xc]
sub esp, 0xc
mov eax, dword [edi]
push eax
call fcn.004a8850
mov edx, eax
mov dword [edi], eax
mov eax, dword [ebp - 0x18]
add esp, 0x10
mov dword [ebp - 0x14], 0
mov eax, dword [eax]
test eax, eax
je 0x4a8b49
lea esi, [esi]
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x14]
shl ecx, 2
mov eax, dword [eax + edi*4]
mov dword [ebp - 0x24], ecx
test eax, eax
jne 0x4a8a40
mov dword [ebp - 0x10], edi
mov ecx, dword [ebp + 8]
push eax
push eax
mov eax, dword [ebp - 0x14]
mov edi, dword [ecx]
add eax, edi
lea eax, [eax*4 + 4]
push eax
push edx
call fcn.004a8450
mov ecx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov edx, dword [ecx]
add esp, 0xc
sub edx, ebx
shl edx, 2
mov dword [edi], eax
mov edi, dword [ebp - 0x10]
push edx
lea edx, [eax + esi + 4]
push edx
lea edx, [ebx + edi]
dec ebx
lea edx, [eax + edx*4]
push edx
call sub.msvcrt.dll_memmove
mov edx, dword [ebp + 0xc]
mov eax, esi
cld
mov esi, dword [edx]
mov ecx, dword [ebp - 0x24]
shr ecx, 2
add eax, esi
mov edi, eax
mov esi, dword [ebp - 0x18]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
mov eax, dword [edx]
dec eax
add eax, ecx
mov dword [edx], eax
pop eax
mov eax, dword [ebp - 0x18]
push eax
call sub.msvcrt.dll_free
pop eax
mov eax, dword [ebp - 0x28]
push eax
call sub.msvcrt.dll_free
add esp, 0x10
lea esi, [esi]
sub esp, 0xc
mov edi, dword [ebp - 0x2c]
inc ebx
push edi
call sub.msvcrt.dll_fclose
mov edi, dword [ebp + 8]
add esp, 0x10
mov ecx, dword [edi]
cmp ebx, ecx
jl 0x4a8900
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
jmp 0x4a88f7
sub esp, 0xc
mov eax, dword [ebp - 0x28]
push eax
call fcn.004a8680
add esp, 0x10
mov dword [ebp - 0x18], eax
jmp 0x4a8a11
mov eax, dword [sym.imp.msvcrt.dll__iob]
push ebx
mov ecx, dword [edx]
add eax, 0x40
push ecx
push str._s:_error:_too_many___files_encountered_n
push eax
call fcn.004a85b0
mov dword [esp], 1
call fcn.004a8e50
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x10], 0
jmp 0x4a8a60