Function at 0x408930
Capabilities:
Read file on windows

Disassembly:
push ebp
xor ebp, ebp
push edi
push esi
push ebx
sub esp, 0x6c
mov eax, dword [esp + 0x84]
mov dword [esp + 0x10], 0x7d0
mov eax, dword [eax]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x80]
mov ecx, dword [eax]
lea esi, [esi]
nop
lea ebx, [ebp + 1]
cmp ebx, ecx
jge 0x408a8e
mov eax, dword [esp + 0x84]
lea edi, [ebx*4]
mov edx, dword [eax]
mov eax, dword [edx + ebx*4]
cmp byte [eax], 0x40
jne 0x408aa9
sub dword [esp + 0x10], 1
je 0x408c8e
lea esi, [eax + 1]
lea eax, [esp + 0x3c]
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll__stat
test eax, eax
js 0x408aa0
movzx eax, word [esp + 0x42]
and ax, 0xf000
cmp ax, 0x4000
je 0x408cb8
mov dword [esp], esi
mov dword [esp + 4], 0x415ef5
call sub.msvcrt.dll_fopen
mov esi, eax
test eax, eax
je 0x408aa0
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x408a70
mov dword [esp], esi
call sub.msvcrt.dll_ftell
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x408a70
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x408a70
mov edx, dword [esp + 0x14]
lea eax, [edx + 1]
mov dword [esp + 0x18], edx
mov dword [esp], eax
call fcn.00409d40
mov edx, dword [esp + 0x18]
mov dword [esp + 0xc], esi
mov dword [esp + 4], 1
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 0x14], eax
call sub.msvcrt.dll_fread
mov edx, dword [esp + 0x18]
cmp edx, eax
je 0x408ab0
test byte [esi + 0xc], 0x20
je 0x408ab0
lea esi, [esi]
lea esi, [esi]
mov dword [esp], esi
mov ebp, ebx
lea ebx, [ebp + 1]
call sub.msvcrt.dll_fclose
mov eax, dword [esp + 0x80]
mov ecx, dword [eax]
cmp ebx, ecx
jl 0x40896b
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x80]
mov ecx, dword [eax]
mov ebp, ebx
jmp 0x408960
mov edx, dword [esp + 0x14]
mov byte [edx + eax], 0
movzx eax, byte [edx]
test al, al
jne 0x408ad2
jmp 0x408c20
add edx, 1
movzx eax, byte [edx]
test al, al
je 0x408c20
test byte [eax + eax + 0x4162c0], 0x40
jne 0x408ac4
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call fcn.00408620
mov edx, dword [esp + 0x24]
mov ecx, eax
mov eax, dword [esp + 0x84]
mov eax, dword [eax]
cmp eax, edx
mov dword [esp + 0x18], eax
mov edx, dword [ecx]
je 0x408cd1
test edx, edx
je 0x408c7b
mov dword [esp + 0x20], edi
mov eax, dword [esp + 0x18]
xor edx, edx
lea esi, [esi]
nop
add edx, 1
cmp dword [ecx + edx*4], 0
lea edi, [edx*4]
jne 0x408b20
mov dword [esp + 0x18], eax
lea eax, [ebx + edx]
shl eax, 2
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x20]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], edx
mov eax, dword [eax + edi]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x28]
mov eax, dword [eax]
lea eax, [edx + eax + 1]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [esp + 0x84]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00409dc0
mov ecx, dword [esp + 0x84]
mov dword [ecx], eax
mov ecx, dword [esp + 0x80]
mov ecx, dword [ecx]
mov dword [esp + 0x18], ecx
sub ecx, ebx
mov ebx, ecx
shl ebx, 2
mov dword [esp + 8], ebx
lea ebx, [eax + edi + 4]
add eax, dword [esp + 0x20]
mov dword [esp + 4], ebx
mov ebx, ebp
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov eax, dword [esp + 0x84]
mov ecx, dword [esp + 0x2c]
add edi, dword [eax]
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], ecx
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 0x18], ecx
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
mov edi, dword [esp + 0x80]
mov eax, dword [eax]
lea eax, [edx + eax - 1]
mov dword [edi], eax
mov dword [esp], ecx
call sub.msvcrt.dll_free
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_free
jmp 0x408a70
mov dword [esp], 4
call fcn.00409d40
mov dword [eax], 0
mov ecx, eax
mov eax, dword [esp + 0x84]
mov edx, dword [eax]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x18], edx
cmp eax, edx
jne 0x408c7b
mov dword [esp], eax
mov dword [esp + 0x28], ecx
call fcn.00408550
mov dword [esp + 0x20], edi
xor edx, edx
mov ecx, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x1c], 0
mov dword [eax], ecx
mov ecx, dword [esp + 0x28]
jmp 0x408b46
mov dword [esp + 0x20], edi
xor edx, edx
mov dword [esp + 0x1c], 0
jmp 0x408b46
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.00408520
mov dword [esp], 1
call fcn.00409c90
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
jmp 0x408c9c
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], edx
mov dword [esp], eax
call fcn.00408550
mov edx, dword [esp + 0x1c]
mov ecx, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x84]
mov dword [eax], ecx
mov ecx, dword [esp + 0x20]
jmp 0x408b05