Function at 0x4a74f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x94
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x50], 0
sub esp, 8
push 0x4f8e60
push dword [ebp + 8]
call sub.msvcrt.dll_fopen
add esp, 0x10
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4a7530
mov dword [ebp - 0x60], 0
jmp 0x4a7896
sub esp, 8
lea eax, [ebp - 0x48]
push eax
mov eax, dword [ebp - 0xc]
push dword [eax + 0x10]
call sub.msvcrt.dll__fstat
add esp, 0x10
test eax, eax
jne 0x4a755c
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 0x34]
jne 0x4a755c
cmp dword [ebp - 0x10], 0x1b
jbe 0x4a755c
jmp 0x4a7576
sub esp, 0xc
push dword [ebp - 0xc]
call sub.msvcrt.dll_fclose
add esp, 0x10
mov dword [ebp - 0x60], 0
jmp 0x4a7896
sub esp, 0xc
push dword [ebp - 0x10]
call sub.msvcrt.dll_malloc
add esp, 0x10
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4a75a7
sub esp, 0xc
push dword [ebp - 0xc]
call sub.msvcrt.dll_fclose
add esp, 0x10
mov dword [ebp - 0x60], 0
jmp 0x4a7896
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x58], eax
push dword [ebp - 0xc]
push dword [ebp - 0x54]
push 1
push dword [ebp - 0x58]
call sub.msvcrt.dll_fread
add esp, 0x10
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x54]
jae 0x4a75f9
sub esp, 0xc
push dword [ebp - 0xc]
call sub.msvcrt.dll_fclose
add esp, 0x10
sub esp, 0xc
push dword [ebp - 0x4c]
call sub.msvcrt.dll_free
add esp, 0x10
mov dword [ebp - 0x60], 0
jmp 0x4a7896
mov edx, dword [ebp - 0x5c]
lea eax, [ebp - 0x58]
add dword [eax], edx
mov edx, dword [ebp - 0x5c]
lea eax, [ebp - 0x54]
sub dword [eax], edx
cmp dword [ebp - 0x54], 0
je 0x4a7611
jmp 0x4a75b3
sub esp, 0xc
push dword [ebp - 0xc]
call sub.msvcrt.dll_fclose
add esp, 0x10
mov eax, dword [ebp - 0x4c]
cmp dword [eax], 0x950412de
je 0x4a764f
mov eax, dword [ebp - 0x4c]
cmp dword [eax], 0xde120495
je 0x4a764f
sub esp, 0xc
push dword [ebp - 0x4c]
call sub.msvcrt.dll_free
add esp, 0x10
mov dword [ebp - 0x60], 0
jmp 0x4a7896
sub esp, 8
push 0x24
push 1
call sub.msvcrt.dll_calloc
add esp, 0x10
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
jne 0x4a7681
sub esp, 0xc
push dword [ebp - 0x4c]
call sub.msvcrt.dll_free
add esp, 0x10
mov dword [ebp - 0x60], 0
jmp 0x4a7896
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x4c]
mov dword [edx], eax
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x4c]
cmp dword [eax], 0x950412de
setne al
and eax, 0xff
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x50]
cmp dword [eax + 4], 0
je 0x4a76c2
sub esp, 0xc
mov eax, dword [ebp - 0x4c]
push dword [eax + 4]
call fcn.004a789e
add esp, 0x10
mov dword [ebp - 0x8c], eax
jmp 0x4a76ce
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 4]
mov dword [ebp - 0x8c], eax
cmp dword [ebp - 0x8c], 0
je 0x4a76dc
jmp 0x4a7824
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x50]
cmp dword [eax + 4], 0
je 0x4a7701
sub esp, 0xc
mov eax, dword [ebp - 0x4c]
push dword [eax + 8]
call fcn.004a789e
add esp, 0x10
mov dword [ebp - 0x68], eax
jmp 0x4a770a
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 8]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
mov edx, dword [ebp - 0x64]
mov dword [edx + 8], eax
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x6c], edx
mov eax, dword [ebp - 0x50]
cmp dword [eax + 4], 0
je 0x4a773e
sub esp, 0xc
mov eax, dword [ebp - 0x4c]
push dword [eax + 0xc]
call fcn.004a789e
add esp, 0x10
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x4c]
add dword [ebp - 0x70], eax
jmp 0x4a774c
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x4c]
mov edx, dword [edx + 0xc]
add edx, eax
mov dword [ebp - 0x70], edx
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x6c]
mov dword [edx + 0x14], eax
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x74], edx
mov eax, dword [ebp - 0x50]
cmp dword [eax + 4], 0
je 0x4a7780
sub esp, 0xc
mov eax, dword [ebp - 0x4c]
push dword [eax + 0x10]
call fcn.004a789e
add esp, 0x10
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0x4c]
add dword [ebp - 0x78], eax
jmp 0x4a778e
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x4c]
mov edx, dword [edx + 0x10]
add edx, eax
mov dword [ebp - 0x78], edx
mov eax, dword [ebp - 0x78]
mov edx, dword [ebp - 0x74]
mov dword [edx + 0x18], eax
mov edx, dword [ebp - 0x50]
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp - 0x50]
cmp dword [eax + 4], 0
je 0x4a77bc
sub esp, 0xc
mov eax, dword [ebp - 0x4c]
push dword [eax + 0x14]
call fcn.004a789e
add esp, 0x10
mov dword [ebp - 0x80], eax
jmp 0x4a77c5
mov eax, dword [ebp - 0x4c]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x80], eax
mov edx, dword [ebp - 0x80]
mov eax, dword [ebp - 0x7c]
mov dword [eax + 0x1c], edx
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x50]
cmp dword [eax + 4], 0
je 0x4a7802
sub esp, 0xc
mov eax, dword [ebp - 0x4c]
push dword [eax + 0x18]
call fcn.004a789e
add esp, 0x10
mov dword [ebp - 0x88], eax
mov edx, dword [ebp - 0x4c]
add dword [ebp - 0x88], edx
jmp 0x4a7813
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x4c]
mov edx, dword [edx + 0x18]
add edx, eax
mov dword [ebp - 0x88], edx
mov edx, dword [ebp - 0x88]
mov eax, dword [ebp - 0x84]
mov dword [eax + 0x20], edx
jmp 0x4a7849
sub esp, 0xc
push dword [ebp - 0x4c]
call sub.msvcrt.dll_free
add esp, 0x10
sub esp, 0xc
push dword [ebp - 0x50]
call sub.msvcrt.dll_free
add esp, 0x10
mov dword [ebp - 0x60], 0
jmp 0x4a7896
mov ebx, dword [ebp - 0x50]
sub esp, 8
mov eax, dword [ebp - 0x50]
push dword [eax + 8]
push 1
call sub.msvcrt.dll_calloc
add esp, 0x10
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x50]
cmp dword [eax + 0xc], 0
jne 0x4a7890
sub esp, 0xc
push dword [ebp - 0x4c]
call sub.msvcrt.dll_free
add esp, 0x10
sub esp, 0xc
push dword [ebp - 0x50]
call sub.msvcrt.dll_free
add esp, 0x10
mov dword [ebp - 0x60], 0
jmp 0x4a7896
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
mov ebx, dword [ebp - 4]
leave
ret