Function at 0x4112f0
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
xor ebp, ebp
push esi
push ebx
sub esp, 0x6c
mov eax, dword [esp + 0x80]
mov dword [esp + 0x18], 0x7d0
mov ecx, dword [eax]
lea esi, [esi]
lea ebx, [ebp + 1]
cmp ebx, ecx
jge 0x411341
mov esi, esi
lea edi, [edi]
mov eax, dword [esp + 0x84]
lea esi, [ebx*4]
mov edx, dword [eax]
mov eax, dword [edx + ebx*4]
cmp byte [eax], 0x40
je 0x411350
mov ebp, ebx
lea ebx, [ebp + 1]
cmp ebx, ecx
jl 0x411320
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
sub dword [esp + 0x18], 1
je 0x411625
lea edi, [eax + 1]
lea eax, [esp + 0x3c]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll__stat
test eax, eax
js 0x411580
movzx eax, word [esp + 0x42]
and ax, 0xf000
cmp ax, 0x4000
je 0x4115f2
mov dword [esp], edi
mov dword [esp + 4], 0x421595
call sub.msvcrt.dll_fopen
test eax, eax
mov edi, eax
je 0x411580
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0041ab18
cmp eax, 0xffffffff
je 0x411560
mov dword [esp], edi
call sub.msvcrt.dll_ftell
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x411560
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], edi
call fcn.0041ab18
cmp eax, 0xffffffff
je 0x411560
mov edx, dword [esp + 0x1c]
lea eax, [edx + 1]
mov dword [esp + 0x20], edx
mov dword [esp], eax
call fcn.00412630
mov edx, dword [esp + 0x20]
mov dword [esp + 0xc], edi
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]
cmp edx, eax
je 0x41143f
test byte [edi + 0xc], 0x20
jne 0x411560
mov ecx, dword [esp + 0x1c]
mov byte [ecx + eax], 0
movzx eax, byte [ecx]
test al, al
je 0x411478
test byte [eax + eax + 0x421960], 0x40
je 0x411590
mov edx, ecx
jmp 0x41146e
test byte [eax + eax + 0x421960], 0x40
je 0x411590
add edx, 1
movzx eax, byte [edx]
test al, al
jne 0x411460
mov dword [esp], 4
call fcn.00412630
mov dword [eax], 0
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x84]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00410f10
mov ecx, dword [esp + 0x84]
xor edx, edx
mov dword [ecx], eax
xor ecx, ecx
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x80]
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.004126b0
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x28]
mov dword [ecx], eax
mov ecx, dword [esp + 0x80]
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 + esi + 4]
lea eax, [eax + ebx*4]
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x20]
add esi, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp], esi
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x80]
mov eax, dword [eax]
lea eax, [edx + eax - 1]
mov dword [esi], eax
mov dword [esp], ebx
mov ebx, ebp
call fcn.0041ab20
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.0041ab20
lea esi, [esi]
mov dword [esp], edi
mov ebp, ebx
call sub.msvcrt.dll_fclose
mov eax, dword [esp + 0x80]
mov ecx, dword [eax]
jmp 0x411310
mov eax, dword [esp + 0x80]
mov ebp, ebx
mov ecx, dword [eax]
jmp 0x41133a
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.00410fd0
mov edx, dword [esp + 0x84]
mov dword [esp + 0x20], eax
mov eax, dword [eax]
mov dword [esp + 0x24], eax
mov eax, dword [edx]
mov dword [esp], eax
call fcn.00410f10
mov edx, dword [esp + 0x84]
mov ecx, dword [esp + 0x24]
mov dword [edx], eax
xor edx, edx
test ecx, ecx
je 0x4115eb
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x20]
add edx, 1
cmp dword [ebx + edx*4], 0
lea ecx, [edx*4]
jne 0x4115d2
mov ebx, dword [esp + 0x24]
jmp 0x4114ac
xor ecx, ecx
jmp 0x4114ac
mov eax, dword [esp + 0x84]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp + 4], str._s:_error:___file_refers_to_a_directory_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00410ee0
mov dword [esp], 1
call fcn.00412580
mov eax, dword [edx]
mov dword [esp + 4], str._s:_error:_too_many___files_encountered_n
mov dword [esp + 8], eax
jmp 0x411609