Function at 0x49dc40
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
xor esi, esi
sub esp, 0x6c
mov ebp, dword [esp + 0x84]
mov dword [esp + 0x14], 0x7d0
mov eax, dword [ebp]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x80]
mov ecx, dword [eax]
nop
lea esi, [esi]
lea ebx, [esi + 1]
cmp ebx, ecx
jge 0x49dc9b
mov esi, esi
lea edi, [edi]
mov edx, dword [ebp]
lea edi, [ebx*4]
mov eax, dword [edx + ebx*4]
cmp byte [eax], 0x40
je 0x49dca3
mov esi, ebx
lea ebx, [esi + 1]
cmp ebx, ecx
jl 0x49dc80
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
sub dword [esp + 0x14], 1
je 0x49df94
lea edx, [eax + 1]
lea eax, [esp + 0x30]
mov dword [esp], edx
mov dword [esp + 0x10], edx
mov dword [esp + 4], eax
call dword [sym.imp.msvcrt.dll__stati64]
test eax, eax
mov edx, dword [esp + 0x10]
js 0x49df40
movzx eax, word [esp + 0x36]
and ax, 0xf000
cmp ax, 0x4000
je 0x49df67
mov dword [esp + 4], 0x4e2379
mov dword [esp], edx
call sub.msvcrt.dll_fopen
test eax, eax
mov dword [esp + 0x10], eax
je 0x49df40
mov eax, dword [esp + 0x10]
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x49df23
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_ftell
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
je 0x49df23
mov eax, dword [esp + 0x10]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_fseek
cmp eax, 0xffffffff
je 0x49df23
mov edx, dword [esp + 0x18]
lea eax, [edx + 1]
mov dword [esp + 0x20], edx
mov dword [esp], eax
call fcn.004a70b0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
mov dword [esp + 4], 1
mov dword [esp], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edx
call sub.msvcrt.dll_fread
mov edx, dword [esp + 0x20]
mov ecx, eax
cmp edx, eax
je 0x49ddc1
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_ferror
test eax, eax
mov ecx, dword [esp + 0x20]
jne 0x49df50
mov edx, dword [esp + 0x18]
mov byte [edx + ecx], 0
movzx eax, byte [edx]
test al, al
jne 0x49dddc
jmp 0x49de36
add edx, 1
movzx eax, byte [edx]
test al, al
je 0x49de36
test byte [eax + eax + 0x4e3480], 0x40
jne 0x49ddd2
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call fcn.0049d900
mov ecx, eax
mov dword [esp + 0x20], eax
mov eax, dword [ebp]
cmp dword [esp + 0x1c], eax
je 0x49dfa4
mov edx, dword [ecx]
test edx, edx
je 0x49df5e
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x20]
xor edx, edx
lea esi, [esi]
add edx, 1
cmp dword [ebx + edx*4], 0
lea ecx, [edx*4]
jne 0x49de20
mov ebx, dword [esp + 0x24]
jmp 0x49de6c
mov dword [esp], 4
call fcn.004a70b0
mov dword [esp + 0x20], eax
mov dword [eax], 0
mov eax, dword [ebp]
cmp dword [esp + 0x1c], eax
jne 0x49df5e
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
call fcn.0049d840
xor ecx, ecx
mov dword [ebp], eax
xor edx, edx
mov eax, dword [eax + edi]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x24], edx
mov dword [esp], eax
call fcn.004a9de0
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x24]
mov eax, dword [eax]
mov dword [esp + 0x28], edx
lea eax, [edx + eax + 1]
shl eax, 2
mov dword [esp + 4], eax
mov eax, dword [ebp]
mov dword [esp], eax
call fcn.004a7130
mov ecx, dword [esp + 0x80]
mov edx, dword [esp + 0x28]
mov dword [ebp], eax
mov ecx, dword [ecx]
mov dword [esp + 0x24], edx
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
add edi, dword [ebp]
mov ecx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x20]
mov dword [esp + 8], ecx
mov dword [esp + 4], ebx
mov dword [esp], edi
call sub.msvcrt.dll_memcpy
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x80]
mov eax, dword [eax]
lea eax, [edx + eax - 1]
mov dword [edi], eax
mov dword [esp], ebx
mov ebx, esi
call fcn.004a9de0
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call fcn.004a9de0
mov eax, dword [esp + 0x10]
mov esi, ebx
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov eax, dword [esp + 0x80]
mov ecx, dword [eax]
jmp 0x49dc70
mov eax, dword [esp + 0x80]
mov esi, ebx
mov ecx, dword [eax]
jmp 0x49dc94
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call fcn.004a9de0
jmp 0x49df23
xor ecx, ecx
xor edx, edx
jmp 0x49de6c
mov eax, dword [ebp]
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 sub.msvcrt.dll_fprintf
mov dword [esp], 1
call fcn.004a7030
mov eax, dword [edx]
mov dword [esp + 4], str._s:_error:_too_many___files_encountered_n
mov dword [esp + 8], eax
jmp 0x49df78
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
mov eax, dword [esp + 0x1c]
mov dword [esp], eax
mov dword [esp + 0x24], edx
call fcn.0049d840
mov edx, dword [esp + 0x24]
mov dword [ebp], eax
jmp 0x49de07