Function at 0x474e00
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
xor ebp, ebp
push esi
push ebx
lea ebx, [ebp + 1]
sub esp, 0x3c
mov eax, dword [esp + 0x50]
mov dword [esp + 0x18], 0x7d0
mov ecx, dword [eax]
cmp ebx, ecx
jge 0x474e3e
nop
mov eax, dword [esp + 0x54]
lea edi, [ebx*4]
mov edx, dword [eax]
mov eax, dword [edx + ebx*4]
cmp byte [eax], 0x40
je 0x474e50
mov ebp, ebx
lea ebx, [ebp + 1]
cmp ebx, ecx
jl 0x474e20
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
sub dword [esp + 0x18], 1
je 0x4750a1
add eax, 1
mov dword [esp + 4], 0x5ac729
mov dword [esp], eax
call sub.msvcrt.dll_fopen
test eax, eax
mov esi, eax
je 0x474f18
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x474f10
mov dword [esp], esi
call sub.msvcrt.dll_ftell
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x474f10
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x474f10
mov edx, dword [esp + 0x1c]
lea eax, [edx + 1]
mov dword [esp + 0x20], edx
mov dword [esp], eax
call fcn.00479130
mov edx, dword [esp + 0x20]
mov dword [esp + 0xc], esi
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 8], edx
call sub.msvcrt.dll_fread
mov edx, dword [esp + 0x20]
mov ecx, eax
cmp edx, eax
je 0x474f29
mov dword [esp], esi
mov dword [esp + 0x20], eax
call sub.msvcrt.dll_ferror
test eax, eax
je 0x474f25
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov eax, dword [esp + 0x50]
mov ebp, ebx
mov ecx, dword [eax]
jmp 0x474e37
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov byte [eax + ecx], 0
movzx eax, byte [eax]
test al, al
je 0x474f68
test byte [eax + eax + 0x5acea0], 0x40
je 0x47503e
mov edx, dword [esp + 0x1c]
jmp 0x474f5e
test byte [eax + eax + 0x5acea0], 0x40
je 0x47503e
add edx, 1
movzx eax, byte [edx]
test al, al
jne 0x474f50
mov dword [esp], 4
call fcn.00479130
mov dword [eax], 0
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x54]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00474a20
mov ecx, dword [esp + 0x54]
xor edx, edx
mov dword [ecx], eax
xor ecx, ecx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x28], edx
mov ecx, dword [ecx]
mov dword [esp], eax
lea ecx, [edx + ecx + 1]
shl ecx, 2
mov dword [esp + 4], ecx
call fcn.004791b0
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x28]
mov dword [ecx], eax
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x24], edx
mov ecx, dword [ecx]
sub ecx, ebx
add ebx, edx
shl ecx, 2
mov dword [esp + 8], ecx
lea ecx, [eax + edi + 4]
lea eax, [eax + ebx*4]
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x20]
add edi, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp], edi
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x50]
mov eax, dword [eax]
lea eax, [edx + eax - 1]
mov dword [edi], eax
mov dword [esp], ebx
mov ebx, ebp
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [esp], esi
call sub.msvcrt.dll_fclose
jmp 0x474f18
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.00474ae0
mov edx, dword [esp + 0x54]
mov dword [esp + 0x20], eax
mov eax, dword [eax]
mov dword [esp + 0x24], eax
mov eax, dword [edx]
mov dword [esp], eax
call fcn.00474a20
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x24]
mov dword [edx], eax
xor edx, edx
test ecx, ecx
je 0x47509a
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x20]
lea esi, [esi]
add edx, 1
cmp dword [ebp + edx*4], 0
lea ecx, [edx*4]
jne 0x475080
mov ebp, dword [esp + 0x24]
jmp 0x474f96
xor ecx, ecx
jmp 0x474f96
mov eax, dword [edx]
mov dword [esp + 4], str._s:_error:_too_many___files_encountered_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov dword [esp], 1
call fcn.004790b0
nop
lea esi, [esi]
mov edx, dword [esp + 4]
xor eax, eax
test edx, edx
je 0x4750f2
mov ecx, dword [edx]
test ecx, ecx
je 0x4750f0
add eax, 1
mov ecx, dword [edx + eax*4]
test ecx, ecx
jne 0x4750e0
repz ret
repz ret
repz ret