Function at 0x403a70
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 edi, dword [esp + 0x54]
mov ecx, dword [eax]
cmp ebx, ecx
jge 0x403aac
mov edx, dword [edi]
lea esi, [ebx*4]
mov eax, dword [edx + ebx*4]
cmp byte [eax], 0x40
je 0x403ab4
mov ebp, ebx
lea ebx, [ebp + 1]
cmp ebx, ecx
jl 0x403a92
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
sub dword [esp + 0x18], 1
je 0x403d12
add eax, 1
mov dword [esp + 4], 0x40f0e5
mov dword [esp], eax
call sub.msvcrt.dll_fopen
test eax, eax
je 0x403cc8
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [esp + 0x14], eax
call fcn.0040be78
cmp eax, 0xffffffff
mov edx, dword [esp + 0x14]
je 0x403cc0
mov dword [esp], edx
call sub.msvcrt.dll_ftell
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x14]
je 0x403cc0
mov dword [esp], edx
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call fcn.0040be78
cmp eax, 0xffffffff
mov edx, dword [esp + 0x14]
je 0x403cc0
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x20], edx
lea eax, [ecx + 1]
mov dword [esp], eax
call fcn.00404df0
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
call sub.msvcrt.dll_fread
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
cmp ecx, eax
je 0x403b8e
test byte [edx + 0xc], 0x20
jne 0x403cc0
mov ecx, dword [esp + 0x14]
mov byte [ecx + eax], 0
movzx eax, byte [ecx]
test al, al
jne 0x403bb0
jmp 0x403cd5
add ecx, 1
movzx eax, byte [ecx]
test al, al
je 0x403cd5
test byte [eax + eax + 0x40f4c0], 0x40
jne 0x403ba2
mov eax, dword [esp + 0x14]
mov dword [esp + 0x28], edx
mov dword [esp], eax
call fcn.00403790
mov ecx, dword [eax]
mov dword [esp + 0x20], eax
mov eax, dword [edi]
mov dword [esp + 0x1c], ecx
mov dword [esp], eax
call fcn.004036c0
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x24], eax
mov dword [edi], eax
mov edx, dword [esp + 0x28]
test ecx, ecx
je 0x403d3c
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov dword [esp + 0x28], ebp
nop
add ecx, 1
cmp dword [eax + ecx*4], 0
lea ebp, [ecx*4]
jne 0x403c00
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x50]
mov eax, ecx
mov dword [esp + 0x28], ecx
add eax, dword [edx]
lea eax, [eax*4 + 4]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call fcn.00404e70
mov edx, eax
mov dword [edi], eax
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x28]
mov eax, dword [eax]
mov dword [esp + 0x24], ecx
sub eax, ebx
add ebx, ecx
shl eax, 2
mov dword [esp + 8], eax
lea eax, [edx + esi + 4]
mov dword [esp + 4], eax
lea eax, [edx + ebx*4]
mov dword [esp], eax
call sub.msvcrt.dll_memmove
add esi, dword [edi]
mov ebx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], ebx
mov dword [esp], esi
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x50]
mov eax, dword [eax]
lea eax, [ecx + eax - 1]
mov dword [esi], eax
mov dword [esp], ebx
mov ebx, ebp
call fcn.0040be80
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call fcn.0040be80
mov edx, dword [esp + 0x2c]
mov esi, esi
lea edi, [edi]
mov dword [esp], edx
call sub.msvcrt.dll_fclose
mov eax, dword [esp + 0x50]
mov ebp, ebx
mov ecx, dword [eax]
jmp 0x403aa5
mov dword [esp], 4
mov dword [esp + 0x28], edx
call fcn.00404df0
mov dword [eax], 0
mov dword [esp + 0x20], eax
mov eax, dword [edi]
mov dword [esp], eax
call fcn.004036c0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], eax
xor ecx, ecx
mov dword [edi], eax
mov edx, dword [esp + 0x28]
jmp 0x403c18
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 fcn.00403690
mov dword [esp], 1
call fcn.00404d40
mov dword [esp + 0x1c], 0
jmp 0x403c18